Device
The Device API allows you to list, create, update, search by ID, and delete devices.
List devices#
Endpoints#
GET notificationsvc/api/v1/deviceRequest#
Request body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
_count | Integer | Number of devices to be listed. Default is 10. | Required |
_offset | Integer | Position in list of device to begin listing | Required |
_externalId | String | ID of device | Required |
_name | String | Name of device | 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: { requestedAt?: string acceptedAt?: string cancelledAt?: string _id?: string _owner: { _irn: string } _status?: enum[OK, FAILING, BLOCKED] _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK] _email: { _address: string } _webhook: { _url: string } _createdAt?: string _updatedAt?: string _version?: integer }[]}Create device#
Endpoints#
POST notificationsvc/api/v1/deviceRequest#
Request body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
Request body example#
{ _owner: { _irn: string } _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK] _email: { _address: string } _webhook: { _url: string }}Response#
Codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response#
{ requestedAt?: string acceptedAt?: string cancelledAt?: string _id?: string _owner: { _irn: string } _status?: enum[OK, FAILING, BLOCKED] _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK] _email: { _address: string } _webhook: { _url: string } _createdAt?: string _updatedAt?: string _version?: integer}Get device by ID#
Endpoints#
GET notificationsvc/api/v1/device/{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#
{ requestedAt?: string acceptedAt?: string cancelledAt?: string _id?: string _owner: { _irn: string } _status?: enum[OK, FAILING, BLOCKED] _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK] _email: { _address: string } _webhook: { _url: string } _createdAt?: string _updatedAt?: string _version?: integer}Update device by ID#
Endpoints#
PUT notificationsvc/api/v1/device/{id}Request#
Request body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_nsFilter | String | Event filter to apply | Optional |
_version | Integer | Version of device | Optional |
Request body example#
Response#
Codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response#
{ requestedAt?: string acceptedAt?: string cancelledAt?: string _id?: string _owner: { _irn: string } _status?: enum[OK, FAILING, BLOCKED] _transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK] _email: { _address: string } _webhook: { _url: string } _createdAt?: string _updatedAt?: string _version?: integer}Delete device by ID#
Endpoints#
DELETE notificationsvc/api/v1/device/{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#