Push Device Subscription (POST)
Creates a new subscription for a tag.
Description
Given the deviceId and the tag name, the request creates a new subscription which subscribes the device to the tag specified
Method
POST
Path
/apps/applicationId/subscriptions
Example
https://example.com:443/imfpush/v1/apps/myapp/subscriptions
Path Parameters
- applicationId
 - The name or identifier of the application
 
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.write" and "push.application.<applicationId>" obtained using the confidential client in the format Bearer token.. This parameter has to be mandatorily set.
 - Content-Type
 - Specify the JSON content type. This parameter has to be mandatorily set.
 
Consumes
application/json
Produces
application/json
Payload
The details of the device and the tag name to which it has to subscribe.
JSON Example
{
  "deviceId" : "12345-6789",
  "tagName" : "testTag",
}Payload Properties
The payload has the following properties:- deviceId
 - The unique id of the device.
 - tagName
 - The tag name to subscribe.
 
Response
The details of the device subscription that is updated.
JSON Example
{
  "deviceId" : "12345-6789",
  "tagName" : "testTag",
}Response Properties
The response has the following properties:
- deviceId
 - The unique id of the device.
 - tagName
 - The tag name to subscribe.
 
Errors
400A device registraion has userId longer than 254 characters.401
Unauthorized - The caller is either not authenticated or not authorized to make this request.404
A device registraion with the specified deviceId is not found.405
Unsupported Content type - The content type specified in Content-Type header is not application/json.406
Unsupported Accept type - The content type specified in Accept header is not application/json.500
An internal error occurred.