Skip to content

Monitoring Endpoints

Queue, worker, and system monitoring.


Overview

Queues

Method Endpoint Description
GET /monitoring/queues Queue depths and status

Workers

Method Endpoint Description
GET /monitoring/workers Worker pool status
GET /monitoring/workers/health Worker health checks

Tasks

Method Endpoint Description
GET /monitoring/tasks Recent task activity
GET /monitoring/tasks/{task_id} Task details
GET /monitoring/tasks/{task_id}/media Task media assets

Workflows

Method Endpoint Description
GET /monitoring/workflows Active workflows
GET /monitoring/workflows/stats Workflow statistics
GET /monitoring/workflows/{workflow_id} Workflow details

System

Method Endpoint Description
GET /monitoring/stats System-wide statistics

API Reference

Custom API - Monitoring 1.0.0

This is a very custom OpenAPI schema


Monitoring


GET /api/v1/monitoring/tasks

List Monitored Tasks

Description

List tasks with filtering, pagination, and sorting.

Returns a paginated list of tasks with computed duration and error status. All filters are optional and can be combined.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
created_after query No Filter tasks created after this datetime
created_before query No Filter tasks created before this datetime
origin_instance query No Filter by origin instance
origin_tenant_id query No Filter by origin tenant ID
origin_zone query No Filter by origin zone
page query integer 1 No Page number (1-indexed)
page_size query integer 50 No Items per page
provider_type query No Filter by provider type
search query No Search by task ID prefix
sort_by query string created_at No Sort field
sort_order query string desc No Sort order
status query No Filter by status
task_type query No Filter by task type

Responses

{
    "items": [
        {
            "id": "5e2d80c4-cbbf-48d0-96f2-af6041348ea7",
            "task_type": "GENERATION",
            "provider_type": null,
            "status": "PENDING",
            "progress": 10.12,
            "origin_instance": "string",
            "origin_zone": null,
            "origin_tenant_id": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "started_at": null,
            "completed_at": null,
            "duration_ms": null,
            "has_error": true
        }
    ],
    "total": 0,
    "page": 0,
    "page_size": 0,
    "pages": 0
}
⚠️ 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": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/TaskListItem"
            },
            "type": "array",
            "title": "Items"
        },
        "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of tasks matching filters"
        },
        "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number (1-indexed)"
        },
        "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Number of items per page"
        },
        "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
        }
    },
    "type": "object",
    "required": [
        "items",
        "total",
        "page",
        "page_size",
        "pages"
    ],
    "title": "TaskListResponse",
    "description": "Paginated task list response."
}

{
    "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/monitoring/tasks/{task_id}

Get Monitored Task

Description

Get detailed task information including configuration and task-type specific fields.

Input parameters

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

Responses

{
    "id": "e68f9b70-d52f-46e2-b038-0ba5ea210286",
    "task_type": "GENERATION",
    "provider_type": null,
    "status": "PENDING",
    "progress": 10.12,
    "origin_instance": "string",
    "origin_zone": null,
    "origin_tenant_id": null,
    "origin_reference": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "started_at": null,
    "completed_at": null,
    "duration_ms": null,
    "queue_name": "string",
    "priority": 0,
    "celery_task_id": null,
    "service_task_id": null,
    "executor_type": null,
    "executor_instance": null,
    "config": null,
    "webhook_url": null,
    "errors": null,
    "retry_count": 0,
    "is_resumed": true,
    "resume_attempt_count": 0,
    "last_resume_attempt": null,
    "service_requests": null,
    "task_data": {}
}
⚠️ 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": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "task_type": {
            "$ref": "#/components/schemas/TaskType"
        },
        "provider_type": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ProviderType"
                },
                {
                    "type": "null"
                }
            ]
        },
        "status": {
            "$ref": "#/components/schemas/TaskStatus"
        },
        "progress": {
            "type": "number",
            "title": "Progress",
            "default": 0.0
        },
        "origin_instance": {
            "type": "string",
            "title": "Origin Instance"
        },
        "origin_zone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Zone"
        },
        "origin_tenant_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Tenant Id"
        },
        "origin_reference": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Reference"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "started_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Started At"
        },
        "completed_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Completed At"
        },
        "duration_ms": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration Ms",
            "description": "Duration in milliseconds"
        },
        "queue_name": {
            "type": "string",
            "title": "Queue Name",
            "description": "Celery queue name",
            "default": "inference"
        },
        "priority": {
            "type": "integer",
            "title": "Priority",
            "description": "Task priority (higher = more priority)",
            "default": 0
        },
        "celery_task_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Celery Task Id"
        },
        "service_task_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Service Task Id"
        },
        "executor_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Executor Type"
        },
        "executor_instance": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Executor Instance"
        },
        "config": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Config"
        },
        "webhook_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Webhook Url",
            "description": "Webhook URL for notifications"
        },
        "errors": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Errors"
        },
        "retry_count": {
            "type": "integer",
            "title": "Retry Count",
            "default": 0
        },
        "is_resumed": {
            "type": "boolean",
            "title": "Is Resumed",
            "description": "Whether task was resumed",
            "default": false
        },
        "resume_attempt_count": {
            "type": "integer",
            "title": "Resume Attempt Count",
            "description": "Number of resume attempts",
            "default": 0
        },
        "last_resume_attempt": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Last Resume Attempt",
            "description": "Timestamp of last resume attempt"
        },
        "service_requests": {
            "anyOf": [
                {
                    "items": {
                        "additionalProperties": true,
                        "type": "object"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Service Requests",
            "description": "Log of external service requests made during task processing"
        },
        "task_data": {
            "additionalProperties": true,
            "type": "object",
            "title": "Task Data",
            "description": "Task-type specific fields (prompt, width, height, result_image_path, etc.)"
        }
    },
    "type": "object",
    "required": [
        "id",
        "task_type",
        "status",
        "origin_instance",
        "created_at",
        "updated_at"
    ],
    "title": "TaskDetailResponse",
    "description": "Detailed task view with full configuration."
}

{
    "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/monitoring/tasks/{task_id}/media

Get Task Media

Description

Get input and output media URLs for a task.

Returns URLs that can be used directly in or

Input parameters

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

Responses

{
    "task_id": "27039d36-5dd1-4817-828c-5140560b8b04",
    "inputs": [
        {
            "name": "string",
            "path": "string",
            "url": "string",
            "media_type": "string"
        }
    ],
    "outputs": 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 response body
{
    "properties": {
        "task_id": {
            "type": "string",
            "format": "uuid",
            "title": "Task Id"
        },
        "inputs": {
            "items": {
                "$ref": "#/components/schemas/MediaItem"
            },
            "type": "array",
            "title": "Inputs",
            "description": "Input media files"
        },
        "outputs": {
            "items": {
                "$ref": "#/components/schemas/MediaItem"
            },
            "type": "array",
            "title": "Outputs",
            "description": "Output media files"
        }
    },
    "type": "object",
    "required": [
        "task_id"
    ],
    "title": "TaskMediaResponse",
    "description": "Input and output media for a task."
}

{
    "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/monitoring/stats

Get Monitoring Stats

Description

Get aggregate statistics for the monitoring dashboard.

Returns counts by status, provider, and task type, plus time-based metrics.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
origin_instance query No Filter by origin instance
origin_zone query No Filter by origin zone

Responses

{
    "total_tasks": 0,
    "by_status": {},
    "by_provider": {},
    "by_task_type": {},
    "tasks_last_hour": 0,
    "tasks_last_24h": 0
}
⚠️ 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": {
        "total_tasks": {
            "type": "integer",
            "title": "Total Tasks",
            "description": "Total number of tasks"
        },
        "by_status": {
            "additionalProperties": {
                "type": "integer"
            },
            "type": "object",
            "title": "By Status",
            "description": "Task count by status (PENDING, EXECUTING, COMPLETED, FAILED, CANCELLED)"
        },
        "by_provider": {
            "additionalProperties": {
                "type": "integer"
            },
            "type": "object",
            "title": "By Provider",
            "description": "Task count by provider type"
        },
        "by_task_type": {
            "additionalProperties": {
                "type": "integer"
            },
            "type": "object",
            "title": "By Task Type",
            "description": "Task count by task type"
        },
        "tasks_last_hour": {
            "type": "integer",
            "title": "Tasks Last Hour",
            "description": "Tasks created in the last hour",
            "default": 0
        },
        "tasks_last_24h": {
            "type": "integer",
            "title": "Tasks Last 24H",
            "description": "Tasks created in the last 24 hours",
            "default": 0
        }
    },
    "type": "object",
    "required": [
        "total_tasks"
    ],
    "title": "AggregateStats",
    "description": "Aggregate statistics for the monitoring dashboard."
}

{
    "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/monitoring/workflows

List Monitored Workflows

Description

List workflows with filtering, pagination, and sorting.

Returns a paginated list of workflows with computed duration and error status. All filters are optional and can be combined.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
created_after query No Filter workflows created after this datetime
created_before query No Filter workflows created before this datetime
origin_instance query No Filter by origin instance
origin_tenant_id query No Filter by origin tenant ID
origin_zone query No Filter by origin zone
page query integer 1 No Page number (1-indexed)
page_size query integer 50 No Items per page
search query No Search by workflow name or ID prefix
sort_by query string created_at No Sort field
sort_order query string desc No Sort order
status query No Filter by status

Responses

{
    "items": [
        {
            "id": "7f3de727-66b8-4124-a288-296b2479f9a9",
            "name": "string",
            "description": null,
            "status": "PENDING",
            "total_steps": 0,
            "completed_steps": 0,
            "progress": 10.12,
            "current_step": null,
            "final_step_id": null,
            "origin_instance": "string",
            "origin_zone": null,
            "origin_tenant_id": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "started_at": null,
            "completed_at": null,
            "duration_ms": null,
            "has_error": true
        }
    ],
    "total": 0,
    "page": 0,
    "page_size": 0,
    "pages": 0
}
⚠️ 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": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/WorkflowListItem"
            },
            "type": "array",
            "title": "Items"
        },
        "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of workflows matching filters"
        },
        "page": {
            "type": "integer",
            "title": "Page",
            "description": "Current page number (1-indexed)"
        },
        "page_size": {
            "type": "integer",
            "title": "Page Size",
            "description": "Number of items per page"
        },
        "pages": {
            "type": "integer",
            "title": "Pages",
            "description": "Total number of pages"
        }
    },
    "type": "object",
    "required": [
        "items",
        "total",
        "page",
        "page_size",
        "pages"
    ],
    "title": "MonitoringWorkflowListResponse",
    "description": "Paginated workflow list response for monitoring."
}

{
    "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/monitoring/workflows/stats

Get Workflow Monitoring Stats

Description

Get aggregate statistics for workflow monitoring.

Returns counts by status and time-based metrics.

Input parameters

Parameter In Type Default Nullable Description
HTTPBearer header string N/A No JWT Bearer token
origin_instance query No Filter by origin instance
origin_zone query No Filter by origin zone

Responses

{
    "total_workflows": 0,
    "by_status": {},
    "workflows_last_hour": 0,
    "workflows_last_24h": 0,
    "avg_steps_per_workflow": 10.12
}
⚠️ 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": {
        "total_workflows": {
            "type": "integer",
            "title": "Total Workflows",
            "description": "Total number of workflows"
        },
        "by_status": {
            "additionalProperties": {
                "type": "integer"
            },
            "type": "object",
            "title": "By Status",
            "description": "Workflow count by status (PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CANCELLED)"
        },
        "workflows_last_hour": {
            "type": "integer",
            "title": "Workflows Last Hour",
            "description": "Workflows created in the last hour",
            "default": 0
        },
        "workflows_last_24h": {
            "type": "integer",
            "title": "Workflows Last 24H",
            "description": "Workflows created in the last 24 hours",
            "default": 0
        },
        "avg_steps_per_workflow": {
            "type": "number",
            "title": "Avg Steps Per Workflow",
            "description": "Average number of steps per workflow",
            "default": 0.0
        }
    },
    "type": "object",
    "required": [
        "total_workflows"
    ],
    "title": "WorkflowAggregateStats",
    "description": "Aggregate statistics for workflow monitoring."
}

{
    "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/monitoring/workflows/{workflow_id}

Get Monitored Workflow

Description

Get detailed workflow information including all steps.

Steps are returned in topological order (respecting dependencies).

Input parameters

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

Responses

{
    "id": "bd48b2a4-c2fa-47a7-9caf-dc7020d728ed",
    "name": "string",
    "description": null,
    "status": "PENDING",
    "total_steps": 0,
    "completed_steps": 0,
    "progress": 10.12,
    "current_step": null,
    "final_step_id": null,
    "canvas_task_id": null,
    "origin_instance": "string",
    "origin_zone": null,
    "origin_tenant_id": null,
    "origin_reference": null,
    "config": {},
    "webhook_url": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "updated_at": "2022-04-13T15:42:05.901Z",
    "started_at": null,
    "completed_at": null,
    "duration_ms": null,
    "error_message": null,
    "errors": [
        "string"
    ],
    "steps": [
        {
            "id": "e1521730-ede2-4025-b108-821c20b3dd61",
            "step_id": "string",
            "task_type": "string",
            "status": "PENDING",
            "task_id": null,
            "dependencies": [
                "string"
            ],
            "input_mappings": [
                {}
            ],
            "config": {},
            "started_at": null,
            "completed_at": null,
            "duration_ms": null,
            "error_message": null,
            "retry_count": 0,
            "max_retries": 0,
            "result": 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 response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "description": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Description"
        },
        "status": {
            "$ref": "#/components/schemas/WorkflowStatus"
        },
        "total_steps": {
            "type": "integer",
            "title": "Total Steps",
            "default": 0
        },
        "completed_steps": {
            "type": "integer",
            "title": "Completed Steps",
            "default": 0
        },
        "progress": {
            "type": "number",
            "title": "Progress",
            "default": 0.0
        },
        "current_step": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Current Step"
        },
        "final_step_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Final Step Id"
        },
        "canvas_task_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Canvas Task Id"
        },
        "origin_instance": {
            "type": "string",
            "title": "Origin Instance"
        },
        "origin_zone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Zone"
        },
        "origin_tenant_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Tenant Id"
        },
        "origin_reference": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Reference"
        },
        "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config",
            "description": "Workflow configuration"
        },
        "webhook_url": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Webhook Url"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
        },
        "started_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Started At"
        },
        "completed_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Completed At"
        },
        "duration_ms": {
            "anyOf": [
                {
                    "type": "number"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Duration Ms",
            "description": "Duration in milliseconds"
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message"
        },
        "errors": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Errors",
            "description": "List of error messages"
        },
        "steps": {
            "items": {
                "$ref": "#/components/schemas/WorkflowStepMonitor"
            },
            "type": "array",
            "title": "Steps",
            "description": "Workflow steps in execution order"
        }
    },
    "type": "object",
    "required": [
        "id",
        "name",
        "status",
        "origin_instance",
        "created_at",
        "updated_at"
    ],
    "title": "WorkflowDetailResponse",
    "description": "Detailed workflow view with all steps."
}

{
    "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/monitoring/queues

Get Queue Stats

Description

Get queue depths, active task counts, wait times, and throughput.

Returns statistics for all known Celery queues including: - Queue depth (pending tasks) - Active workers consuming the queue - Active and reserved tasks - Average wait time (time from created to started) - Tasks completed in the last hour

Input parameters

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

Responses

{
    "queues": [
        {
            "name": "string",
            "depth": 0,
            "active_workers": 0,
            "active_tasks": 0,
            "reserved_tasks": 0,
            "avg_wait_time_ms": null,
            "tasks_completed_last_hour": 0
        }
    ],
    "total_pending": 0,
    "total_active": 0,
    "timestamp": "2022-04-13T15:42:05.901Z"
}
⚠️ 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": {
        "queues": {
            "items": {
                "$ref": "#/components/schemas/QueueStats"
            },
            "type": "array",
            "title": "Queues",
            "description": "Statistics per queue"
        },
        "total_pending": {
            "type": "integer",
            "title": "Total Pending",
            "description": "Total pending tasks across all queues",
            "default": 0
        },
        "total_active": {
            "type": "integer",
            "title": "Total Active",
            "description": "Total active tasks across all queues",
            "default": 0
        },
        "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Timestamp when stats were collected"
        }
    },
    "type": "object",
    "required": [
        "timestamp"
    ],
    "title": "QueueStatsResponse",
    "description": "Response for queue statistics endpoint."
}

GET /api/v1/monitoring/workers

Get Worker Stats

Description

Get worker utilization, capacity, and throughput.

Returns statistics for all active Celery workers including: - Worker name and queues - Concurrency and active tasks - Utilization percentage - Capacity status - Total tasks completed and throughput rate

Input parameters

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

Responses

{
    "workers": [
        {
            "name": "string",
            "queues": [
                "string"
            ],
            "concurrency": 0,
            "active_tasks": 0,
            "utilization_pct": 10.12,
            "has_capacity": true,
            "tasks_completed_total": 0,
            "tasks_per_minute": 10.12,
            "memory_mb": null
        }
    ],
    "total_workers": 0,
    "total_capacity": 0,
    "total_active": 0,
    "total_utilization_pct": 10.12,
    "workers_at_capacity": 0,
    "timestamp": "2022-04-13T15:42:05.901Z"
}
⚠️ 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": {
        "workers": {
            "items": {
                "$ref": "#/components/schemas/WorkerInfo"
            },
            "type": "array",
            "title": "Workers",
            "description": "Statistics per worker"
        },
        "total_workers": {
            "type": "integer",
            "title": "Total Workers",
            "description": "Total number of workers",
            "default": 0
        },
        "total_capacity": {
            "type": "integer",
            "title": "Total Capacity",
            "description": "Total capacity (sum of all worker concurrency)",
            "default": 0
        },
        "total_active": {
            "type": "integer",
            "title": "Total Active",
            "description": "Total active tasks across all workers",
            "default": 0
        },
        "total_utilization_pct": {
            "type": "number",
            "title": "Total Utilization Pct",
            "description": "Overall utilization percentage",
            "default": 0.0
        },
        "workers_at_capacity": {
            "type": "integer",
            "title": "Workers At Capacity",
            "description": "Number of workers at full capacity",
            "default": 0
        },
        "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Timestamp when stats were collected"
        }
    },
    "type": "object",
    "required": [
        "timestamp"
    ],
    "title": "WorkerStatsResponse",
    "description": "Response for worker statistics endpoint."
}

GET /api/v1/monitoring/workers/health

Get Workers Health

Description

Quick health check for worker availability.

Returns a simple health status indicating: - Overall health (at least one worker with capacity) - Total workers and workers with available capacity - Queues with and without workers

Use this endpoint for alerting on capacity issues.

Input parameters

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

Responses

{
    "healthy": true,
    "total_workers": 0,
    "workers_with_capacity": 0,
    "queues_with_workers": [
        "string"
    ],
    "queues_without_workers": [
        "string"
    ],
    "timestamp": "2022-04-13T15:42:05.901Z"
}
⚠️ 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": {
        "healthy": {
            "type": "boolean",
            "title": "Healthy",
            "description": "Overall health status"
        },
        "total_workers": {
            "type": "integer",
            "title": "Total Workers",
            "description": "Total number of workers",
            "default": 0
        },
        "workers_with_capacity": {
            "type": "integer",
            "title": "Workers With Capacity",
            "description": "Number of workers with available capacity",
            "default": 0
        },
        "queues_with_workers": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Queues With Workers",
            "description": "Queues that have at least one worker"
        },
        "queues_without_workers": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Queues Without Workers",
            "description": "Queues that have no workers"
        },
        "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Timestamp when health was checked"
        }
    },
    "type": "object",
    "required": [
        "healthy",
        "timestamp"
    ],
    "title": "WorkerHealthResponse",
    "description": "Quick health check response for worker availability."
}

Schemas

AggregateStats

Name Type Description
by_provider Task count by provider type
by_status Task count by status (PENDING, EXECUTING, COMPLETED, FAILED, CANCELLED)
by_task_type Task count by task type
tasks_last_24h integer Tasks created in the last 24 hours
tasks_last_hour integer Tasks created in the last hour
total_tasks integer Total number of tasks

HTTPValidationError

Name Type Description
detail Array<ValidationError>

MediaItem

Name Type Description
media_type string Type of media: 'image' or 'video'
name string Descriptive name (e.g., 'base_image', 'result_image')
path string Relative path in storage
url string Full URL for preview

MonitoringWorkflowListResponse

Name Type Description
items Array<WorkflowListItem>
page integer Current page number (1-indexed)
page_size integer Number of items per page
pages integer Total number of pages
total integer Total number of workflows matching filters

ProviderType

Type: string

QueueStats

Name Type Description
active_tasks integer Number of tasks currently being executed
active_workers integer Number of workers consuming this queue
avg_wait_time_ms Average time tasks wait in queue before execution (ms)
depth integer Number of pending tasks in queue
name string Queue name
reserved_tasks integer Number of tasks reserved by workers (prefetched)
tasks_completed_last_hour integer Number of tasks completed in the last hour

QueueStatsResponse

Name Type Description
queues Array<QueueStats> Statistics per queue
timestamp string(date-time) Timestamp when stats were collected
total_active integer Total active tasks across all queues
total_pending integer Total pending tasks across all queues

StepStatus

Type: string

TaskDetailResponse

Name Type Description
celery_task_id
completed_at
config
created_at string(date-time)
duration_ms Duration in milliseconds
errors
executor_instance
executor_type
id string(uuid)
is_resumed boolean Whether task was resumed
last_resume_attempt Timestamp of last resume attempt
origin_instance string
origin_reference
origin_tenant_id
origin_zone
priority integer Task priority (higher = more priority)
progress number
provider_type
queue_name string Celery queue name
resume_attempt_count integer Number of resume attempts
retry_count integer
service_requests Log of external service requests made during task processing
service_task_id
started_at
status TaskStatus
task_data Task-type specific fields (prompt, width, height, result_image_path, etc.)
task_type TaskType
updated_at string(date-time)
webhook_url Webhook URL for notifications

TaskListItem

Name Type Description
completed_at
created_at string(date-time)
duration_ms Duration in milliseconds (computed from started_at to completed_at)
has_error boolean Whether task has any errors
id string(uuid)
origin_instance string
origin_tenant_id
origin_zone
progress number
provider_type
started_at
status TaskStatus
task_type TaskType

TaskListResponse

Name Type Description
items Array<TaskListItem>
page integer Current page number (1-indexed)
page_size integer Number of items per page
pages integer Total number of pages
total integer Total number of tasks matching filters

TaskMediaResponse

Name Type Description
inputs Array<MediaItem> Input media files
outputs Array<MediaItem> Output media files
task_id string(uuid)

TaskStatus

Type: string

TaskType

Type: string

ValidationError

Name Type Description
loc Array<>
msg string
type string

WorkerHealthResponse

Name Type Description
healthy boolean Overall health status
queues_with_workers Array<string> Queues that have at least one worker
queues_without_workers Array<string> Queues that have no workers
timestamp string(date-time) Timestamp when health was checked
total_workers integer Total number of workers
workers_with_capacity integer Number of workers with available capacity

WorkerInfo

Name Type Description
active_tasks integer Number of tasks currently executing
concurrency integer Maximum concurrent tasks
has_capacity boolean Whether worker has capacity for more tasks
memory_mb Total memory usage in MB (main process + pool children)
name string Worker name (e.g., worker-fal@host1)
queues Array<string> Queues this worker consumes
tasks_completed_total integer Total tasks completed by this worker
tasks_per_minute number Average tasks completed per minute
utilization_pct number Utilization percentage (active_tasks / concurrency * 100)

WorkerStatsResponse

Name Type Description
timestamp string(date-time) Timestamp when stats were collected
total_active integer Total active tasks across all workers
total_capacity integer Total capacity (sum of all worker concurrency)
total_utilization_pct number Overall utilization percentage
total_workers integer Total number of workers
workers Array<WorkerInfo> Statistics per worker
workers_at_capacity integer Number of workers at full capacity

WorkflowAggregateStats

Name Type Description
avg_steps_per_workflow number Average number of steps per workflow
by_status Workflow count by status (PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CANCELLED)
total_workflows integer Total number of workflows
workflows_last_24h integer Workflows created in the last 24 hours
workflows_last_hour integer Workflows created in the last hour

WorkflowDetailResponse

Name Type Description
canvas_task_id
completed_at
completed_steps integer
config Workflow configuration
created_at string(date-time)
current_step
description
duration_ms Duration in milliseconds
error_message
errors Array<string> List of error messages
final_step_id
id string(uuid)
name string
origin_instance string
origin_reference
origin_tenant_id
origin_zone
progress number
started_at
status WorkflowStatus
steps Array<WorkflowStepMonitor> Workflow steps in execution order
total_steps integer
updated_at string(date-time)
webhook_url

WorkflowListItem

Name Type Description
completed_at
completed_steps integer
created_at string(date-time)
current_step
description
duration_ms Duration in milliseconds (computed from started_at to completed_at)
final_step_id
has_error boolean Whether workflow has any errors
id string(uuid)
name string
origin_instance string
origin_tenant_id
origin_zone
progress number
started_at
status WorkflowStatus
total_steps integer

WorkflowStatus

Type: string

WorkflowStepMonitor

Name Type Description
completed_at
config Step configuration
dependencies Array<string> List of step IDs this step depends on
duration_ms Duration in milliseconds
error_message
id string(uuid)
input_mappings Array<> Input mappings from previous steps
max_retries integer
result Output data from this step
retry_count integer
started_at
status StepStatus
step_id string Logical step identifier (e.g., 'generate', 'refine')
task_id ID of the task created for this step
task_type string Task type for this step

Security schemes

Name Type Scheme Description
HTTPBearer http bearer