Back to Prefect

clients

docs/v3/api-ref/python/prefect-server-api-clients.mdx

3.7.28.2 KB
Original Source

prefect.server.api.clients

Classes

BaseClient <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L30" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

OrchestrationClient <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L66" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Methods:

create_flow_run <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
create_flow_run(self, deployment_id: UUID, flow_run_create: DeploymentFlowRunCreate) -> Response

delete_flow_run <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L96" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
delete_flow_run(self, flow_run_id: UUID) -> Response

pause_deployment <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L109" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
pause_deployment(self, deployment_id: UUID) -> Response

pause_work_pool <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L130" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
pause_work_pool(self, work_pool_name: str) -> Response

pause_work_queue <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L159" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
pause_work_queue(self, work_queue_id: UUID) -> Response

read_block_document_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L171" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_block_document_raw(self, block_document_id: UUID, include_secrets: bool = True) -> Response

read_concurrency_limit_v2_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L221" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_concurrency_limit_v2_raw(self, concurrency_limit_id: UUID) -> Response

read_deployment <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_deployment(self, deployment_id: UUID) -> Optional[DeploymentResponse]

read_deployment_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_deployment_raw(self, deployment_id: UUID) -> Response

read_flow_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L82" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_flow_raw(self, flow_id: UUID) -> Response

read_flow_run_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L93" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_flow_run_raw(self, flow_run_id: UUID) -> Response

read_task_run_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L99" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_task_run_raw(self, task_run_id: UUID) -> Response

read_work_pool <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L146" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_work_pool(self, work_pool_id: UUID) -> Optional[WorkPool]

read_work_pool_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L140" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_work_pool_raw(self, work_pool_id: UUID) -> Response

read_work_queue_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_work_queue_raw(self, work_queue_id: UUID) -> Response

read_work_queue_status_raw <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L156" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_work_queue_status_raw(self, work_queue_id: UUID) -> Response

read_workspace_variables <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L184" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_workspace_variables(self, names: Optional[List[str]] = None) -> Dict[str, StrictVariableValue]

request <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/orchestration/base.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
request(self, method: HTTP_METHODS, path: 'ServerRoutes', params: dict[str, Any] | None = None, path_params: dict[str, Any] | None = None, **kwargs: Any) -> 'Response'

resume_deployment <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L114" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
resume_deployment(self, deployment_id: UUID) -> Response

resume_flow_run <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L102" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
resume_flow_run(self, flow_run_id: UUID) -> OrchestrationResult

resume_work_pool <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L135" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
resume_work_pool(self, work_pool_name: str) -> Response

resume_work_queue <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L165" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
resume_work_queue(self, work_queue_id: UUID) -> Response

set_flow_run_state <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L119" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
set_flow_run_state(self, flow_run_id: UUID, state: StateCreate, force: bool = False) -> Response

WorkPoolsOrchestrationClient <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L229" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Methods:

read_work_pool <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/clients.py#L233" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_work_pool(self, work_pool_name: str) -> WorkPool

Reads information for a given work pool Args: work_pool_name: The name of the work pool to for which to get information. Returns: Information about the requested work pool.

request <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/orchestration/base.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
request(self, method: HTTP_METHODS, path: 'ServerRoutes', params: dict[str, Any] | None = None, path_params: dict[str, Any] | None = None, **kwargs: Any) -> 'Response'