Query SNS Topic Subscribers

GET/zstack/v1/sns/topics/subscribers
GET/zstack/v1/sns/topics/subscribers/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sns/topics/subscribers?q=topicUuid=3677dc0f00964b80886f3b2bbf9338cd
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sns/topics/subscribers/15b4071325193fdcbae66b6388ea9c6f

Queryable Fields

Run the CLI command line tool, type QuerySNSTopicSubscriber and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "topicUuid": "3677dc0f00964b80886f3b2bbf9338cd",
      "endpointUuid": "f8c5c56233844126ad5f5a0174da3098"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 5.0.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error2.3.1
inventoriesListFor details, see inventories2.3.1

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.2.3.1
descriptionStringA brief description of the error2.3.1
detailsStringDetailed information about the error2.3.1
elaborationStringReserved field. Default is null.2.3.1
opaqueLinkedHashMapReserved field. Default is null.2.3.1
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.2.3.1

inventories

NameTypeDescriptionStarting Version
topicUuidStringTopic UUID2.3.1
endpointUuidStringEndpoint UUID2.3.1
createDateTimestampCreation time2.3.1
lastOpDateTimestampLast modification time2.3.1

SDK Examples

Java SDK

QuerySNSTopicSubscriberAction action = new QuerySNSTopicSubscriberAction();
action.conditions = asList("topicUuid=3677dc0f00964b80886f3b2bbf9338cd");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySNSTopicSubscriberAction.Result res = action.call();

Python SDK

QuerySNSTopicSubscriberAction action = QuerySNSTopicSubscriberAction()
action.conditions = ["topicUuid=3677dc0f00964b80886f3b2bbf9338cd"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySNSTopicSubscriberAction.Result res = action.call()