Querying Sending Details of a Topic
Function
This API is used to query the data sent by a topic. You can query all metering data of the last 31 days.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/notifications/topics/{topic_urn}/statistics
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID.For details about how to obtain the project ID, see Obtaining the Project ID. |
topic_urn |
Yes |
String |
Unique resource identifier of a topic. To obtain the resource identifier, see Querying Topics. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
String |
Start time. |
end_time |
Yes |
String |
End time. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies a user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Unique request ID. |
total |
SumCountDetail object |
Total number of sent messages in a period. |
statistics |
Array of StatisticsDetail objects |
List of sending details in a period. |
Parameter |
Type |
Description |
---|---|---|
count |
CountDetail object |
Sending details in a period. |
start_time |
String |
Start time. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the unique ID of a request. |
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the unique ID of a request. |
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the unique ID of a request. |
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Example Requests
Querying sending details of a topic
GET https://{SMN_Endpoint}/v2/{project_id}/notifications/topics/urn:smn:regionId:8bad8a40e0f7462f8c1676e3f93a8183:test_topic/statistics?start_time="2025-02-17T16:00:00Z"&end_time='2025-02-19T15:59:59Z'
Example Responses
Status code: 200
OK
{ "request_id" : "stringxxxxxxxxxxxxxxx", "total" : { "sms" : 123 }, "statistics" : [ { "count" : { "sms" : 123 }, "start_time" : "2025-02-17T16:00:00Z" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
403 |
Unauthorized |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot