For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Push Device Registrations (GET)
Retrieves all or a subset of existing device registration(s) of push.
Description
Device registrations for the push service are retrieved for the specified criteria
Method
GET
Path
/apps/applicationId/devices
Example
https://example.com:443/imfpush/v1/apps/myapp/devices?expand=true&filter=platform==A&offset=0&size=10&userId=admin
Path Parameters
- applicationId
- The name or identifier of the application
Query Parameters
Query parameters are optional.
- expand
- Retrieves additional metadata for every device registration that is returned in the response.
- filter
- Search criteria filter. 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.
- userId
- Retrieves device registrations only for the specified user.
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 "devices.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 registration that is retrieved.
JSON Example
{ "devices" : [ { "deviceId" : "12345-6789", "phoneNumber" : "123456789", "platform" : "A", "token" : "xyz", "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.
- phoneNumber
- Phone number to be used for SMS based notification.
- 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