Skip to content

Tasks Endpoints

Tasks API endpoints.


Overview

Method Endpoint Description
POST /api/v1/tasks/webhook Task Webhook

API Reference

Sartiq Backend Server - Tasks 0.1.0

tasks


POST /api/v1/tasks/webhook

Task Webhook

Request body

{
    "event_type": "training_status_update",
    "task_id": "string",
    "status": null,
    "entity_id": null,
    "origin_instance": null,
    "origin_zone": null,
    "origin_version": null,
    "timestamp": null,
    "metadata": null,
    "progress": null,
    "error_message": null,
    "error_category": null,
    "completed_at": null,
    "started_at": null,
    "task_type": "string",
    "additional_properties": {}
}
⚠️ 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": {
        "event_type": {
            "$ref": "#/components/schemas/EventType"
        },
        "task_id": {
            "type": "string",
            "title": "Task Id"
        },
        "status": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/app__services__compute_server__api_client__models__task_status__TaskStatus"
                },
                {
                    "type": "null"
                }
            ]
        },
        "entity_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Entity Id"
        },
        "origin_instance": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Instance"
        },
        "origin_zone": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Zone"
        },
        "origin_version": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Origin Version"
        },
        "timestamp": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Timestamp"
        },
        "metadata": {
            "anyOf": [
                {
                    "additionalProperties": true,
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Metadata"
        },
        "progress": {
            "anyOf": [
                {
                    "type": "number",
                    "maximum": 100.0,
                    "minimum": 0.0
                },
                {
                    "type": "integer",
                    "maximum": 100.0,
                    "minimum": 0.0
                }
            ],
            "title": "Progress",
            "description": "Task progress percentage"
        },
        "error_message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Error Message"
        },
        "error_category": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ErrorCategory-Input"
                },
                {
                    "type": "null"
                }
            ]
        },
        "completed_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Completed At"
        },
        "started_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Started At"
        },
        "task_type": {
            "type": "string",
            "title": "Task Type"
        },
        "additional_properties": {
            "additionalProperties": true,
            "type": "object",
            "title": "Additional Properties",
            "default": {}
        }
    },
    "type": "object",
    "required": [
        "event_type",
        "task_id",
        "status",
        "progress",
        "task_type"
    ],
    "title": "TaskStatusEvent",
    "description": "Event for generic task status updates"
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ 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

app__services__compute_server__api_client__models__task_status__TaskStatus

Type: string

ErrorCategory-Input

Type: string

EventType

Type: string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

TaskStatusEvent

Name Type Description
additional_properties
completed_at
entity_id
error_category
error_message
event_type EventType
metadata
origin_instance
origin_version
origin_zone
progress Task progress percentage
started_at
status
task_id string
task_type string
timestamp

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2