• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. API Reference
  4. Common Parameters
  5. Asynchronous Job Query

Asynchronous Job Query

Function

This API is an extension one. It is used to query the execution status of an asynchronous job, for example, an image exporting job.

URI

  • URI format

    GET /v1/{project_id}/jobs/{job_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    job_id

    Yes

    Specifies the asynchronous job ID.

Request

Example request

GET /v1/ac234de25c6741d2b1273da49eea1b9e/jobs/ff8080814dbd65d7014dbe0d84db0013

Response

  • Parameter description

    Parameter

    Type

    Description

    status

    String

    Specifies the job status. The value can be:

    SUCCESS: The job is successfully executed.

    FAIL: The job failed to be executed.

    RUNNING: The job is in progress.

    INIT: The job is being initialized.

    job_id

    String

    Specifies the job ID.

    job_type

    String

    Specifies the job type.

    begin_time

    String

    Specifies the start time of the job. The value is in UTC format.

    end_time

    String

    Specifies the end time of the job. The value is in UTC format.

    error_code

    String

    Specifies the error code.

    fail_reason

    String

    Specifies the cause of the failure.

    entities

    Dict

    Specifies the custom attributes of the job. If a job is properly executed, an image ID is returned. If an exception occurs on the job, an error code and associated information are returned.

  • Example response
    STATUS CODE 200
    {
        "status": "SUCCESS",
        "entities": {
            "image_id": "e9e91bff-14b6-4a0b-8377-4ed0813e3360"
        },
        "job_id": "ff8080814dbd65d7014dbe0d84db0013",
        "job_type": "createImageByInstance",
        "begin_time": "04-Jun-2015 18:11:06:586",
        "end_time": "",
        "error_code": null,
        "fail_reason": null
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.