Managing Serialnumbers of a Subscription

Subscriptions form a central role in routing the endpoint data to your registered application. A subscription selects which devices data to route to your application.

Note in NB-IOT protocol adaptation layers we subscribe to 1 specific resourcePath for the data reception: uplinkMsg/0/data.

1. View current serial numbers of an subscription

List all subscriptions

curl -X GET \
  'https://api.scs.iot.telekom.com/m2m/subscriptions?type=resources&groupName=SK_TMNL_01' \
    -H 'Authorization: Basic xxx'

Or list serial numbers of a specific subscription

curl -X GET \
  https://api.scs.iot.telekom.com/m2m/subscriptions/2ccae8ff-65b2-4b74-a4c6-88ab7481af5d/serialNumbers \
  -H 'Authorization: Basic xxx'

2. Add serialnumbers to a subscription

We can add an array of serial numbers to the existing subscription

curl -X POST \
  https://api.scs.iot.telekom.com/m2m/subscriptions/2ccae8ff-65b2-4b74-a4c6-88ab7481af5d/serialNumbers \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic xxx' \
  -d ' { "serialNumbers": [ "IMEI:000018080028368" ] }'

3. Remove serial numbers from a subscription

In the same way as adding serial numbers. They can be removed from the subscription too.

curl -X DELETE \
  https://api.scs.iot.telekom.com/m2m/subscriptions/2ccae8ff-65b2-4b74-a4c6-88ab7481af5d/serialNumbers \
  -H 'Authorization: Basic xxx' \
  -H 'Content-Type: application/json' \
  -d ' { "serialNumbers": [ "IMEI:000018080028368" ] }'

📘

One or multiple subscriptions?

Until now in our examples we often created one subscription per serial number. What approach should we take when we have multiple serial numbers in our group?
We noticed that once a subscription is operating according to the your wishes it is more stable to manipulate it's serial numbers instead of manipulating many different subscriptions which could have slightly different behavior.


Did this page help you?