docs/v3/api-ref/python/prefect-server-api-block_documents.mdx
prefect.server.api.block_documentsRoutes for interacting with block objects.
create_block_document <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L21" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_block_document(block_document: schemas.actions.BlockDocumentCreate, db: PrefectDBInterface = Depends(provide_database_interface)) -> schemas.core.BlockDocument
Create a new block document.
For more information, see https://docs.prefect.io/v3/concepts/blocks.
read_block_documents <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L51" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_block_documents(limit: int = dependencies.LimitBody(), block_documents: Optional[schemas.filters.BlockDocumentFilter] = None, block_types: Optional[schemas.filters.BlockTypeFilter] = None, block_schemas: Optional[schemas.filters.BlockSchemaFilter] = None, include_secrets: bool = Body(False, description='Whether to include sensitive values in the block document.'), sort: Optional[schemas.sorting.BlockDocumentSort] = Body(schemas.sorting.BlockDocumentSort.NAME_ASC), offset: int = Body(0, ge=0), db: PrefectDBInterface = Depends(provide_database_interface)) -> List[schemas.core.BlockDocument]
Query for block documents.
count_block_documents <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L84" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>count_block_documents(block_documents: Optional[schemas.filters.BlockDocumentFilter] = None, block_types: Optional[schemas.filters.BlockTypeFilter] = None, block_schemas: Optional[schemas.filters.BlockSchemaFilter] = None, db: PrefectDBInterface = Depends(provide_database_interface)) -> int
Count block documents.
read_block_document_by_id <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L105" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_block_document_by_id(block_document_id: UUID = Path(..., description='The block document id', alias='id'), include_secrets: bool = Query(False, description='Whether to include sensitive values in the block document.'), db: PrefectDBInterface = Depends(provide_database_interface)) -> schemas.core.BlockDocument
delete_block_document <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L126" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>delete_block_document(block_document_id: UUID = Path(..., description='The block document id', alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None
update_block_document_data <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/block_documents.py#L143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>update_block_document_data(block_document: schemas.actions.BlockDocumentUpdate, block_document_id: UUID = Path(..., description='The block document id', alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None