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/1102/?format=api
{ "id": 1102, "details": "https://api.beluga.insectai.org/api/v2/jobs/1102/?format=api", "name": "Sync captures for deployment 250", "delay": 0, "limit": null, "shuffle": true, "project": { "id": 88, "name": "Costa Rica- Labelling", "details": "https://api.beluga.insectai.org/api/v2/projects/88/?format=api", "user_permissions": [] }, "deployment": { "id": 250, "name": "Costa Rica - Restoration", "details": "https://api.beluga.insectai.org/api/v2/deployments/250/?format=api", "user_permissions": [] }, "source_image_collection": null, "source_image_single": null, "pipeline": null, "status": "SUCCESS", "created_at": "2025-01-13T10:28:45.697612", "updated_at": "2025-01-14T21:48:35.776910", "started_at": "2025-01-14T21:48:26.116992", "finished_at": "2025-01-14T21:48:35.679136", "duration": "9.562144", "progress": { "summary": { "status": "SUCCESS", "progress": 1.0 }, "stages": [ { "status": "SUCCESS", "progress": 1.0, "key": "data_storage_sync", "name": "Data storage sync", "params": [ { "name": "Total files", "key": "total_files", "category": "default", "value": 3419 } ] }, { "status": "SUCCESS", "progress": 1.0, "key": "update_deployment_cache", "name": "Update deployment cache", "params": [] } ], "errors": [], "logs": [ "[2025-01-14 21:48:35] INFO Finished job #1102 \"Sync captures for deployment 250\" (SUCCESS)", "[2025-01-14 21:48:35] INFO Changing status of job 1102 to SUCCESS", "[2025-01-14 21:48:35] INFO Finished syncing captures for deployment #250 Costa Rica - Restoration", "[2025-01-14 21:48:35] INFO Saving and recalculating sessions for deployment", "[2025-01-14 21:48:35] INFO Processed 3419 files", "[2025-01-14 21:48:34] INFO Processed 3419 files", "[2025-01-14 21:48:33] INFO Processed 3000 files", "[2025-01-14 21:48:31] INFO Processed 2000 files", "[2025-01-14 21:48:29] INFO Processed 1000 files", "[2025-01-14 21:48:26] INFO Syncing captures for deployment #250 Costa Rica - Restoration", "[2025-01-14 21:48:26] INFO Changing status of job 1102 to STARTED", "[2025-01-14 21:48:26] INFO Running job #1102 \"Sync captures for deployment 250\" (PENDING)" ] }, "logs": { "stdout": [ "[2025-01-14 21:48:35] INFO Finished job #1102 \"Sync captures for deployment 250\" (SUCCESS)", "[2025-01-14 21:48:35] INFO Changing status of job 1102 to SUCCESS", "[2025-01-14 21:48:35] INFO Finished syncing captures for deployment #250 Costa Rica - Restoration", "[2025-01-14 21:48:35] INFO Saving and recalculating sessions for deployment", "[2025-01-14 21:48:35] INFO Processed 3419 files", "[2025-01-14 21:48:34] INFO Processed 3419 files", "[2025-01-14 21:48:33] INFO Processed 3000 files", "[2025-01-14 21:48:31] INFO Processed 2000 files", "[2025-01-14 21:48:29] INFO Processed 1000 files", "[2025-01-14 21:48:26] INFO Syncing captures for deployment #250 Costa Rica - Restoration", "[2025-01-14 21:48:26] INFO Changing status of job 1102 to STARTED", "[2025-01-14 21:48:26] INFO Running job #1102 \"Sync captures for deployment 250\" (PENDING)" ], "stderr": [] }, "job_type": { "name": "Data storage sync", "key": "data_storage_sync" }, "data_export": null, "dispatch_mode": "internal", "result": null, "user_permissions": [] }