Push Device Subscription (GET)

Retrieves metadata of the subscriptions.

Description

The subscriptions can be obtained for application, for a particular tag, for a particular userId, for a particular deviceId and a combination of application, tag name, userId and deviceId

Roles

Users in the following roles are authorized to perform this operation:

  • worklightadmin
  • worklightdeployer
  • worklightmonitor
  • worklightoperator

Method

GET

Path

/management-apis/1.0/runtimes/runtime-name/notifications/applications/application-name/subscriptions

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/notifications/applications/myapplication/subscriptions?deviceId=testdevice&locale=de_DE&offset=1&size=6&tag-Name=testtag&userId=testuser

Path Parameters

runtime-name
The name of the runtime. This is the context root of the runtime web application, without the leading slash.
application-name
The name of the application.

Query Parameters

Query parameters are optional.

deviceId
The unique id of the device.
locale
The locale used for error messages.
offset
The offset from the beginning of the list if only a part of the list (a page) should be returned.
size
The number of elements to be returned.
tag-Name
The name of the tag.
userId
The user id.

Produces

application/json, application/xml, text/xml

Response

The metadata of the subscriptions.

JSON Example

{
  "offset" : 1,
  "productVersion" : "7.1.0",
  "size" : 6,
  "subscriptions" : [
    {
      "deviceId" : "testdevice",
      "tag-Name" : "testtag",
    },
    ...
  ],
  "totalListSize" : 6,
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<pushDevicesubscription
  offset="1"
  productVersion="7.1.0"
  size="6"
  totalListSize="6">
  <subscriptions>
    <subscription
      deviceId="testdevice"
      tag-Name="testtag"/>
    ...
  </subscriptions>
</pushDevicesubscription>

Response Properties

The response has the following properties:

offset
The offset from the beginning of the list if only a part of the list (a page) should be returned.
productVersion
The exact product version.
size
The number of elements to be returned.
subscriptions
The array of subscription metadata
totalListSize
The total number of subscriptions.

The pushDevicesubscription has the following properties:

deviceId
The unique id of the device.
tag-Name
The name of the tag.

Errors

403
The user is not authorized to call this service.
404
The corresponding runtime is not found or not running.
500
An internal error occurred.