API endpoint that allows jobs to be viewed or edited.

Pass the start_now url parameter to the POST method to enqueue the job immediately.

Use the delay field to create a test job with fake duration of work (in seconds).

Actions

/jobs/{id}/run/ (POST)

Run a job (add it to the queue).

/jobs/{id}/cancel/ (POST)

Cancel a job (terminate the background task)

GET /api/v2/jobs/631/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 631,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/631/?format=api",
    "name": "Sync captures for deployment 114",
    "delay": 0,
    "limit": 100,
    "shuffle": true,
    "project": {
        "id": 45,
        "name": "AMBER - Costa Rica",
        "details": "https://api.beluga.insectai.org/api/v2/projects/45/?format=api",
        "user_permissions": []
    },
    "deployment": {
        "id": 114,
        "name": "Costa Rica - Butterfly",
        "details": "https://api.beluga.insectai.org/api/v2/deployments/114/?format=api",
        "user_permissions": []
    },
    "source_image_collection": null,
    "source_image_single": null,
    "pipeline": null,
    "status": "FAILURE",
    "created_at": "2024-04-30T04:18:59.678091",
    "updated_at": "2024-11-13T17:15:34.228299",
    "started_at": null,
    "finished_at": "2025-10-10T00:37:58.783329",
    "duration": null,
    "progress": {
        "summary": {
            "status": "FAILURE",
            "progress": 0.0
        },
        "stages": [
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            }
        ],
        "errors": [],
        "logs": []
    },
    "logs": {
        "stdout": [
            "[2025-10-10 00:37:59] ERROR Job 631 has been pending for 1 year, 5 months with workers available, marking as failed",
            "[2025-10-10 00:37:59] WARNING Job 631 has been waiting for 1 year, 5 months with 1 worker(s) available. Task may be queued behind other jobs."
        ],
        "stderr": [
            "Job 631 has been pending for 1 year, 5 months with workers available, marking as failed"
        ]
    },
    "job_type": {
        "name": "Data storage sync",
        "key": "data_storage_sync"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}