Skip to content

Events Endpoints

This is a very custom OpenAPI schema


Overview

Method Endpoint Description
GET /api/v1/events/tasks/{task_id} Stream Task Events
POST /api/v1/events/token Mint Token
GET /api/v1/events/workflows/{workflow_id} Stream Workflow Events

API Reference

Custom API - Events 1.0.0

This is a very custom OpenAPI schema


Events


POST /api/v1/events/token

Mint Token

Description

Mint a short-lived scoped token for the SSE endpoints.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token

Request body

{
    "workflow_id": null,
    "task_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "workflow_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Workflow Id"
        },
        "task_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Task Id"
        }
    },
    "type": "object",
    "title": "MintEventsTokenRequest",
    "description": "Body for POST /events/token — exactly one id, or neither (wildcard scope)."
}

Responses

{
    "token": "string",
    "expires_in": 0,
    "scope": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "token": {
            "type": "string",
            "title": "Token"
        },
        "expires_in": {
            "type": "integer",
            "title": "Expires In"
        },
        "scope": {
            "type": "string",
            "title": "Scope"
        }
    },
    "type": "object",
    "required": [
        "token",
        "expires_in",
        "scope"
    ],
    "title": "MintEventsTokenResponse",
    "description": "Minted short-lived events token."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/events/workflows/{workflow_id}

Stream Workflow Events

Description

Follow a workflow's event stream over SSE (snapshot frame first).

Input parameters

Parameter In Type Default Nullable Description
last_event_id query No
token query No
workflow_id path string No

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/events/tasks/{task_id}

Stream Task Events

Description

Follow a task's event stream over SSE.

The per-task stream carries status TRANSITIONS only (no mid-task progress ticks); its wire format is consumed read-only and unchanged.

Input parameters

Parameter In Type Default Nullable Description
last_event_id query No
task_id path string No
token query No

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

HTTPValidationError

Name Type Description
detail Array<ValidationError>

MintEventsTokenRequest

Name Type Description
task_id
workflow_id

MintEventsTokenResponse

Name Type Description
expires_in integer
scope string
token string

ValidationError

Name Type Description
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
HTTPBearer http bearer