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

{
    "id": 225,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/225/?format=api",
    "name": "Last images",
    "delay": 0,
    "limit": 100,
    "shuffle": true,
    "project": {
        "id": 23,
        "name": "Insectarium de Montréal",
        "details": "https://api.beluga.insectai.org/api/v2/projects/23/?format=api",
        "user_permissions": []
    },
    "deployment": null,
    "source_image_collection": {
        "id": 21,
        "name": "Insectarium, End of every night",
        "details": "https://api.beluga.insectai.org/api/v2/captures/collections/21/?format=api",
        "method": "last_and_random_from_each_event",
        "user_permissions": []
    },
    "source_image_single": null,
    "pipeline": {
        "id": 3,
        "details": "https://api.beluga.insectai.org/api/v2/ml/pipelines/3/?format=api",
        "name": "Quebec & Vermont moths",
        "slug": "quebec_vermont_moths_2023",
        "description": "",
        "version": 1,
        "version_name": "",
        "created_at": "2023-11-27T23:26:16.449157",
        "updated_at": "2026-04-01T17:09:36.520322",
        "user_permissions": []
    },
    "status": "FAILURE",
    "created_at": "2023-12-04T00:07:40.868399",
    "updated_at": "2024-11-13T17:15:35.388953",
    "started_at": "2023-12-04T00:46:22.534117",
    "finished_at": null,
    "duration": null,
    "progress": {
        "summary": {
            "status": "FAILURE",
            "progress": 0.42666666666666675
        },
        "stages": [
            {
                "status": "SUCCESS",
                "progress": 1.0,
                "key": "collect",
                "name": "Collect",
                "params": [
                    {
                        "name": "Total Images",
                        "key": "total_images",
                        "category": "default",
                        "value": 297
                    },
                    {
                        "name": "Limit",
                        "key": "limit",
                        "category": "default",
                        "value": 100
                    },
                    {
                        "name": "Limit",
                        "key": "limit",
                        "category": "default",
                        "value": 100
                    }
                ]
            },
            {
                "status": "STARTED",
                "progress": 0.14,
                "key": "process",
                "name": "Process",
                "params": [
                    {
                        "name": "Proccessed",
                        "key": "proccessed",
                        "category": "default",
                        "value": 14
                    },
                    {
                        "name": "Remaining",
                        "key": "remaining",
                        "category": "default",
                        "value": 86
                    },
                    {
                        "name": "Detections",
                        "key": "detections",
                        "category": "default",
                        "value": 78
                    },
                    {
                        "name": "Classifications",
                        "key": "classifications",
                        "category": "default",
                        "value": 67
                    }
                ]
            },
            {
                "status": "STARTED",
                "progress": 0.14,
                "key": "results",
                "name": "Results",
                "params": [
                    {
                        "name": "Objects created",
                        "key": "objects_created",
                        "category": "default",
                        "value": 42
                    }
                ]
            }
        ],
        "errors": [
            "Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process"
        ],
        "logs": [
            "[2023-12-04 00:49:21] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:49:21] INFO Changing status of job 225 to FAILURE",
            "[2023-12-04 00:49:20] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:49:03] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:49:02] INFO Created 42 objects",
            "[2023-12-04 00:49:01] INFO Saving results",
            "[2023-12-04 00:49:01] INFO Found 17 classifications",
            "[2023-12-04 00:49:00] INFO Found 17 classifications",
            "[2023-12-04 00:49:00] INFO Found 25 detections",
            "[2023-12-04 00:48:32] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:31] INFO Created 16 objects",
            "[2023-12-04 00:48:31] INFO Saving results",
            "[2023-12-04 00:48:30] INFO Found 8 classifications",
            "[2023-12-04 00:48:30] INFO Found 8 detections",
            "[2023-12-04 00:48:23] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:22] INFO Created 6 objects",
            "[2023-12-04 00:48:22] INFO Saving results",
            "[2023-12-04 00:48:22] INFO Found 3 classifications",
            "[2023-12-04 00:48:21] INFO Found 3 detections",
            "[2023-12-04 00:48:03] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:03] INFO Created 53 objects",
            "[2023-12-04 00:48:01] INFO Saving results",
            "[2023-12-04 00:48:01] INFO Found 26 classifications",
            "[2023-12-04 00:48:01] INFO Found 27 detections",
            "[2023-12-04 00:47:42] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:47:41] INFO Created 14 objects",
            "[2023-12-04 00:47:41] INFO Saving results",
            "[2023-12-04 00:47:40] INFO Found 6 classifications",
            "[2023-12-04 00:47:40] INFO Found 8 detections",
            "[2023-12-04 00:46:48] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:48] INFO Created 14 objects",
            "[2023-12-04 00:46:47] INFO Saving results",
            "[2023-12-04 00:46:47] INFO Found 7 classifications",
            "[2023-12-04 00:46:47] INFO Found 7 detections",
            "[2023-12-04 00:46:25] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:25] INFO Saving results",
            "[2023-12-04 00:46:22] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:22] WARNING Limiting number of images to 100 (out of 297)",
            "[2023-12-04 00:46:22] INFO Shuffling images",
            "[2023-12-04 00:46:22] INFO Found 297 images to process",
            "[2023-12-04 00:46:22] INFO Changing status of job 225 to STARTED",
            "[2023-12-04 00:46:22] INFO Running job #225 \"Last images\" (PENDING)",
            "[2023-12-04 00:07:45] INFO Changing status of job 225 to FAILURE",
            "[2023-12-04 00:07:45] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:07:44] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:07:43] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:07:43] WARNING Limiting number of images to 100 (out of 297)",
            "[2023-12-04 00:07:43] INFO Shuffling images",
            "[2023-12-04 00:07:43] INFO Found 297 images to process",
            "[2023-12-04 00:07:43] INFO Changing status of job 225 to STARTED",
            "[2023-12-04 00:07:43] INFO Running job #225 \"Last images\" (PENDING)"
        ]
    },
    "logs": {
        "stdout": [
            "[2023-12-04 00:49:21] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:49:21] INFO Changing status of job 225 to FAILURE",
            "[2023-12-04 00:49:20] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:49:03] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:49:02] INFO Created 42 objects",
            "[2023-12-04 00:49:01] INFO Saving results",
            "[2023-12-04 00:49:01] INFO Found 17 classifications",
            "[2023-12-04 00:49:00] INFO Found 17 classifications",
            "[2023-12-04 00:49:00] INFO Found 25 detections",
            "[2023-12-04 00:48:32] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:31] INFO Created 16 objects",
            "[2023-12-04 00:48:31] INFO Saving results",
            "[2023-12-04 00:48:30] INFO Found 8 classifications",
            "[2023-12-04 00:48:30] INFO Found 8 detections",
            "[2023-12-04 00:48:23] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:22] INFO Created 6 objects",
            "[2023-12-04 00:48:22] INFO Saving results",
            "[2023-12-04 00:48:22] INFO Found 3 classifications",
            "[2023-12-04 00:48:21] INFO Found 3 detections",
            "[2023-12-04 00:48:03] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:48:03] INFO Created 53 objects",
            "[2023-12-04 00:48:01] INFO Saving results",
            "[2023-12-04 00:48:01] INFO Found 26 classifications",
            "[2023-12-04 00:48:01] INFO Found 27 detections",
            "[2023-12-04 00:47:42] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:47:41] INFO Created 14 objects",
            "[2023-12-04 00:47:41] INFO Saving results",
            "[2023-12-04 00:47:40] INFO Found 6 classifications",
            "[2023-12-04 00:47:40] INFO Found 8 detections",
            "[2023-12-04 00:46:48] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:48] INFO Created 14 objects",
            "[2023-12-04 00:46:47] INFO Saving results",
            "[2023-12-04 00:46:47] INFO Found 7 classifications",
            "[2023-12-04 00:46:47] INFO Found 7 detections",
            "[2023-12-04 00:46:25] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:25] INFO Saving results",
            "[2023-12-04 00:46:22] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:46:22] WARNING Limiting number of images to 100 (out of 297)",
            "[2023-12-04 00:46:22] INFO Shuffling images",
            "[2023-12-04 00:46:22] INFO Found 297 images to process",
            "[2023-12-04 00:46:22] INFO Changing status of job 225 to STARTED",
            "[2023-12-04 00:46:22] INFO Running job #225 \"Last images\" (PENDING)",
            "[2023-12-04 00:07:45] INFO Changing status of job 225 to FAILURE",
            "[2023-12-04 00:07:45] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:07:44] ERROR Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process",
            "[2023-12-04 00:07:43] INFO Sending 2 images to ML backend quebec_vermont_moths_2023",
            "[2023-12-04 00:07:43] WARNING Limiting number of images to 100 (out of 297)",
            "[2023-12-04 00:07:43] INFO Shuffling images",
            "[2023-12-04 00:07:43] INFO Found 297 images to process",
            "[2023-12-04 00:07:43] INFO Changing status of job 225 to STARTED",
            "[2023-12-04 00:07:43] INFO Running job #225 \"Last images\" (PENDING)"
        ],
        "stderr": [
            "Job #225 \"Last images\" failed: 500 Server Error: Internal Server Error for url: http://gpu-4.local:2000/pipeline/process"
        ]
    },
    "job_type": {
        "name": "ML pipeline",
        "key": "ml"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}