Updated on 2024-04-10 GMT+08:00

Response

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

Status Code

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

For example, if status code 200 is returned for calling the API used to list instances, the request is successful.

Response Header

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

The following table describes common response headers.
Table 1 Common response headers

Header

Description

Content-Type

Type of the resource content.

Type: string

Default value: none

Connection

Whether the connection to the server is a long connection or a short connection.

Type: string

Valid values: keep-alive | close

Default value: none

Date

Date when the server responded to the request.

Type: string

Default value: none

X-Request-Id

Uniquely identifies the request. The value is generated by the service and can be used for troubleshooting.

Type: string

Default value: none

Response Body

The body of a response is often returned in structured format as specified in the Content-Type header field. The response body transfers content except the response header.

For the API in Listing Instances, the following message body is returned:
{
    "instances": [
        {
            "identity_store_id": "d-66f****b80",
            "instance_id": "ins-2c1e********f3c6",
            "alias": null,
            "instance_urn": "IdentityCenter::system:instance:ins-2c1e********f3c6"
        }
    ],
    "page_info": {
        "next_marker": null,
        "current_count": 1
    }
}

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

{
    "error_code": "IIC.1215",
    "error_msg": "only organizations administrator account can operate, please log in to the administrator account!",
    "request_id": "e311530********************51311"
}

In the response body, error_code is an error code. error_msg provides information about the error. request_id uniquely identifies the request and its value is generated by the service and can be used for troubleshooting.