The Device API allows you to list, create, update, search by ID, and delete devices.
List devices
Endpoints
GET platform-notificationsvc/api/v1/device
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
count | Integer | Maximum number of devices to return. Defaults to 10. | Optional |
offset | Integer | Index of the first result to return. Defaults to 0. | Optional |
ids | String | ID to match. Repeat the parameter to match more than one. | Optional |
createdAt.after | String | Match records created after this ISO-8601 timestamp. | Optional |
createdAt.before | String | Match records created before this ISO-8601 timestamp. | Optional |
updatedAt.after | String | Match records updated after this ISO-8601 timestamp. | Optional |
updatedAt.before | String | Match records updated before this ISO-8601 timestamp. | Optional |
owner.irn | String | IRN of the owning user, in the form passportsvc:user:<user id>. | Optional |
transport | String | Transport type: EMAIL, PUSH, WEBSOCKET or WEBHOOK. | Optional |
email.address | String | Email address of the device. | Optional |
Response
Codes
| Code | Description |
|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
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 platform-notificationsvc/api/v1/device
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
Request body
{
_owner: {
_irn: string
}
_transport: enum[EMAIL, PUSH, WEBSOCKET, WEBHOOK]
_email: {
_address: string
}
_webhook: {
_url: string
}
}
Response
Codes
| Code | Description |
|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
409 | Conflict |
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 platform-notificationsvc/api/v1/device/{id}
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
Response
Codes
| Code | Description |
|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
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 platform-notificationsvc/api/v1/device/{id}
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
version | Integer | Expected current version of the device. The request fails if it does not match. | Optional |
Request body
A device has no fields you can change after it is created. To use a different address or transport, delete the device and create a new one.
Response
Codes
| Code | Description |
|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
409 | Conflict |
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
}
Patch device by ID
Endpoints
PATCH platform-notificationsvc/api/v1/device/{id}
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
version | Integer | Expected current version of the device. The request fails if it does not match. | Optional |
Request body
A device has no fields you can change after it is created. To use a different address or transport, delete the device and create a new one.
Response
Codes
| Code | Description |
|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
409 | Conflict |
Response
Returns the updated device, in the same shape as Get device by ID.
Delete device by ID
Endpoints
DELETE platform-notificationsvc/api/v1/device/{id}
Permissions
Devices are not namespaced and carry no permission check. You can act only on devices you own, identified by owner.irn. A Platform Manager can act on any user's devices, and you can read devices owned by other members of your organization. For the full model, see Permissions and namespaces.
Request
Query parameters
| Parameter | Type | Description | Required |
|---|
nsfilter | String | Accepted but not used: devices have no namespace, so it does not scope a device request. See Devices. | Optional |
version | Integer | Expected current version of the device. The request fails if it does not match. | Optional |
Response
Codes
| Code | Description |
|---|
204 | No Content |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
409 | Conflict |
Response
No response body.