Job Instance
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/1146/?format=api
{ "id": 1146, "details": "https://api.beluga.insectai.org/api/v2/jobs/1146/?format=api", "name": "Populate captures for collection 21", "delay": 0, "limit": null, "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": null, "status": "SUCCESS", "created_at": "2025-01-21T23:25:58.317201", "updated_at": "2025-01-21T23:26:00.343763", "started_at": "2025-01-21T23:25:58.479425", "finished_at": "2025-01-21T23:26:00.296901", "duration": "1.817476", "progress": { "summary": { "status": "SUCCESS", "progress": 1.0 }, "stages": [ { "status": "SUCCESS", "progress": 1.0, "key": "populate_captures_collection", "name": "Populate captures collection", "params": [ { "name": "Captures added", "key": "captures_added", "category": "default", "value": 403 } ] } ], "errors": [], "logs": [ "[2025-01-21 23:26:00] INFO Finished job #1146 \"Populate captures for collection 21\" (SUCCESS)", "[2025-01-21 23:26:00] INFO Changing status of job 1146 to SUCCESS", "[2025-01-21 23:26:00] INFO Added 403 captures to source image collection #21 Insectarium, End of every night", "[2025-01-21 23:26:00] INFO Finished populating source image collection #21 Insectarium, End of every night", "[2025-01-21 23:26:00] INFO Done sampling and saving captures to #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Sampling and saving captures to #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Sampling using method 'sample_last_and_random_from_each_event' with params: {'num_each': 0}", "[2025-01-21 23:25:58] INFO Populating source image collection #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Changing status of job 1146 to STARTED", "[2025-01-21 23:25:58] INFO Running job #1146 \"Populate captures for collection 21\" (PENDING)" ] }, "logs": { "stdout": [ "[2025-01-21 23:26:00] INFO Finished job #1146 \"Populate captures for collection 21\" (SUCCESS)", "[2025-01-21 23:26:00] INFO Changing status of job 1146 to SUCCESS", "[2025-01-21 23:26:00] INFO Added 403 captures to source image collection #21 Insectarium, End of every night", "[2025-01-21 23:26:00] INFO Finished populating source image collection #21 Insectarium, End of every night", "[2025-01-21 23:26:00] INFO Done sampling and saving captures to #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Sampling and saving captures to #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Sampling using method 'sample_last_and_random_from_each_event' with params: {'num_each': 0}", "[2025-01-21 23:25:58] INFO Populating source image collection #21 Insectarium, End of every night", "[2025-01-21 23:25:58] INFO Changing status of job 1146 to STARTED", "[2025-01-21 23:25:58] INFO Running job #1146 \"Populate captures for collection 21\" (PENDING)" ], "stderr": [] }, "job_type": { "name": "Populate captures collection", "key": "populate_captures_collection" }, "data_export": null, "dispatch_mode": "internal", "result": null, "user_permissions": [] }