Prefect · Capability
Prefect Cloud API — Events
Prefect Cloud API — Events. 12 operations. Lead operation: Create Account Events. Self-contained Naftiko capability covering one Prefect business surface.
What You Can Do
POST
Createaccounteventsapiaccountsaccountideventspost
— Create Account Events
/v1/api/accounts/{account-id}/events
POST
Createaccounteventsapiaccountsaccountideventspost
— Create Account Events
/v1/api/accounts/{account-id}/events
POST
Countaccounteventsapiaccountsaccountideventscountbycountablepost
— Count Account Events
/v1/api/accounts/{account-id}/events/count-by/{countable}
POST
Readaccounteventsapiaccountsaccountideventsfilterpost
— Read Account Events
/v1/api/accounts/{account-id}/events/filter
GET
Readaccounteventspageapiaccountsaccountideventsfilternextget
— Read Account Events Page
/v1/api/accounts/{account-id}/events/filter/next
POST
Createworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventspost
— Create Workspace Events
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/events
POST
Countworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventscountbycountablepost
— Count Workspace Events
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/count-by/{countable}
POST
Readworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventsfilterpost
— Read Workspace Events
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/filter
GET
Readworkspaceeventspageapiaccountsaccountidworkspacesworkspaceideventsfilternextget
— Read Workspace Events Page
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/filter/next
GET
Geteventsforflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsflowrunideventsget
— Get Events For Flow Run
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{flow-run-id}/events
GET
Listtagsapiaccountsaccountidworkspacesworkspaceidtagsget
— List Tags
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/tags
DELETE
Deleteworkspacetagapiaccountsaccountidworkspacesworkspaceidtagsdelete
— Delete Workspace Tag
/v1/api/accounts/{account-id}/workspaces/{workspace-id}/tags
MCP Tools
create-account-events
Create Account Events
create-account-events-2
Create Account Events
count-account-events
Count Account Events
read-account-events
Read Account Events
read-account-events-page
Read Account Events Page
read-only
idempotent
create-workspace-events
Create Workspace Events
count-workspace-events
Count Workspace Events
read-workspace-events
Read Workspace Events
read-workspace-events-page
Read Workspace Events Page
read-only
idempotent
get-events-flow-run
Get Events For Flow Run
read-only
idempotent
list-tags
List Tags
read-only
idempotent
delete-workspace-tag
Delete Workspace Tag
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Prefect Cloud API — Events
description: 'Prefect Cloud API — Events. 12 operations. Lead operation: Create Account Events. Self-contained Naftiko capability
covering one Prefect business surface.'
tags:
- Prefect
- Events
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
PREFECT_API_KEY: PREFECT_API_KEY
capability:
consumes:
- type: http
namespace: prefect-events
baseUri: ''
description: Prefect Cloud API — Events business capability. Self-contained, no shared references.
resources:
- name: api-accounts-account_id-events
path: /api/accounts/{account_id}/events
operations:
- name: createaccounteventsapiaccountsaccountideventspost
method: POST
description: Create Account Events
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: account_id
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: createaccounteventsapiaccountsaccountideventspost
method: POST
description: Create Account Events
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: account_id
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: api-accounts-account_id-events-count-by-countable
path: /api/accounts/{account_id}/events/count-by/{countable}
operations:
- name: countaccounteventsapiaccountsaccountideventscountbycountablepost
method: POST
description: Count Account Events
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: countable
in: path
type: string
required: true
- name: account_id
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: api-accounts-account_id-events-filter
path: /api/accounts/{account_id}/events/filter
operations:
- name: readaccounteventsapiaccountsaccountideventsfilterpost
method: POST
description: Read Account Events
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: account_id
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: api-accounts-account_id-events-filter-next
path: /api/accounts/{account_id}/events/filter/next
operations:
- name: readaccounteventspageapiaccountsaccountideventsfilternextget
method: GET
description: Read Account Events Page
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: account_id
in: path
type: string
required: true
- name: page-token
in: query
type: string
required: true
- name: api-accounts-account_id-workspaces-workspace_id-events
path: /api/accounts/{account_id}/workspaces/{workspace_id}/events
operations:
- name: createworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventspost
method: POST
description: Create Workspace Events
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: body
in: body
type: object
description: Request body (JSON).
required: true
- name: api-accounts-account_id-workspaces-workspace_id-events-count-by-countable
path: /api/accounts/{account_id}/workspaces/{workspace_id}/events/count-by/{countable}
operations:
- name: countworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventscountbycountablepost
method: POST
description: Count Workspace Events
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: countable
in: path
type: string
required: true
- name: workspace_id
in: path
type: string
required: true
- name: account_id
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: api-accounts-account_id-workspaces-workspace_id-events-filter
path: /api/accounts/{account_id}/workspaces/{workspace_id}/events/filter
operations:
- name: readworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventsfilterpost
method: POST
description: Read Workspace Events
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: body
in: body
type: object
description: Request body (JSON).
required: false
- name: api-accounts-account_id-workspaces-workspace_id-events-filter-next
path: /api/accounts/{account_id}/workspaces/{workspace_id}/events/filter/next
operations:
- name: readworkspaceeventspageapiaccountsaccountidworkspacesworkspaceideventsfilternextget
method: GET
description: Read Workspace Events Page
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: page-token
in: query
type: string
required: true
- name: api-accounts-account_id-workspaces-workspace_id-flow_runs-flow_run_id-events
path: /api/accounts/{account_id}/workspaces/{workspace_id}/flow_runs/{flow_run_id}/events
operations:
- name: geteventsforflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsflowrunideventsget
method: GET
description: Get Events For Flow Run
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: flow_run_id
in: path
type: string
required: true
- name: account_id
in: path
type: string
required: true
- name: workspace_id
in: path
type: string
required: true
- name: offset
in: query
type: integer
- name: order
in: query
type: string
- name: with_task_runs
in: query
type: boolean
- name: limit
in: query
type: integer
description: Defaults to PREFECT_ORION_API_DEFAULT_LIMIT if not provided.
- name: if-none-match
in: header
type: string
- name: api-accounts-account_id-workspaces-workspace_id-tags
path: /api/accounts/{account_id}/workspaces/{workspace_id}/tags
operations:
- name: listtagsapiaccountsaccountidworkspacesworkspaceidtagsget
method: GET
description: List Tags
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: search
in: query
type: string
description: A string to search for in the tag names
- name: page
in: query
type: integer
description: The page number of tags to return.
- name: sort
in: query
type: string
description: Sort tags by name (A→Z or Z→A) or recency (most/least recently seen first)
- name: limit
in: query
type: integer
description: Defaults to PREFECT_ORION_API_DEFAULT_LIMIT if not provided.
- name: deleteworkspacetagapiaccountsaccountidworkspacesworkspaceidtagsdelete
method: DELETE
description: Delete Workspace Tag
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: tag
in: query
type: string
description: The tag name
required: true
exposes:
- type: rest
namespace: prefect-events-rest
port: 8080
description: REST adapter for Prefect Cloud API — Events. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/api/accounts/{account-id}/events
name: api-accounts-account-id-events
description: REST surface for api-accounts-account_id-events.
operations:
- method: POST
name: createaccounteventsapiaccountsaccountideventspost
description: Create Account Events
call: prefect-events.createaccounteventsapiaccountsaccountideventspost
with:
account_id: rest.account_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: POST
name: createaccounteventsapiaccountsaccountideventspost
description: Create Account Events
call: prefect-events.createaccounteventsapiaccountsaccountideventspost
with:
account_id: rest.account_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/events/count-by/{countable}
name: api-accounts-account-id-events-count-by-countable
description: REST surface for api-accounts-account_id-events-count-by-countable.
operations:
- method: POST
name: countaccounteventsapiaccountsaccountideventscountbycountablepost
description: Count Account Events
call: prefect-events.countaccounteventsapiaccountsaccountideventscountbycountablepost
with:
countable: rest.countable
account_id: rest.account_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/events/filter
name: api-accounts-account-id-events-filter
description: REST surface for api-accounts-account_id-events-filter.
operations:
- method: POST
name: readaccounteventsapiaccountsaccountideventsfilterpost
description: Read Account Events
call: prefect-events.readaccounteventsapiaccountsaccountideventsfilterpost
with:
account_id: rest.account_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/events/filter/next
name: api-accounts-account-id-events-filter-next
description: REST surface for api-accounts-account_id-events-filter-next.
operations:
- method: GET
name: readaccounteventspageapiaccountsaccountideventsfilternextget
description: Read Account Events Page
call: prefect-events.readaccounteventspageapiaccountsaccountideventsfilternextget
with:
account_id: rest.account_id
page-token: rest.page-token
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/events
name: api-accounts-account-id-workspaces-workspace-id-events
description: REST surface for api-accounts-account_id-workspaces-workspace_id-events.
operations:
- method: POST
name: createworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventspost
description: Create Workspace Events
call: prefect-events.createworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventspost
with:
account_id: rest.account_id
workspace_id: rest.workspace_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/count-by/{countable}
name: api-accounts-account-id-workspaces-workspace-id-events-count-by-countable
description: REST surface for api-accounts-account_id-workspaces-workspace_id-events-count-by-countable.
operations:
- method: POST
name: countworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventscountbycountablepost
description: Count Workspace Events
call: prefect-events.countworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventscountbycountablepost
with:
countable: rest.countable
workspace_id: rest.workspace_id
account_id: rest.account_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/filter
name: api-accounts-account-id-workspaces-workspace-id-events-filter
description: REST surface for api-accounts-account_id-workspaces-workspace_id-events-filter.
operations:
- method: POST
name: readworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventsfilterpost
description: Read Workspace Events
call: prefect-events.readworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventsfilterpost
with:
account_id: rest.account_id
workspace_id: rest.workspace_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/events/filter/next
name: api-accounts-account-id-workspaces-workspace-id-events-filter-next
description: REST surface for api-accounts-account_id-workspaces-workspace_id-events-filter-next.
operations:
- method: GET
name: readworkspaceeventspageapiaccountsaccountidworkspacesworkspaceideventsfilternextget
description: Read Workspace Events Page
call: prefect-events.readworkspaceeventspageapiaccountsaccountidworkspacesworkspaceideventsfilternextget
with:
account_id: rest.account_id
workspace_id: rest.workspace_id
page-token: rest.page-token
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/flow-runs/{flow-run-id}/events
name: api-accounts-account-id-workspaces-workspace-id-flow-runs-flow-run-id-events
description: REST surface for api-accounts-account_id-workspaces-workspace_id-flow_runs-flow_run_id-events.
operations:
- method: GET
name: geteventsforflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsflowrunideventsget
description: Get Events For Flow Run
call: prefect-events.geteventsforflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsflowrunideventsget
with:
flow_run_id: rest.flow_run_id
account_id: rest.account_id
workspace_id: rest.workspace_id
offset: rest.offset
order: rest.order
with_task_runs: rest.with_task_runs
limit: rest.limit
if-none-match: rest.if-none-match
outputParameters:
- type: object
mapping: $.
- path: /v1/api/accounts/{account-id}/workspaces/{workspace-id}/tags
name: api-accounts-account-id-workspaces-workspace-id-tags
description: REST surface for api-accounts-account_id-workspaces-workspace_id-tags.
operations:
- method: GET
name: listtagsapiaccountsaccountidworkspacesworkspaceidtagsget
description: List Tags
call: prefect-events.listtagsapiaccountsaccountidworkspacesworkspaceidtagsget
with:
account_id: rest.account_id
workspace_id: rest.workspace_id
search: rest.search
page: rest.page
sort: rest.sort
limit: rest.limit
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: deleteworkspacetagapiaccountsaccountidworkspacesworkspaceidtagsdelete
description: Delete Workspace Tag
call: prefect-events.deleteworkspacetagapiaccountsaccountidworkspacesworkspaceidtagsdelete
with:
account_id: rest.account_id
workspace_id: rest.workspace_id
tag: rest.tag
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: prefect-events-mcp
port: 9090
transport: http
description: MCP adapter for Prefect Cloud API — Events. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: create-account-events
description: Create Account Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.createaccounteventsapiaccountsaccountideventspost
with:
account_id: tools.account_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: create-account-events-2
description: Create Account Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.createaccounteventsapiaccountsaccountideventspost
with:
account_id: tools.account_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: count-account-events
description: Count Account Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.countaccounteventsapiaccountsaccountideventscountbycountablepost
with:
countable: tools.countable
account_id: tools.account_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: read-account-events
description: Read Account Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.readaccounteventsapiaccountsaccountideventsfilterpost
with:
account_id: tools.account_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: read-account-events-page
description: Read Account Events Page
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-events.readaccounteventspageapiaccountsaccountideventsfilternextget
with:
account_id: tools.account_id
page-token: tools.page-token
outputParameters:
- type: object
mapping: $.
- name: create-workspace-events
description: Create Workspace Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.createworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventspost
with:
account_id: tools.account_id
workspace_id: tools.workspace_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: count-workspace-events
description: Count Workspace Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.countworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventscountbycountablepost
with:
countable: tools.countable
workspace_id: tools.workspace_id
account_id: tools.account_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: read-workspace-events
description: Read Workspace Events
hints:
readOnly: false
destructive: false
idempotent: false
call: prefect-events.readworkspaceeventsapiaccountsaccountidworkspacesworkspaceideventsfilterpost
with:
account_id: tools.account_id
workspace_id: tools.workspace_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: read-workspace-events-page
description: Read Workspace Events Page
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-events.readworkspaceeventspageapiaccountsaccountidworkspacesworkspaceideventsfilternextget
with:
account_id: tools.account_id
workspace_id: tools.workspace_id
page-token: tools.page-token
outputParameters:
- type: object
mapping: $.
- name: get-events-flow-run
description: Get Events For Flow Run
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-events.geteventsforflowrunapiaccountsaccountidworkspacesworkspaceidflowrunsflowrunideventsget
with:
flow_run_id: tools.flow_run_id
account_id: tools.account_id
workspace_id: tools.workspace_id
offset: tools.offset
order: tools.order
with_task_runs: tools.with_task_runs
limit: tools.limit
if-none-match: tools.if-none-match
outputParameters:
- type: object
mapping: $.
- name: list-tags
description: List Tags
hints:
readOnly: true
destructive: false
idempotent: true
call: prefect-events.listtagsapiaccountsaccountidworkspacesworkspaceidtagsget
with:
account_id: tools.account_id
workspace_id: tools.workspace_id
search: tools.search
page: tools.page
sort: tools.sort
limit: tools.limit
outputParameters:
- type: object
mapping: $.
- name: delete-workspace-tag
description: Delete Workspace Tag
hints:
readOnly: false
destructive: true
idempotent: true
call: prefect-events.deleteworkspacetagapiaccountsaccountidworkspacesworkspaceidtagsdelete
with:
account_id: tools.account_id
workspace_id: tools.workspace_id
tag: tools.tag
outputParameters:
- type: object
mapping: $.