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/1148/?format=api
{ "id": 1148, "details": "https://api.beluga.insectai.org/api/v2/jobs/1148/?format=api", "name": "Sync captures for deployment 245", "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": 245, "name": "Costa Rica - Dry Forest", "details": "https://api.beluga.insectai.org/api/v2/deployments/245/?format=api", "user_permissions": [] }, "source_image_collection": null, "source_image_single": null, "pipeline": null, "status": "SUCCESS", "created_at": "2025-01-22T00:30:19.466304", "updated_at": "2025-01-22T00:30:29.282972", "started_at": "2025-01-22T00:30:19.558884", "finished_at": "2025-01-22T00:30:29.202652", "duration": "9.643768", "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": 4152 } ] }, { "status": "SUCCESS", "progress": 1.0, "key": "update_deployment_cache", "name": "Update deployment cache", "params": [] } ], "errors": [], "logs": [ "[2025-01-22 00:30:29] INFO Finished job #1148 \"Sync captures for deployment 245\" (SUCCESS)", "[2025-01-22 00:30:29] INFO Changing status of job 1148 to SUCCESS", "[2025-01-22 00:30:29] INFO Finished syncing captures for deployment #245 Costa Rica - Dry Forest", "[2025-01-22 00:30:28] INFO Saving and recalculating sessions for deployment", "[2025-01-22 00:30:28] INFO Processed 4152 files", "[2025-01-22 00:30:27] INFO Processed 4000 files", "[2025-01-22 00:30:25] INFO Processed 3000 files", "[2025-01-22 00:30:23] INFO Processed 2000 files", "[2025-01-22 00:30:21] INFO Processed 1000 files", "[2025-01-22 00:30:19] INFO Syncing captures for deployment #245 Costa Rica - Dry Forest", "[2025-01-22 00:30:19] INFO Changing status of job 1148 to STARTED", "[2025-01-22 00:30:19] INFO Running job #1148 \"Sync captures for deployment 245\" (PENDING)" ] }, "logs": { "stdout": [ "[2025-01-22 00:30:29] INFO Finished job #1148 \"Sync captures for deployment 245\" (SUCCESS)", "[2025-01-22 00:30:29] INFO Changing status of job 1148 to SUCCESS", "[2025-01-22 00:30:29] INFO Finished syncing captures for deployment #245 Costa Rica - Dry Forest", "[2025-01-22 00:30:28] INFO Saving and recalculating sessions for deployment", "[2025-01-22 00:30:28] INFO Processed 4152 files", "[2025-01-22 00:30:27] INFO Processed 4000 files", "[2025-01-22 00:30:25] INFO Processed 3000 files", "[2025-01-22 00:30:23] INFO Processed 2000 files", "[2025-01-22 00:30:21] INFO Processed 1000 files", "[2025-01-22 00:30:19] INFO Syncing captures for deployment #245 Costa Rica - Dry Forest", "[2025-01-22 00:30:19] INFO Changing status of job 1148 to STARTED", "[2025-01-22 00:30:19] INFO Running job #1148 \"Sync captures for deployment 245\" (PENDING)" ], "stderr": [] }, "job_type": { "name": "Data storage sync", "key": "data_storage_sync" }, "data_export": null, "dispatch_mode": "internal", "result": null, "user_permissions": [] }