v50

latestOpenAPI 3.1.0raw.githubusercontent.com2025-01-16170291390.7 KB
Flow Runs
UI

Read Flow Run History

post/api/ui/flow_runs/history

Headers

x-prefect-api-versionstring

Request body

sort'ID_DESC' | 'START_TIME_ASC' | 'START_TIME_DESC' | 'EXPECTED_START_TIME_ASC' | 'EXPECTED_START_TIME_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'NEXT_SCHEDULED_START_TIME_ASC' | 'END_TIME_DESC'

Defines flow run sorting options.

limitinteger
offsetinteger

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"
      ]
    }
  }
}

Response

Successful Response

idstring uuid required

The flow run id.

state_type'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' required

Enumeration of state types.

timestampstring date-time required

The start time of the run, or the expected start time if it hasn't run yet.

durationnumber required

The total run time of the run.

latenessnumber required

The delay between the expected and actual start time.