Note: For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Push Device Subscription (GET)

Retrieves an existing subscription of push.

Description

The subscription referenced by the subscriptionId is retrieved.

Method

GET

Path

/apps/applicationId/subscriptions/subscriptionId

Example

https://example.com:443/imfpush/v1/apps/myapp/subscriptions/mysubscription

Path Parameters

applicationId
The name or identifier of the application.
subscriptionId
The identifier of the subscription.

Header Parameters

Some header parameters are optional.

Accept-Language
(Optional) The preferred language to use for error messages. Default: en-US
Authorization
The token with the scope "subscriptions.read" and "push.application.<applicationId>" obtained using the confidential client in the format Bearer token.This parameter is mandatory.

Produces

application/json

Response

The details of the device subscription that is retrieved.

JSON Example

{
  "devices" : [
    {
      "deviceId" : "12345-6789",
      "platform" : "A",
      "token" : "12345-6789",
      "userId" : "admin",
    },
    ...
  ],
  "pageInfo" : {
    "count" : "2",
    "next" : "",
    "previous" : "",
    "totalCount" : "10",
  },
}

Response Properties

The response has the following properties:

devices
The array of device registrations with Push.
pageInfo
The pagination information

The devices has the following properties:

deviceId
The unique id of the device.
platform
The device platform.
token
The unique push token of the device.
userId
The userId of the device.

The pageInfo has the following properties:

count
The number of device registration that are retrieved
next
A hyperlink to the next page
previous
A hyperlink to the previous page
totalCount
The total number of device registration present for the given search criteria

Errors

401
Unauthorized - The caller is either not authenticated or not authorized to make this request.
404
The subscription with the specified subscriptionId is not found.
500
An internal error occurred.