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

{
    "id": 629,
    "details": "https://api.beluga.insectai.org/api/v2/jobs/629/?format=api",
    "name": "Sync captures for deployment 115",
    "delay": 0,
    "limit": 100,
    "shuffle": true,
    "project": {
        "id": 45,
        "name": "AMBER - Costa Rica",
        "details": "https://api.beluga.insectai.org/api/v2/projects/45/?format=api",
        "user_permissions": []
    },
    "deployment": {
        "id": 115,
        "name": "Costa Rica - Forest Edge",
        "details": "https://api.beluga.insectai.org/api/v2/deployments/115/?format=api",
        "user_permissions": []
    },
    "source_image_collection": null,
    "source_image_single": null,
    "pipeline": null,
    "status": "SUCCESS",
    "created_at": "2024-04-30T04:18:33.125802",
    "updated_at": "2024-11-13T17:15:34.232789",
    "started_at": "2024-04-30T04:18:33.205555",
    "finished_at": "2024-04-30T04:18:34.235668",
    "duration": "1.030113",
    "progress": {
        "summary": {
            "status": "SUCCESS",
            "progress": 0.25
        },
        "stages": [
            {
                "status": "SUCCESS",
                "progress": 1.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": [
                    {
                        "name": "total_images",
                        "key": "total_images",
                        "category": "default",
                        "value": 0
                    },
                    {
                        "name": "total_files",
                        "key": "total_files",
                        "category": "default",
                        "value": 0
                    }
                ]
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 0.0,
                "key": "data_storage_sync",
                "name": "data_storage_sync",
                "params": []
            },
            {
                "status": "CREATED",
                "progress": 1.0,
                "key": "save_and_regroup",
                "name": "save_and_regroup",
                "params": []
            }
        ],
        "errors": [],
        "logs": [
            "[2024-04-30 04:18:34] INFO Finished job #629 \"Sync captures for deployment 115\" (SUCCESS) NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:34] INFO Changing status of job 629 to SUCCESS NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:34] INFO Finished syncing captures for deployment #115 Costa Rica - Forest Edge NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Saving and recalculating sessions for deployment NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Processed 0 files NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Syncing captures for deployment #115 Costa Rica - Forest Edge NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Changing status of job 629 to STARTED NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Running job #629 \"Sync captures for deployment 115\" (PENDING) NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|"
        ]
    },
    "logs": {
        "stdout": [
            "[2024-04-30 04:18:34] INFO Finished job #629 \"Sync captures for deployment 115\" (SUCCESS) NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:34] INFO Changing status of job 629 to SUCCESS NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:34] INFO Finished syncing captures for deployment #115 Costa Rica - Forest Edge NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Saving and recalculating sessions for deployment NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Processed 0 files NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Syncing captures for deployment #115 Costa Rica - Forest Edge NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Changing status of job 629 to STARTED NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|",
            "[2024-04-30 04:18:33] INFO Running job #629 \"Sync captures for deployment 115\" (PENDING) NR-LINKING|MzUxNDA2MHxBUE18QVBQTElDQVRJT058MTA1NTk1NTg3NQ|ad1ca2a760dd|382e977735f8d9766996baa560ca5605|310e8f0815e6eeb4|AMI%20Backend%20%28Staging%29|"
        ],
        "stderr": []
    },
    "job_type": {
        "name": "Data storage sync",
        "key": "data_storage_sync"
    },
    "data_export": null,
    "dispatch_mode": "internal",
    "result": null,
    "user_permissions": []
}