v1

latestOpenAPI 3.1.0raw.githubusercontent.com2024-11-08170291390.5 KB
Flow Run Notification Policies

Read Flow Run Notification Policies

Query for flow run notification policies.

post/api/flow_run_notification_policies/filter

Headers

x-prefect-api-versionstring

Request body

offsetinteger
limitinteger

Defaults to PREFECT_API_DEFAULT_LIMIT if not provided.

Response

Successful Response

idstring uuid
createdstring date-time
updatedstring date-time
is_activeboolean

Whether the policy is currently active

state_namesstring[] required

The flow run states that trigger notifications

tagsstring[] required

The flow run tags that trigger notifications (set [] to disable)

block_document_idstring uuid required

The block document ID used for sending notifications

message_templatestring

A templatable notification message. Use {braces} to add variables. Valid variables include: 'flow_id', 'flow_name', 'flow_run_id', 'flow_run_name', 'flow_run_notification_policy_id', 'flow_run_parameters', 'flow_run_state_message', 'flow_run_state_name', 'flow_run_state_timestamp', 'flow_run_state_type', 'flow_run_url'

Example response

[
  {
    "message_template": "Flow run {flow_run_name} with id {flow_run_id} entered state {flow_run_state_name}."
  }
]