Prefect · Capability

Prefect Cloud API — Flow Runs

Prefect Cloud API — Flow Runs. 27 operations. Lead operation: Create Flow Run. Self-contained Naftiko capability covering one Prefect business surface.

Run with Naftiko PrefectFlow Runs

What You Can Do

POST
Createflowrunapiaccountsaccountidworkspacesworkspaceidflowrunspost — Create Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs
POST
Bulkdeleteflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsbulkdeletepost — Bulk Delete Flow Runs
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/bulk-delete
POST
Bulksetflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsbulksetstatepost — Bulk Set Flow Run State
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/bulk-set-state
POST
Countflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunscountpost — Count Flow Runs
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/count
POST
Readflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsfilterpost — Read Flow Runs
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/filter
POST
Readflowrunsminimalapiaccountsaccountidworkspacesworkspaceidflowrunsfilterminimalpost — Read Flow Runs Minimal
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/filter-minimal
POST
Flowrunhistoryapiaccountsaccountidworkspacesworkspaceidflowrunshistorypost — Flow Run History
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/history
POST
Averageflowrunlatenessapiaccountsaccountidworkspacesworkspaceidflowrunslatenesspost — Average Flow Run Lateness
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/lateness
POST
Paginateflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunspaginatepost — Paginate Flow Runs
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/paginate
PATCH
Updateflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidpatch — Update Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}
GET
Readflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidget — Read Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}
DELETE
Deleteflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsiddelete — Delete Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}
GET
Getflowrunartifactsapiaccountsaccountidworkspacesworkspaceidflowrunsidartifactsget — Get Flow Run Artifacts
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/artifacts
GET
Getflowrunmaterializationsapiaccountsaccountidworkspacesworkspaceidflowrunsidassetsmaterializationsget — Get Flow Run Materializations
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/assets/materializations
GET
Getflowrunreferencesapiaccountsaccountidworkspacesworkspaceidflowrunsidassetsreferencesget — Get Flow Run References
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/assets/references
GET
Readflowrungraphv1apiaccountsaccountidworkspacesworkspaceidflowrunsidgraphget — Read Flow Run Graph V1
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/graph
GET
Readflowrungraphv2apiaccountsaccountidworkspacesworkspaceidflowrunsidgraphv2get — Read Flow Run Graph V2
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/graph-v2
POST
Createflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputpost — Create Flow Run Input
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/input
POST
Filterflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputfilterpost — Filter Flow Run Input
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/input/filter
GET
Readflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputkeyget — Read Flow Run Input
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/input/{key}
DELETE
Deleteflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputkeydelete — Delete Flow Run Input
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/input/{key}
PATCH
Updateflowrunlabelsapiaccountsaccountidworkspacesworkspaceidflowrunsidlabelspatch — Update Flow Run Labels
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/labels
POST
Resumeflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidresumepost — Resume Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/resume
POST
Setflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsidsetstatepost — Set Flow Run State
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{id}/set-state
POST
Counttaskrunsbyflowrunapiaccountsaccountidworkspacesworkspaceiduiflowrunscounttaskrunspost — Count Task Runs By Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/ui/flow-runs/count-task-runs
POST
Readflowrunhistoryapiaccountsaccountidworkspacesworkspaceiduiflowrunshistorypost — Read Flow Run History
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/ui/flow-runs/history
POST
Readflowrunhistoryv2apiaccountsaccountidworkspacesworkspaceiduiflowrunshistoryv2post — Read Flow Run History V2
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/ui/flow-runs/history-v2

MCP Tools

create-flow-run

Create Flow Run

bulk-delete-flow-runs

Bulk Delete Flow Runs

bulk-set-flow-run-state

Bulk Set Flow Run State

count-flow-runs

Count Flow Runs

read-flow-runs

Read Flow Runs

read-flow-runs-minimal

Read Flow Runs Minimal

flow-run-history

Flow Run History

average-flow-run-lateness

Average Flow Run Lateness

paginate-flow-runs

Paginate Flow Runs

update-flow-run

Update Flow Run

idempotent
read-flow-run

Read Flow Run

read-only idempotent
delete-flow-run

Delete Flow Run

idempotent
get-flow-run-artifacts

Get Flow Run Artifacts

read-only idempotent
get-flow-run-materializations

Get Flow Run Materializations

read-only idempotent
get-flow-run-references

Get Flow Run References

read-only idempotent
read-flow-run-graph-v1

Read Flow Run Graph V1

read-only idempotent
read-flow-run-graph-v2

Read Flow Run Graph V2

read-only idempotent
create-flow-run-input

Create Flow Run Input

filter-flow-run-input

Filter Flow Run Input

read-flow-run-input

Read Flow Run Input

read-only idempotent
delete-flow-run-input

Delete Flow Run Input

idempotent
update-flow-run-labels

Update Flow Run Labels

idempotent
resume-flow-run

Resume Flow Run

set-flow-run-state

Set Flow Run State

count-task-runs-flow-run

Count Task Runs By Flow Run

read-flow-run-history

Read Flow Run History

read-flow-run-history-v2

Read Flow Run History V2

Capability Spec

prefect-flow-runs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prefect Cloud API — Flow Runs
  description: 'Prefect Cloud API — Flow Runs. 27 operations. Lead operation: Create Flow Run. Self-contained Naftiko capability
    covering one Prefect business surface.'
  tags:
  - Prefect
  - Flow Runs
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PREFECT_API_KEY: PREFECT_API_KEY
capability:
  consumes:
  - type: http
    namespace: prefect-flow-runs
    baseUri: ''
    description: Prefect Cloud API — Flow Runs business capability. Self-contained, no shared references.
    resources:
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/
      operations:
      - name: createflowrunapiaccountsaccountidworkspacesworkspaceidflowrunspost
        method: POST
        description: Create Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-bulk_delete
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/bulk_delete
      operations:
      - name: bulkdeleteflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsbulkdeletepost
        method: POST
        description: Bulk Delete Flow Runs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-bulk_set_state
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/bulk_set_state
      operations:
      - name: bulksetflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsbulksetstatepost
        method: POST
        description: Bulk Set Flow Run State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-count
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/count
      operations:
      - name: countflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunscountpost
        method: POST
        description: Count Flow Runs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-filter
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/filter
      operations:
      - name: readflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsfilterpost
        method: POST
        description: Read Flow Runs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-filter-minimal
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/filter-minimal
      operations:
      - name: readflowrunsminimalapiaccountsaccountidworkspacesworkspaceidflowrunsfilterminimalpost
        method: POST
        description: Read Flow Runs Minimal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-history
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/history
      operations:
      - name: flowrunhistoryapiaccountsaccountidworkspacesworkspaceidflowrunshistorypost
        method: POST
        description: Flow Run History
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-lateness
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/lateness
      operations:
      - name: averageflowrunlatenessapiaccountsaccountidworkspacesworkspaceidflowrunslatenesspost
        method: POST
        description: Average Flow Run Lateness
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-paginate
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/paginate
      operations:
      - name: paginateflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunspaginatepost
        method: POST
        description: Paginate Flow Runs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}
      operations:
      - name: updateflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidpatch
        method: PATCH
        description: Update Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: readflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidget
        method: GET
        description: Read Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
      - name: deleteflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsiddelete
        method: DELETE
        description: Delete Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-artifacts
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/artifacts
      operations:
      - name: getflowrunartifactsapiaccountsaccountidworkspacesworkspaceidflowrunsidartifactsget
        method: GET
        description: Get Flow Run Artifacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: depth
          in: query
          type: string
          description: Optional depth limit for recursion (0 = flow run only)
        - name: since
          in: query
          type: string
          description: Only return artifacts created on or after this timestamp
        - name: until
          in: query
          type: string
          description: Only return artifacts created on or before this timestamp
        - name: sort
          in: query
          type: string
          description: Sort order by creation time (asc or desc)
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-assets-materializat
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/assets/materializations
      operations:
      - name: getflowrunmaterializationsapiaccountsaccountidworkspacesworkspaceidflowrunsidassetsmaterializationsget
        method: GET
        description: Get Flow Run Materializations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: depth
          in: query
          type: string
          description: 'Optional depth limit based on execution hierarchy. depth=0: only the root flow run. depth=1: root
            + direct children (tasks and subflows). None: unlimited depth '
        - name: since
          in: query
          type: string
          description: Only return materializations on or after this timestamp
        - name: until
          in: query
          type: string
          description: Only return materializations on or before this timestamp
        - name: sort
          in: query
          type: string
          description: Sort order by occurred time (asc or desc)
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-assets-references
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/assets/references
      operations:
      - name: getflowrunreferencesapiaccountsaccountidworkspacesworkspaceidflowrunsidassetsreferencesget
        method: GET
        description: Get Flow Run References
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: depth
          in: query
          type: string
          description: 'Optional depth limit based on execution hierarchy. depth=0: only the root flow run. depth=1: root
            + direct children (tasks and subflows). None: unlimited depth '
        - name: since
          in: query
          type: string
          description: Only return references on or after this timestamp
        - name: until
          in: query
          type: string
          description: Only return references on or before this timestamp
        - name: sort
          in: query
          type: string
          description: Sort order by occurred time (asc or desc)
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-graph
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/graph
      operations:
      - name: readflowrungraphv1apiaccountsaccountidworkspacesworkspaceidflowrunsidgraphget
        method: GET
        description: Read Flow Run Graph V1
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-graph-v2
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/graph-v2
      operations:
      - name: readflowrungraphv2apiaccountsaccountidworkspacesworkspaceidflowrunsidgraphv2get
        method: GET
        description: Read Flow Run Graph V2
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: since
          in: query
          type: string
          description: Only include runs that start or end after this time.
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-input
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/input
      operations:
      - name: createflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputpost
        method: POST
        description: Create Flow Run Input
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-input-filter
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/input/filter
      operations:
      - name: filterflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputfilterpost
        method: POST
        description: Filter Flow Run Input
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-input-key
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/input/{key}
      operations:
      - name: readflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputkeyget
        method: GET
        description: Read Flow Run Input
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: key
          in: path
          type: string
          description: The input key
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
      - name: deleteflowruninputapiaccountsaccountidworkspacesworkspaceidflowrunsidinputkeydelete
        method: DELETE
        description: Delete Flow Run Input
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: key
          in: path
          type: string
          description: The input key
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-labels
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/labels
      operations:
      - name: updateflowrunlabelsapiaccountsaccountidworkspacesworkspaceidflowrunsidlabelspatch
        method: PATCH
        description: Update Flow Run Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-resume
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/resume
      operations:
      - name: resumeflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsidresumepost
        method: POST
        description: Resume Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-flow_runs-id-set_state
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{id}/set_state
      operations:
      - name: setflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsidsetstatepost
        method: POST
        description: Set Flow Run State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: id
          in: path
          type: string
          description: The flow run id
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-ui-flow_runs-count-task-runs
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/ui/flow_runs/count-task-runs
      operations:
      - name: counttaskrunsbyflowrunapiaccountsaccountidworkspacesworkspaceiduiflowrunscounttaskrunspost
        method: POST
        description: Count Task Runs By Flow Run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: account_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-accounts-account_id-workspaces-workspace_id-ui-flow_runs-history
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/ui/flow_runs/history
      operations:
      - name: readflowrunhistoryapiaccountsaccountidworkspacesworkspaceiduiflowrunshistorypost
        method: POST
        description: Read Flow Run History
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-accounts-account_id-workspaces-workspace_id-ui-flow_runs-history-v2
      path: /api/accounts/{account_id}/workspaces/{workspace_id}/ui/flow_runs/history-v2
      operations:
      - name: readflowrunhistoryv2apiaccountsaccountidworkspacesworkspaceiduiflowrunshistoryv2post
        method: POST
        description: Read Flow Run History V2
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: path
          type: string
          required: true
        - name: workspace_id
          in: path
          type: string
          required: true
        - name: x-prefect-api-version
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
  exposes:
  - type: rest
    namespace: prefect-flow-runs-rest
    port: 8080
    description: REST adapter for Prefect Cloud API — Flow Runs. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs.
      operations:
      - method: POST
        name: createflowrunapiaccountsaccountidworkspacesworkspaceidflowrunspost
        description: Create Flow Run
        call: prefect-flow-runs.createflowrunapiaccountsaccountidworkspacesworkspaceidflowrunspost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/bulk-delete
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-bulk-delete
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-bulk_delete.
      operations:
      - method: POST
        name: bulkdeleteflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsbulkdeletepost
        description: Bulk Delete Flow Runs
        call: prefect-flow-runs.bulkdeleteflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsbulkdeletepost
        with:
          workspace_id: rest.workspace_id
          account_id: rest.account_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/bulk-set-state
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-bulk-set-state
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-bulk_set_state.
      operations:
      - method: POST
        name: bulksetflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsbulksetstatepost
        description: Bulk Set Flow Run State
        call: prefect-flow-runs.bulksetflowrunstateapiaccountsaccountidworkspacesworkspaceidflowrunsbulksetstatepost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/count
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-count
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-count.
      operations:
      - method: POST
        name: countflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunscountpost
        description: Count Flow Runs
        call: prefect-flow-runs.countflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunscountpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/filter
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-filter
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-filter.
      operations:
      - method: POST
        name: readflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsfilterpost
        description: Read Flow Runs
        call: prefect-flow-runs.readflowrunsapiaccountsaccountidworkspacesworkspaceidflowrunsfilterpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/filter-minimal
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-filter-minimal
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-filter-minimal.
      operations:
      - method: POST
        name: readflowrunsminimalapiaccountsaccountidworkspacesworkspaceidflowrunsfilterminimalpost
        description: Read Flow Runs Minimal
        call: prefect-flow-runs.readflowrunsminimalapiaccountsaccountidworkspacesworkspaceidflowrunsfilterminimalpost
        with:
          account_id: rest.account_id
          workspace_id: rest.workspace_id
          x-prefect-api-version: rest.x-prefect-api-version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/history
      name: api-accounts-account-id-workspaces-workspace-id-flow-runs-history
      description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-history.
      operations:
      - method: POST
        name: flowrunhistoryapiaccountsaccountidworkspacesworkspaceidflowrunshistorypost
        description: Flow Run History
        call: prefect-flow-runs.flowrunhistoryapiaccountsaccountid

# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/prefect/refs/heads/main/capabilities/prefect-flow-runs.yaml