Request

Response

    Task 4 – Monitor a Job

    In Task 4, you will monitor the job you created in Task 3 until it is completed.

    By the end of this task, you will know how to query the status of a job.

    You will use the following operations for this task:

    OperationMethod + Endpoint
    Get a job GET queues/{queueId}/jobs/{jobId}

    Step 1 - Get the job

    Use the Get a job operation to get the status of the job you submitted in Task 3. Repeat the request until the job status is SUCCEEDED, which indicates that your job was successfully completed.

    Request

    curl -v 'https://developer.api.autodesk.com/flow/compute/v1/queues/@default/jobs/<JOB_ID_FROM_STEP_3>' \
        -X 'GET' \
        -H 'Authorization: Bearer <ACCESS_TOKEN_FROM_TASK_1>' \
    

    response

    {
        "createdAt": "2024-06-17T20:53:26.663Z",
        "endedAt": "2024-06-17T20:54:13.547Z",
        "id": "fa8270a2-b32e-43d5-8f7b-3771fd46277e",
        "name": "tutorial job",
        "results": {
            "details": {
            "stats": {
                "tasks": {
                "scheduled": 0,
                "succeeded": 1,
                "total": 1
                }
            }
            }
        },
        "status": "SUCCEEDED",
        "tags": [
            "tutorial job"
        ],
        "updatedAt": "2024-06-17T20:54:13.547Z"
    }
    
    Show More