v50

latestOpenAPI 3.1.0raw.githubusercontent.com2025-01-16170291390.7 KB
Block documents

Read Block Documents

Query for block documents.

post/api/block_documents/filter

Headers

x-prefect-api-versionstring

Request body

include_secretsboolean

Whether to include sensitive values in the block document.

sort'NAME_DESC' | 'NAME_ASC' | 'BLOCK_TYPE_AND_NAME_ASC'

Defines block document sorting options.

offsetinteger
limitinteger

Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.

Example request

{
  "block_documents": {
    "name": {
      "like_": "my-block%"
    }
  },
  "block_types": {
    "name": {
      "like_": "marvin"
    }
  },
  "block_schemas": {
    "block_capabilities": {
      "all_": [
        "write-storage",
        "read-storage"
      ]
    },
    "version": {
      "any_": [
        "2.0.0",
        "2.1.0"
      ]
    }
  }
}

Response

Successful Response

idstring uuid
createdstring date-time
updatedstring date-time
namestring

The block document's name. Not required for anonymous block documents.

dataobject

The block document's data

block_schema_idstring uuid required

A block schema ID

block_type_idstring uuid required

A block type ID

block_type_namestring

The associated block type's name

block_document_referencesobject

Record of the block document's references

is_anonymousboolean

Whether the block is anonymous (anonymous blocks are usually created by Prefect automatically)