Updated on 2024-08-02 GMT+08:00

Checking the Response

Status Codes

After sending a request, you will receive a response, including a status code, response header, and response body.

A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For details, see Status Codes.

If 201 is returned for calling the API used to create a query task, the request is successful.

Response Headers

Similar to a request, a response also has a header, for example, Content-Type.

(Optional) Response Body

This part is optional. The body of a response is often returned in a structured format (for example, JSON or XML) as specified in the Content-Type header field. The response body transfers content except the response header.

The following is part of the response body for the API used to create a query task:

{
  "job_id": "********"
}

If an error occurs during API calling, error code and error message will be displayed. The following shows an error response body.

{ 
    "error_msg": "The format of message is error", 
    "error_code": "AS.0001" 
}

In the error response, error_code indicates an error code, and error_msg describes the error.