For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Create Subscription (POST)
Creates a new subscription for a tag.
Roles
Users in the following roles are authorized to perform this operation:
- mfpadmin
- mfpdeployer
- mfpoperator
Method
POST
Path
/management-apis/2.0/runtimes/runtime-name/notifications/applications/application-name/subscriptions
Example
https://www.example.com/mfpadmin/management-apis/2.0/runtimes/myruntime/notifications/applications/myapplication/subscriptions?action={/"delete/"}&locale=de_DE
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.
- action
- When set to delete, this parameter unsubscribes a device from the list of tags that is specified in the tagNames field of the JSON body.
- locale
- The locale used for error messages.
Consumes
application/json
Produces
application/json, application/xml, text/xml
Payload
JSON Example
{ "deviceId" : "12345-6789", "tagName" : "SampleTag", }
Payload Properties
The payload has the following properties:
- deviceId
- The unique identifier of the device
- tagName
- The tag name to subscribe.
Errors
400The request was not understood by the push server.403
The user is not authorized to call this service.404
The corresponding runtime or application is not found or not running.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 administration service