v1

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

Read Artifacts

Retrieve artifacts from the database.

post/api/artifacts/filter

Headers

x-prefect-api-versionstring

Request body

sort'CREATED_DESC' | 'UPDATED_DESC' | 'ID_DESC' | 'KEY_DESC' | 'KEY_ASC'

Defines artifact sorting options.

offsetinteger
limitinteger

Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.

Example request

{
  "artifacts": {
    "key": {
      "like_": "my-artifact-%"
    }
  },
  "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"
      ]
    }
  },
  "flows": {
    "name": {
      "any_": [
        "my-flow-1",
        "my-flow-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"
      ]
    }
  }
}

Response

Successful Response

idstring uuid
createdstring date-time
updatedstring date-time
keystring

An optional unique reference key for this artifact.

typestring

An identifier that describes the shape of the data field. e.g. 'result', 'table', 'markdown'

descriptionstring

A markdown-enabled description of the artifact.

metadata_object

User-defined artifact metadata. Content must be string key and value pairs.

flow_run_idstring uuid

The flow run associated with the artifact.

task_run_idstring uuid

The task run associated with the artifact.