Querying the Endpoints of an Application (Deprecated)
Function
This API is used to query the endpoints of an application.
URI
GET /v2/{project_id}/notifications/applications/{application_urn}/endpoints
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID.For details about how to obtain the project ID, see Obtaining the Project ID. |
application_urn |
Yes |
String |
Specifies the unique resource identifier of the application. To obtain it, see Querying an Application. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Specifies the offset. If the offset is an integer greater than 0 but less than the number of resources, all resources in excess of this offset will be queried. The default offset is 0. Default: 0 |
limit |
No |
Integer |
Specifies the maximum number of records in each query. The number ranges from 1 to 100 and is generally 10, 20, or 50. Specifies the number of resources returned on each page. The default number is 100. Default: 100 |
enabled |
No |
String |
Specifies whether a device is enabled. The value is a string and can be true or false. |
token |
No |
String |
Specifies the device token, which contains a maximum of 512 bytes. |
user_data |
No |
String |
Specifies the description or additional information about the endpoint. The value cannot exceed 2,048 bytes. |
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 |
Specifies the request ID, which is unique. |
next_page_flag |
Boolean |
Specifies whether a link to the next page is provided. |
endpoints |
Array of ApplicationEndpoint objects |
Specifies the Application_endpoint structure array. |
Parameter |
Type |
Description |
---|---|---|
create_time |
String |
Specifies the time when the application was created. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format. |
endpoint_urn |
String |
Specifies the unique resource ID of an application endpoint. |
user_data |
String |
Specifies the description or additional information about the endpoint. The value is a UTF-8 encoded string not exceeding 2,048 bytes. |
enabled |
String |
Specifies whether the endpoint is enabled. The value is a string and can be true or false. |
token |
String |
Specifies the device token, which contains a maximum of 512 bytes. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Example Requests
GET https://{SMN_Endpoint}/v2/{project_id}/notifications/applications/{application_urn}/endpoints?offset=0&limit=10 null
Example Responses
Status code: 200
OK
{ "request_id" : "c90d871f77f7425cae0a8b772a563d17", "next_page_flag" : false, "endpoints" : [ { "create_time" : "2018-01-12T01:25:14Z", "endpoint_urn" : "urn:smn:regionId:429ffced18074da0938112f2c362b935:endpoint-APNS-application_name-62f0bafec61c45fbbb5d0fc6bd696a2d", "user_data" : "no user data", "enabled" : "true", "token" : "1f2fda4c1013c47ac4c59bd22379d88e14b07b0ebf47f2f79d1a6b06ed03390d" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
403 |
Unauthorized |
404 |
Not Found |
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