You need to enable JavaScript to run this app.
Message Queue for Kafka

Message Queue for Kafka

Copy page
Download PDF
How to call the API
Response
Copy page
Download PDF
Response
After sending the request message, you will receive a response from the message queue server. The response includes a status code, response headers, and the message body.​
Status code​
A status code is a set of numerical codes ranging from 1xx to 5xx. It indicates the request response status. For example, an HTTP status code of 2xx means the call was successful; an HTTP status code of 4xx or 5xx means the call failed.​
Response headers​
Corresponding to the request headers, the response also contains headers, such as Content-type.​
Response body​
The response body usually returns in a JSON structured format, matching the Content-Type in the response headers. It delivers content beyond the response headers. When an API call fails, an error code and error description are returned.​
  • An HTTP status code of 200 means the request succeeded. At this time, the server's response includes two parts: ResponseMetadata and Result.​
  • Any status code other than 200 means the request failed. Failure details are returned in JSON format, containing only ResponseMetadata and no Result field.​
  • The fields in ResponseMetadata are explained as follows. Aside from the fixed fields below, other fields returned by the API are business fields independently defined by each API. Please refer to each API's documentation for the business fields they return.​
​
Field​
​
Description​
RequestID​
​
A unique identifier for each API request. If an unknown error occurs when calling the API, contact technical support through the ticket system and provide the RequestID. Technical support will use the RequestID to locate the problematic request and assist in troubleshooting.​
Action​
​
Interface name, a common request parameter.​
Version​
​
Version number, a common parameter of the request.​
Service​
​
Service name, a common parameter of the request.​
Region​
​
Region, which belongs to the common parameters of the request.​
Error​
  • ​
Error indicates that this request has failed.​
​
Code​
Specific error codes. You can consult the documentation to resolve issues based on these codes.​
​
CodeN​
Numeric ID identifying the error code for easier issue tracking. Only some interfaces provide CodeN.​
​
Message​
Error message. It describes the specific cause of the error for your troubleshooting reference. With business development or experience optimization, this text may remain updated. Users should not rely on this return value.​
​
Example of successful request​
​
{​
"ResponseMetadata": {​
"RequestId": "2023022720461429AE2FDCE34FC0788D62",​
"Action": "DescribeGroups",​
"Version": "2022-05-01",​
"Service": "Kafka",​
"Region": "cn-beijing"​
},​
"Result": {​
"GroupsInfo": [​
{​
"GroupId": "kafka-cnng3s31v076****-connect-cluster",​
"State": "Stable"​
}​
],​
"Total": 1​
}​
}​
​
Example of failed request​
​
{​
"ResponseMetadata": {​
"RequestId": "202303271631047025808FFB8F08B25A60",​
"Action": "DescribeGroups",​
"Version": "2022-05-01",​
"Service": "Kafka",​
"Region": "cn-beijing",​
"Error": {​
"Code": "InvalidParameter.PageSize,PageNumber",​
"Message": "The specified parameter PageSize,PageNumber is not valid."​
}​
},​
"Result": null​
}​
​
​
Last updated: 2025.06.30 12:00:33