Push Device Subscription (GET)
Retrieves all or a subset of existing subscriptions
Description
The subscriptions of push service is retrieved for the given criteria.
Method
GET
Path
/apps/applicationId/subscriptions
Example
https://example.com:443/myproject/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
- Retrives subscriptions only for the specified deviceId
- expand
- Retrives 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
- Retrives 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 "get-subscriptions" obtained using the confidential client in the format Bearer token.. This parameter has to be mandatorily set.
- mfpEnvironmentName
- (Optional) The environment name to use while executing the request.
- mfpEnvironmentVersion
- (Optional) The application version to use while executing the request.
Produces
application/json
Response
The details of the device registration 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
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.