In this article
Get Subscription
Use this endpoint to view subsciptions based on the subscriber.
URL
https://api.digitalvault.cloud/subscription?subscriber={{subscriber}}
Method
GET
Required IMS Scopes
subscription_write
URL Parameters
| Name | Description |
|---|---|
| subscriber | Subscriber to list subscriptions for |
Request Header Parameters
| Property | Description | |
|---|---|---|
| Authentication | Bearer {access_token} required |
Retrieve access token |
Response Body Parameters
Reponse will be a list of the following:
| Name | Description |
|---|---|
| id | A unique identifier representing the created subscription |
| type | One of: Device, Timeseries |
| id | For Device, {{DEVICE_ID}}. For Timeseries, {{TIMESERIES_ID}}:{{METRIC_NAME}} |
Errors
| Error | Description |
|---|---|
| 400 | Invalid URL Params given |
| 401 | Unauthorized |
Example
Request
GET https://api.digitalvault.cloud/subscription?subscriber=sub:app:testApp1
Response
{
"id": "sub:app:testApp2:1cb8823defe84e2ca2b26befa6df69fd:Device:subscriptionDevTest1",
"subscriber": "sub:app:testApp1",
"source": {
"type": "Device",
"id": "subscriptionDevTest1"
}
Notes
- Use the following formats to define the subscriber:
- User = ‘sub:user:{{USERID}}’
- Application: ‘sub:app:{{APPID}}’