Querying Platform Applications

Function

This API is used to query the platform application list.

URI

GET /v2/{project_id}/notifications/applications

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

See Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Specifies the offset.

If the value is an integer greater than 0 but less than the number of resources, all resources after this offset will be queried. The default value is 0.

Default value: 0

limit

No

Integer

Specifies the maximum number of records in each query.

The value ranges from 1 to 100 and is generally 10, 20, or 50, indicating the number of resources returned on each page. The default value is 100.

Default value: 100

name

No

String

Specifies the application name entered for a search.

The value contains a maximum of 64 characters and consists of letters, underscores (_), and digits. Backward fuzzy match is supported.

platform

No

String

Specifies the application platform.

Only HMS, APNS, and APNS_SANDBOX are supported.

HMS is a platform for developers to push Android messages.

APNS and APNS_SANDBOX are platforms for pushing iOS messages.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

application_count

Integer

Specifies the number of returned applications. No matter what offset and limit values you have set in the request, this parameter always returns the total number of applications.

applications

Array of ApplicationItem objects

For details, see Table 5.

Table 5 ApplicationItem

Parameter

Type

Description

name

String

Specifies the application name.

platform

String

Specifies the application platform.

create_time

String

Specifies the time when the application was created. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format.

application_urn

String

Specifies the unique resource identifier of the application.

application_id

String

Specifies the application ID, which is unique.

enabled

String

Specifies whether the platform application is enabled.

apple_certificate_expiration_date

String

Specifies the time when the Apple certificate expires. This parameter is available only for the APNS and APNS_SANDBOX platforms. The value is a UTC time in YYYY-MM-DDTHH:MM:SSZ format.

Status code: 400

Table 6 Response body parameters

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

Table 7 Response body parameters

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

Table 8 Response body parameters

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

Table 9 Response body parameters

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?offset=0&limit=100&name=application_name&platform=APNS

null

Example Responses

Status code: 200

OK

{
  "request_id" : "6a63a18b8bab40ffb71ebd9cb80d0085",
  "application_count" : 2,
  "applications" : [ {
    "create_time" : "2018-02-08T08:30:16Z",
    "apple_certificate_expiration_date" : "2018-03-09T12:21:40Z",
    "name" : "application_name001",
    "platform" : "APNS",
    "enabled" : "true",
    "application_urn" : "urn:smn:regionId:429ffced18074da0938112f2c362b935:app-APNS-application_name001",
    "application_id" : "b1b8643dc12b4g77ad6e35a16003119b"
  }, {
    "create_time" : "2018-01-11T12:58:58Z",
    "apple_certificate_expiration_date" : "2018-03-09T12:21:40Z",
    "name" : "application_name002",
    "platform" : "APNS",
    "enabled" : "true",
    "application_urn" : "urn:smn:regionId:429ffced18074da0938112f2c362b935:app-APNS-application_name002",
    "application_id" : "a3a4643dc12b4g77ad6e35a16002558c"
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

403

Unauthorized

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.