Appearance
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.
| Name | Description |
|---|---|
typestringconstant | Constant value: NOTE_MESSAGE_ADD |
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$ |
createdAtinteger | Creation timestamp of the note |
updatedAtintegeroptional | The last update of the note |
idinteger | Unique identifier for the note. |
authorstring | The author of the note. |
notestring | 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
| Name | Description |
|---|---|
deviceIdentifierstring | 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
| Name | Description |
|---|---|
notestring | The content of the note. |
Response
| Name | Description |
|---|---|
noteIdentifierinteger | 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
| Name | Description |
|---|---|
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$ |
noteIdentifierinteger | Unique identifier for the note. |
Request Body
| Name | Description |
|---|---|
notestring | 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
| Name | Description |
|---|---|
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$ |
noteIdentifierinteger | 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
| Name | Description |
|---|---|
depthintegeroptional | 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
| Name | Description |
|---|---|
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$ |
notesarrayoptional | All notes for the given device |
notes.[ ].createdAtinteger | Creation timestamp of the note |
notes.[ ].updatedAtintegeroptional | The last update of the note |
notes.[ ].idinteger | Unique identifier for the note. |
notes.[ ].authorstring | The author of the note. |
notes.[ ].notestring | 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
| Name | Description |
|---|---|
deviceIdentifierstring | The unique device identifier. Albeit being case insensitive, the upper case representation is used throughout the API. Pattern: ^(\S.)?(\\*|[a-zA-Z0-9=-]+)$ |
Response
| Name | Description |
|---|---|
createdAtinteger | Creation timestamp of the note |
updatedAtintegeroptional | The last update of the note |
idinteger | Unique identifier for the note. |
authorstring | The author of the note. |
notestring | The content of the note. |