Subscription
The Subscription API allows you to list, create, update, search by ID, and delete subscriptions.
List subscriptions
Endpoints
GET notificationsvc/api/v1/subscription
Request
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
_count | Integer | Number of subscriptions. Default is 10. | Required |
_offset | Integer | Position in list of subscriptions to begin listing | Required |
_namespace | String | Project namespace | Optional |
_group.id | String | ID of group | Required |
_device.id | String | ID of device | Required |
_name | String | Name of subscription | Required |
_namespace | String | Project namespace | Optional |
Request body example
None
Response
Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response
{
_offset?: integer
_pageSize?: integer
_total?: integer
_list: {
_id?: string
_group: {
_id?: string
}
_device:#/components/schemas/Ref
_namespaces?: string[]
_status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]
_createdAt?: string
_updatedAt?: string
_requestedAt?: string
_acceptedAt?: string
_cancelledAt?: string
_version?: integer
}[]
}
Create subscription
Endpoints
POST notificationsvc/api/v1/subscription
Request
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
Request body example
{
_namespaces?: string[]
_device: {
_id?: string
}
_group:#/components/schemas/Ref
}
Response
Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response
{
_id?: string
_group: {
_id?: string
}
_device:#/components/schemas/Ref
_namespaces?: string[]
_status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]
_createdAt?: string
_updatedAt?: string
_requestedAt?: string
_acceptedAt?: string
_cancelledAt?: string
_version?: integer
}
Get subscription by ID
Endpoints
GET notificationsvc/api/v1/subscription/{id}
Request
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
Request body example
None
Response
Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response
{
_id?: string
_group: {
_id?: string
}
_device:#/components/schemas/Ref
_namespaces?: string[]
_status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]
_createdAt?: string
_updatedAt?: string
_requestedAt?: string
_acceptedAt?: string
_cancelledAt?: string
_version?: integer
}
Update subscription by ID
Endpoints
PUT notificationsvc/api/v1/subscription/{id}
Request
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
_version | Integer | Version of group | Optional |
Request body example
{
}
Response
Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response
{
_id?: string
_group: {
_id?: string
}
_device:#/components/schemas/Ref
_namespaces?: string[]
_status?: enum[CREATED, REQUESTED, ACCEPTED, CANCELLED]
_createdAt?: string
_updatedAt?: string
_requestedAt?: string
_acceptedAt?: string
_cancelledAt?: string
_version?: integer
}
Delete subscription by ID
Endpoints
DELETE notificationsvc/api/v1/subscription/{id}
Request
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
_version | String | Version to apply |
Request body example
Response
Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response