Getting Queue List

Last updated: 2019-07-05 12:20:22

PDF

1. API Description

This API (ListQueue) is used to display the queue list under the user's account, and the list can be obtained by page.

Domain for public network API request: cmq-queue-region.api.qcloud.com

Domain for private network API request: cmq-queue-region.api.tencentyun.com

  • region should be replaced with a specific region: gz (Guangzhou), sh (Shanghai), or bj (Beijing). The region value in the common parameters should be consistent with the region value of the domain. If there is an inconsistency, the request will be sent to the region specified by the domain.
  • Public network domain requests both support http and https. Private network requests only support HTTP.
  • Some of the input parameters are optional. If not specified, the default value will be taken.
  • All the output parameters will be returned to the user when the request is successful; otherwise, at least code, message, and requestId will be returned.

2. Input Parameters

The following request parameter list only provides API request parameters. For other parameters, refer to Common Request Parameters.

Parameter Name Required Type Description
searchWord No String The parameter is used to filter queue lists. The backend will return queue lists which meet the conditions through fuzzy match. If this parameter is not specified, all the queues under the account will be returned by default.
offset No Int The starting position from which the current page get the queue list when paging query is performed. If this value is specified, the "limit" is also required. By default, the backend will take the value as 0
limit No Int Number of queues obtained in this page when paging query is performed. If the parameter is not passed, the default value of 20 will be taken.

3. Output Parameters

Parameter Name Type Description
code Int Please refer to Error Codes
message String Error message.
requestId String Request ID generated by server. When there is an internal error on the server, users can submit this ID to the backend to locate the problem.
totalCount Int It indicates the total number of queues returned under the user account for this request, not the number of queues acquired in this page after paging query is performed.
queueList Array Queue list information. Each element indicates the information of one queue.

queueList is defined as follows:

Parameter Name Type Description
queueId String Unique ID of the queue.
queueName String Queue name. This is unique under the same account in one region. The queue name is a string of no more than 64 characters, which can contain letters, numbers, and hyphens (-) and must begin with a letter.

4. Example

Input:

 https://domain/v2/index.php?Action=ListQueue
 &searchWord=test
 &<Common request parameters>

Output:

{
"code" : 0,
"message" : "",
"requestId":"14534664555",
"totalCount":10
"queueList":
[
{
"queueId":"queue-asdfo",
"queueName":"test-queue1"
}
,
{
"queueId":"queue-asdsafo",
"queueName":"queue-test1"
}
]
}