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

{
    "id": 551,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/551/?format=api",
    "name": "test farringdon",
    "delay": 0,
    "limit": 100,
    "shuffle": true,
    "project": {
        "id": 1,
        "name": "UK Centre for Ecology & Hydrology",
        "details": "https://api.beluga.insectai.org/api/v2/projects/1/?format=api",
        "user_permissions": []
    },
    "deployment": null,
    "source_image_collection": {
        "id": 12,
        "name": "Starred Images",
        "details": "https://api.beluga.insectai.org/api/v2/captures/collections/12/?format=api",
        "method": "starred",
        "user_permissions": []
    },
    "source_image_single": null,
    "pipeline": {
        "id": 2,
        "details": "https://api.beluga.insectai.org/api/v2/ml/pipelines/2/?format=api",
        "name": "UK & Denmark moths",
        "slug": "uk_denmark_moths_2023",
        "description": "",
        "version": 1,
        "version_name": "",
        "created_at": "2023-11-10T02:42:02.618036",
        "updated_at": "2026-04-01T17:09:36.587352",
        "user_permissions": []
    },
    "status": "FAILURE",
    "created_at": "2024-03-19T13:46:05.428337",
    "updated_at": "2024-11-13T17:15:34.434089",
    "started_at": null,
    "finished_at": null,
    "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": ""
                    }
                ]
            }
        ],
        "errors": [],
        "logs": [
            "[2024-03-24 13:49:58] INFO Changing status of job 551 to FAILURE"
        ]
    },
    "logs": {
        "stdout": [
            "[2024-03-24 13:49:58] INFO Changing status of job 551 to FAILURE"
        ],
        "stderr": []
    },
    "job_type": {
        "name": "ML pipeline",
        "key": "ml"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}