Add serial numbers to an existing subscription

The add serial numbers to an existing subscription request allows the client application to add new device serial numbers to an existing subscription.

Add serial numbers to an existing subscription describes the API structure for adding serial numbers to an existing subscription.

Table 1. Add serial numbers to an existing subscription
Title Add serial numbers to an existing subscription
URL http://<impact_url>/m2m/subscriptions/{serialNumber}/serialNumbers
Method POST
Content-Type application/json
URL Params

The following are the URL parameters:

  • serialNumber:[string]: Specifies the list of serial numbers of the devices that needs to be added in the list of observed resources

    Example:

    addRequest=  {
      "serialNumbers": [
        "string"
      ]
    }
    Note:

    Multiple serial numbers can be provided as input by separating each string value with comma (,) operator.

  • subscriptionID:[string]: Specifies the subscription correlator ID to which new devices are to be added

Data Params

subscriptionID:[string]: Subscription correlator ID for which observed devices list is extended.

Msg:[String] : info/warning/error message

Example:
{
  "subscriptionId": "string",
  "msg": "string", "Code": 1000
}
Success Code
Response Code: 200
Error Code
201 : Created 
401 : Unauthorized 
403 : Forbidden 
404 : Not Found
Sample Call

Curl:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json'  --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM=' -d '{
  "serialNumbers": [
    "111111","222222"
  ]
}' 'http://<impact_url>/m2m/subscriptions/d7588da6-cd36-455f-8af5-3376e886a3e3/serialNumbers'
Response Body:
{
  "subscriptionId": "d7588da6-cd36-455f-8af5-3376e886a3e3",
  "msg": "Success","code":1000
}
Notes None