Querying Job Details

Scenario

After a request is successfully received, a job id is returned. You can run the job to query the execution status. This part describes how to use a job ID to query job details.

Note

The token obtained from IAM is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently calling the IAM API.

Involved APIs

If you use a token for authentication, you must obtain the token and add X-Auth-Token to the request header of the IMS API when making an API call.

  • IAM API used to obtain the token

    URI format: POST https://IAM endpoint/v3/auth/tokens

  • IMS API used to query an asynchronous job

    URI format: GET https://IMS endpoint/v1/Project ID/jobs/Job ID

Procedure

  1. Obtain the token.

  2. Send GET https://IMS endpoint/v1/Project ID/jobs/Job ID.

  3. Add X-Auth-Token to the request header.

  4. Check the job details after the request is successfully processed. For details about the parameters, see "Asynchronous Job Query" in Image Management Service API Reference.