Skip to main content
Version: v5.3

Device

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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted but not used: devices have no namespace, so it does not scope a device request. See Devices.Optional
countIntegerMaximum number of devices to return. Defaults to 10.Optional
offsetIntegerIndex of the first result to return. Defaults to 0.Optional
idsStringID to match. Repeat the parameter to match more than one.Optional
createdAt.afterStringMatch records created after this ISO-8601 timestamp.Optional
createdAt.beforeStringMatch records created before this ISO-8601 timestamp.Optional
updatedAt.afterStringMatch records updated after this ISO-8601 timestamp.Optional
updatedAt.beforeStringMatch records updated before this ISO-8601 timestamp.Optional
owner.irnStringIRN of the owning user, in the form passportsvc:user:<user id>.Optional
transportStringTransport type: EMAIL, PUSH, WEBSOCKET or WEBHOOK.Optional
email.addressStringEmail address of the device.Optional

Response​

Codes​

CodeDescription
200Success
400Bad Request
403Forbidden
404Not 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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted 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​

CodeDescription
200Success
400Bad Request
403Forbidden
404Not Found
409Conflict

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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted but not used: devices have no namespace, so it does not scope a device request. See Devices.Optional

Response​

Codes​

CodeDescription
200Success
400Bad Request
403Forbidden
404Not 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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted but not used: devices have no namespace, so it does not scope a device request. See Devices.Optional
versionIntegerExpected 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​

CodeDescription
200Success
400Bad Request
403Forbidden
404Not Found
409Conflict

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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted but not used: devices have no namespace, so it does not scope a device request. See Devices.Optional
versionIntegerExpected 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​

CodeDescription
200Success
400Bad Request
403Forbidden
404Not Found
409Conflict

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​

ParameterTypeDescriptionRequired
nsfilterStringAccepted but not used: devices have no namespace, so it does not scope a device request. See Devices.Optional
versionIntegerExpected current version of the device. The request fails if it does not match.Optional

Response​

Codes​

CodeDescription
204No Content
400Bad Request
403Forbidden
404Not Found
409Conflict

Response​

No response body.