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/630/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 630,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/630/?format=api",
    "name": "Sync captures for deployment 118",
    "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": 118,
        "name": "Costa Rica - Dry Forest",
        "details": "https://api.beluga.insectai.org/api/v2/deployments/118/?format=api",
        "user_permissions": []
    },
    "source_image_collection": null,
    "source_image_single": null,
    "pipeline": null,
    "status": "FAILURE",
    "created_at": "2024-04-30T04:18:48.365585",
    "updated_at": "2024-11-13T17:15:34.230506",
    "started_at": null,
    "finished_at": "2025-10-10T00:37:57.723893",
    "duration": null,
    "progress": {
        "summary": {
            "status": "FAILURE",
            "progress": 0.0
        },
        "stages": [
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "collect",
                "name": "Collect",
                "params": [
                    {
                        "name": "Total Images",
                        "key": "total_images",
                        "category": "default",
                        "value": ""
                    }
                ]
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "process",
                "name": "Process",
                "params": [
                    {
                        "name": "Processed",
                        "key": "processed",
                        "category": "default",
                        "value": ""
                    },
                    {
                        "name": "Remaining",
                        "key": "remaining",
                        "category": "default",
                        "value": ""
                    },
                    {
                        "name": "Detections",
                        "key": "detections",
                        "category": "default",
                        "value": ""
                    },
                    {
                        "name": "Classifications",
                        "key": "classifications",
                        "category": "default",
                        "value": ""
                    }
                ]
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "results",
                "name": "Results",
                "params": [
                    {
                        "name": "Objects created",
                        "key": "objects_created",
                        "category": "default",
                        "value": ""
                    }
                ]
            },
            {
                "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:58] ERROR Job 630 has been pending for 1 year, 5 months with workers available, marking as failed",
            "[2025-10-10 00:37:58] WARNING Job 630 has been waiting for 1 year, 5 months with 1 worker(s) available. Task may be queued behind other jobs."
        ],
        "stderr": [
            "Job 630 has been pending for 1 year, 5 months with workers available, marking as failed"
        ]
    },
    "job_type": {
        "name": "Unknown",
        "key": "unknown"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}