Skip to content

Notes

Description

The notes module allows to add notes to devices.

Events

Following events are transmitted via the websocket.

This event is fired when a new note is added to a device. This event requires read access to the resource notes.

NameDescription
type
stringconstant
Constant value: NOTE_MESSAGE_ADD
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$
createdAt
integer
Creation timestamp of the note
updatedAt
integeroptional
The last update of the note
id
integer
Unique identifier for the note.
author
string
The author of the note.
note
string
The content of the note.

API

Create Note

Adds a new note for the given device

POST
/api/v1/notes/:deviceIdentifier

Access

This endpoint requires create permission for the resource notes.

URL Parameter

NameDescription
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$

Request Body

NameDescription
note
string
The content of the note.

Response

NameDescription
noteIdentifier
integer
Unique identifier for the note.

Update Note

Updates a given note

PUT
/api/v1/notes/:deviceIdentifier/:noteIdentifier

Access

This endpoint requires update permission for the resource notes.

URL Parameter

NameDescription
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$
noteIdentifier
integer
Unique identifier for the note.

Request Body

NameDescription
note
string
The content of the note.

Response

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

Delete Notes

Deletes a single note

DELETE
/api/v1/notes/:deviceIdentifier/:noteIdentifier

Access

This endpoint requires delete permission for the resource notes.

URL Parameter

NameDescription
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$
noteIdentifier
integer
Unique identifier for the note.

Response

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

List Notes

Returns all notes

GET
/api/v1/notes

Access

This endpoint requires read permission for the resource notes.

Query Parameter

NameDescription
depth
integeroptional
Due to the fact that some resources follow certain hierarchies, the depth query parameter can be used to include nested information in the response. This can be used to minimize roundtrips and is generally advised for.

Response

NameDescription
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$
notes
arrayoptional
All notes for the given device
notes.[ ].createdAt
integer
Creation timestamp of the note
notes.[ ].updatedAt
integeroptional
The last update of the note
notes.[ ].id
integer
Unique identifier for the note.
notes.[ ].author
string
The author of the note.
notes.[ ].note
string
The content of the note.

List Device Notes

Returns all notes for a given device

GET
/api/v1/notes/:deviceIdentifier

Access

This endpoint requires read permission for the resource notes.

URL Parameter

NameDescription
deviceIdentifier
string
The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API.
Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$

Response

NameDescription
createdAt
integer
Creation timestamp of the note
updatedAt
integeroptional
The last update of the note
id
integer
Unique identifier for the note.
author
string
The author of the note.
note
string
The content of the note.