Queries the list of topics that belong to an Alibaba Cloud account. The topics are displayed by page.
Description
You can call this operation to query the list of topics that belong to an Alibaba
Cloud account. The topics are displayed by page. To query the list of topics that
contain a specific prefix, you can specify the x-mns-prefix
parameter when you call the ListTopic operation.
x-mns-ret-number
parameter, the NextMarker
parameter that indicates the start position of the next page is returned. When you
send another request to query the remaining topics, you must set the x-mns-marker
parameter to the returned value of the NextMarker parameter.
Request
Each request consists of the following parts:
- Request line
GET /topics HTTP/1.1
- Operation-specific request headers
Parameter Required Description x-mns-marker No The start position of the page. Set this parameter to the value of NextMarker
in the previous response.x-mns-ret-number No The maximum number of topics that can be returned for a single request. Valid values: 1 to 1000. Data type: integer. Default value: 1000. x-mns-prefix No The prefix of the topics to be queried. For more information about other parameters, see Common parameters.
- Request Body
None.
Response
Each response consists of the following parts:
- HTTP Status Code
HTTP/1.1 200 OK
- Operation-specific response headers
None. For more information about common response headers, see Common parameters.
- Response Body
The response body is in the XML format. A list of topics is returned and each topic includes a topic URL. If the number of the returned topics exceeds the value of the
x-mns-ret-number
parameter, the value of theNextMarker
parameter that indicates the start position of the next page is returned.
Examples
Sample requests
GET /topics HTTP/1.1
x-mns-ret-number:2
Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
Date: Tue, 08 Dec 2015 05:59:22 GMT
Authorization: NS15B4D3461F177624206A:ytChIeJt2klpvFxGCgVsPNI015k=
x-mns-version: 2015-06-06
Sample success responses
HTTP/1.1 200 OK
x-mns-request-id:566671BAB2B71C9C16000019
x-mns-version: 2015-06-06
<? xml version="1.0" encoding="utf-8"? >
<Topics xmlns="http://mns.aliyuncs.com/doc/v1/">
<Topic>
<TopicURL>http://$AccountId.mns.cn-hangzhou.aliyuncs.com/topics/$TopicName1</TopicURL>
</Topic>
<Topic>
<TopicURL>http://$AccountId.mns.cn-hangzhou.aliyuncs.com/topics/$TopicName2</TopicURL>
</Topic>
<NextMarker>OTczNjU4MTcvYmRwejd6NXluby8yNjg0Mi9UZXN0VG9waWMtMy8w</NextMarker>
</Topics>