- Documentation
Cloud Native Message Engine
BMQ Instance User Guide
API reference
How to call an API
Response
How to call an API
Response
Response
After sending a request message, you will receive a response from the server. The response includes a status code, response headers, and a message body.
The status code is a set of numeric codes ranging from 1xx to 5xx. The status code indicates the status of the request response.
- A status code of 200 indicates that the interface request was successful.
- Any status code other than 200 indicates that the interface request failed. Specific failure information is returned in JSON format.
Similar to request headers, the response also includes headers, such as "Content-Type".
The response body is usually returned in a structured JSON format, corresponding to the Content-Type in the response headers, and delivers content other than the response headers.
- An HTTP status code of 200 means the request succeeded. At this time, the server response includes two parts: ResponseMetadata and Result.
- Any status code other than 200 means the request failed. Failure information is returned in JSON format. The returned content always contains the Error field, which includes the Code and Message fields.
Example of a successful request response
"RequestId": "20230710165**46D402A032A4",
"Action": "CreateTopic",
"Version": "2023-06-01",
"TopicId": "f129bb8ddb5e**09a9133a9ce5"
tip
- <a i=1>ResponseMetadata</a> and its internal fields RequestId, Action, Version, Service, and Region are fixed fields. Regardless of whether the request is successful, as long as an API request is made, these fields will always be returned.
- RequestId is a unique identifier for an API request. If an API exception occurs, you can submit a ticket to contact technical support and provide this ID to help locate the issue.
- Result is a fixed field, and its content is defined by each product individually.
example of failed request
"RequestId": "2023032716310**FB8F08B25A60",
"Action": "CreateTopic",
"Version": "2023-06-02",
"Code": "InvalidActionOrVersion",
"Message": "Could not find operation CreateTopic for version 2023-06-02"
tip
- If the request call fails, the Result field will not be returned.
- If the request call fails, the Error field will always appear. The Error field contains the Code and Message fields, where:
- Code indicates the specific error code. You can resolve the issue yourself based on the error code.
- Message is the error information, describing the specific reason for the error to help you troubleshoot the issue. As business evolves or the experience is optimized, this text may be frequently changed or updated. It is not recommended to rely entirely on this return value.
Last updated: 2026.01.26 15:46:58