For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Push Device Subscriptions (GET)
Retrieves all or a subset of existing subscriptions
Description
Retrieves subscriptions for the push service for the specified criteria.
Method
GET
Path
/apps/applicationId/subscriptions
Example
https://example.com:443/imfpush/v1/apps/myapp/subscriptions?deviceId=12345-6789&expand=true&filter=tagName=@tag&offset=0&size=10&tagName=sports&userId=user1
Path Parameters
- applicationId
- The name or identifier of the application
Query Parameters
Query parameters are optional.
- deviceId
- Retrieves subscriptions only for the specified deviceId
- expand
- Retrieves additional metadata for every subscription that is returned in the response
- filter
- The filter specifies the search criteria. Refer to the filter section for detailed syntax
- offset
- Pagination offset that is normally used along with the size
- size
- Pagination size that is normally used along with the offset to retrieve a subset
- tagName
- Retrieves subscriptions only for the specified tagName
- userId
- Retrives subscriptions only for the specified userId
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 has to be mandatorily set.
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 subscriptions.
- 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
401Unauthorized - The caller is either not authenticated or not authorized to make this request.406
Unsupported Accept type - The content type specified in Accept header is not application/json.500
An internal error occurred.
Parent topic: REST API for the MobileFirst Server push service