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

{
    "id": 110,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/110/?format=api",
    "name": "Friday's Work",
    "delay": 30,
    "limit": 100,
    "shuffle": true,
    "project": {
        "id": 16,
        "name": "Aarhus Universitet, Department of Ecoscience",
        "details": "https://api.beluga.insectai.org/api/v2/projects/16/?format=api",
        "user_permissions": []
    },
    "deployment": null,
    "source_image_collection": {
        "id": 5,
        "name": "Denmark with detections",
        "details": "https://api.beluga.insectai.org/api/v2/captures/collections/5/?format=api",
        "method": "detections_only",
        "user_permissions": []
    },
    "source_image_single": null,
    "pipeline": {
        "id": 1,
        "details": "https://api.beluga.insectai.org/api/v2/ml/pipelines/1/?format=api",
        "name": "Panama moths",
        "slug": "panama_moths_2023",
        "description": "",
        "version": 1,
        "version_name": "",
        "created_at": "2023-11-10T02:41:27.683282",
        "updated_at": "2026-04-01T17:09:36.425601",
        "user_permissions": []
    },
    "status": "SUCCESS",
    "created_at": "2023-11-10T03:08:20.485322",
    "updated_at": "2024-11-13T17:15:35.473138",
    "started_at": "2023-11-10T03:08:22.602539",
    "finished_at": "2023-11-10T03:08:55.803849",
    "duration": "33.20131",
    "progress": {
        "summary": {
            "status": "SUCCESS",
            "progress": 1.0
        },
        "stages": [
            {
                "status": "SUCCESS",
                "progress": 1.0,
                "key": "delay",
                "name": "Delay",
                "params": [
                    {
                        "name": "Delay",
                        "key": "delay",
                        "category": "default",
                        "value": 30
                    },
                    {
                        "name": "Mood",
                        "key": "mood",
                        "category": "default",
                        "value": "🥳"
                    }
                ]
            }
        ],
        "errors": [],
        "logs": [
            "[2023-11-10 03:08:56] INFO Finished job #110 \"Friday's Work\" (SUCCESS)",
            "[2023-11-10 03:08:55] INFO Finished job #110 \"Friday's Work\" (SUCCESS)",
            "[2023-11-10 03:08:55] INFO Changing status of job 110 to SUCCESS",
            "[2023-11-10 03:08:55] INFO Delaying job 110 for the 29 out of 30 seconds",
            "[2023-11-10 03:08:53] INFO Delaying job 110 for the 27 out of 30 seconds",
            "[2023-11-10 03:08:51] INFO Delaying job 110 for the 25 out of 30 seconds",
            "[2023-11-10 03:08:50] INFO Delaying job 110 for the 25 out of 30 seconds",
            "[2023-11-10 03:08:48] INFO Delaying job 110 for the 23 out of 30 seconds",
            "[2023-11-10 03:08:47] INFO Delaying job 110 for the 23 out of 30 seconds",
            "[2023-11-10 03:08:45] INFO Delaying job 110 for the 21 out of 30 seconds",
            "[2023-11-10 03:08:43] INFO Delaying job 110 for the 19 out of 30 seconds",
            "[2023-11-10 03:08:41] INFO Delaying job 110 for the 17 out of 30 seconds",
            "[2023-11-10 03:08:39] INFO Delaying job 110 for the 15 out of 30 seconds",
            "[2023-11-10 03:08:37] INFO Delaying job 110 for the 13 out of 30 seconds",
            "[2023-11-10 03:08:35] INFO Delaying job 110 for the 11 out of 30 seconds",
            "[2023-11-10 03:08:34] INFO Delaying job 110 for the 11 out of 30 seconds",
            "[2023-11-10 03:08:32] INFO Delaying job 110 for the 9 out of 30 seconds",
            "[2023-11-10 03:08:30] INFO Delaying job 110 for the 7 out of 30 seconds",
            "[2023-11-10 03:08:28] INFO Delaying job 110 for the 5 out of 30 seconds",
            "[2023-11-10 03:08:26] INFO Delaying job 110 for the 3 out of 30 seconds",
            "[2023-11-10 03:08:24] INFO Delaying job 110 for the 1 out of 30 seconds",
            "[2023-11-10 03:08:22] INFO Changing status of job 110 to STARTED",
            "[2023-11-10 03:08:22] INFO Running job #110 \"Friday's Work\" (PENDING)"
        ]
    },
    "logs": {
        "stdout": [
            "[2023-11-10 03:08:56] INFO Finished job #110 \"Friday's Work\" (SUCCESS)",
            "[2023-11-10 03:08:55] INFO Finished job #110 \"Friday's Work\" (SUCCESS)",
            "[2023-11-10 03:08:55] INFO Changing status of job 110 to SUCCESS",
            "[2023-11-10 03:08:55] INFO Delaying job 110 for the 29 out of 30 seconds",
            "[2023-11-10 03:08:53] INFO Delaying job 110 for the 27 out of 30 seconds",
            "[2023-11-10 03:08:51] INFO Delaying job 110 for the 25 out of 30 seconds",
            "[2023-11-10 03:08:50] INFO Delaying job 110 for the 25 out of 30 seconds",
            "[2023-11-10 03:08:48] INFO Delaying job 110 for the 23 out of 30 seconds",
            "[2023-11-10 03:08:47] INFO Delaying job 110 for the 23 out of 30 seconds",
            "[2023-11-10 03:08:45] INFO Delaying job 110 for the 21 out of 30 seconds",
            "[2023-11-10 03:08:43] INFO Delaying job 110 for the 19 out of 30 seconds",
            "[2023-11-10 03:08:41] INFO Delaying job 110 for the 17 out of 30 seconds",
            "[2023-11-10 03:08:39] INFO Delaying job 110 for the 15 out of 30 seconds",
            "[2023-11-10 03:08:37] INFO Delaying job 110 for the 13 out of 30 seconds",
            "[2023-11-10 03:08:35] INFO Delaying job 110 for the 11 out of 30 seconds",
            "[2023-11-10 03:08:34] INFO Delaying job 110 for the 11 out of 30 seconds",
            "[2023-11-10 03:08:32] INFO Delaying job 110 for the 9 out of 30 seconds",
            "[2023-11-10 03:08:30] INFO Delaying job 110 for the 7 out of 30 seconds",
            "[2023-11-10 03:08:28] INFO Delaying job 110 for the 5 out of 30 seconds",
            "[2023-11-10 03:08:26] INFO Delaying job 110 for the 3 out of 30 seconds",
            "[2023-11-10 03:08:24] INFO Delaying job 110 for the 1 out of 30 seconds",
            "[2023-11-10 03:08:22] INFO Changing status of job 110 to STARTED",
            "[2023-11-10 03:08:22] INFO Running job #110 \"Friday's Work\" (PENDING)"
        ],
        "stderr": []
    },
    "job_type": {
        "name": "ML pipeline",
        "key": "ml"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}