v1

latestOpenAPI 3.1.0raw.githubusercontent.com2024-11-08170291390.5 KB
Deployments

Read Deployments

Query for deployments.

post/api/deployments/filter

Headers

x-prefect-api-versionstring

Request body

offsetinteger
sort'CREATED_DESC' | 'UPDATED_DESC' | 'NAME_ASC' | 'NAME_DESC'

Defines deployment sorting options.

limitinteger

Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.

Example request

{
  "flows": {
    "name": {
      "any_": [
        "my-flow-1",
        "my-flow-2"
      ],
      "like_": "marvin"
    },
    "tags": {
      "all_": [
        "tag-1",
        "tag-2"
      ]
    }
  },
  "flow_runs": {
    "name": {
      "any_": [
        "my-flow-run-1",
        "my-flow-run-2"
      ],
      "like_": "marvin"
    },
    "tags": {
      "all_": [
        "tag-1",
        "tag-2"
      ]
    },
    "work_queue_name": {
      "any_": [
        "work_queue_1",
        "work_queue_2"
      ]
    }
  },
  "task_runs": {
    "name": {
      "any_": [
        "my-task-run-1",
        "my-task-run-2"
      ],
      "like_": "marvin"
    },
    "tags": {
      "all_": [
        "tag-1",
        "tag-2"
      ]
    }
  },
  "deployments": {
    "name": {
      "any_": [
        "my-deployment-1",
        "my-deployment-2"
      ],
      "like_": "marvin"
    },
    "tags": {
      "all_": [
        "tag-1",
        "tag-2"
      ]
    },
    "work_queue_name": {
      "any_": [
        "work_queue_1",
        "work_queue_2"
      ]
    }
  },
  "work_pool_queues": {
    "name": {
      "any_": [
        "wq-1",
        "wq-2"
      ],
      "startswith_": [
        "marvin",
        "Marvin-robot"
      ]
    }
  }
}

Response

Successful Response

idstring uuid
createdstring date-time
updatedstring date-time
infra_overridesobject

Deprecated field. Use job_variables instead.

namestring required

The name of the deployment.

versionstring

An optional version for the deployment.

descriptionstring

A description for the deployment.

flow_idstring uuid required

The flow id associated with the deployment.

is_schedule_activeboolean

Whether or not the deployment schedule is active.

pausedboolean

Whether or not the deployment is paused.

job_variablesobject

Overrides to apply to the base infrastructure block at runtime.

parametersobject

Parameters for flow runs scheduled by the deployment.

tagsstring[]

A list of tags for the deployment

work_queue_namestring

The work queue for the deployment. If no work queue is set, work will not be scheduled.

last_polledstring date-time

The last time the deployment was polled for status updates.

parameter_openapi_schemaobject

The parameter schema of the flow, including defaults.

pathstring

The path to the working directory for the workflow, relative to remote storage or an absolute path.

pull_stepsobject[]

Pull steps for cloning and running this deployment.

entrypointstring

The path to the entrypoint for the workflow, relative to the path.

manifest_pathstring

The path to the flow's manifest file, relative to the chosen storage.

storage_document_idstring uuid

The block document defining storage used for this flow.

infrastructure_document_idstring uuid

The block document defining infrastructure to use for flow runs.

work_pool_namestring

The name of the deployment's work pool.

status'READY' | 'NOT_READY'

Enumeration of deployment statuses.

enforce_parameter_schemaboolean

Whether or not the deployment should enforce the parameter schema.

Example response

[
  {
    "schedule": {
      "timezone": "America/New_York"
    },
    "schedules": [
      {
        "schedule": {
          "timezone": "America/New_York"
        }
      }
    ],
    "tags": [
      "tag-1",
      "tag-2"
    ]
  }
]