Version history
Date | Version | Changes | Author |
16.1.2023 | 1.0 | Devices status updates push API | YL |
2 Glossary 3 Interfaces overview
4 Devices status updates push API
Device Manager (DM) product interfaces provide a way output information of devices details.
Device Manager (DM) – web application which provides client devices management.
Backend software – the application which intends to integrate to Device Manager
Push devices status updates
Backend
DM
The devices status updates push interface is used to send events from DM to backend.
Called when there were devices status updates during the configured period (disabled by default).
Call:
[POST] <URL to be specified by the customer>
Auth: basic authentication
Request body:
{
String messageId, // globally unique message id
Device[] devices
}
where Device is:
{
String localName,
String deviceName,
String description, // optional
String applicationName, // optional
String deviceModel,
String uniqueId,
String host, // optional
String applicationVersion,
String statusMessage, // optional
String deviceStatus,
Subcomponent[] subcomponents
}
Where Subcomponent is:
{
String componentStatus,
String componentName,
String componentDetails // optional
}
where ‘Device.deviceStatus’ and ‘Subcomponent.componentStatus’ have values:
OK, // component is totally ok
DISABLED, // component is disabled (not an error state)
WARNING, // component is in the warning state (it’s not one of the error
states)
ERROR, // component is in the error state
UNKNOWN, // component state is unknown (considered as error state)
DISCONNECTED, // component is disconnected. Is being considered as an
error state in alerters. This error state is calculated by DM itself for
the device's main status based on a poll message from a client to DM
CRITICAL // separate error state for critical errors. Is being
considered an error state in alerters
Request body example:
{
"messageId": "363f1e0e-bb19-4e0c-b44e-22ec26261102",
"devices": [
{
"localName": "LOC-X",
"deviceName": "DEV-X",
"description": "DESCR",
"applicationName": "APP-X",
"deviceModel": "MODEL-X",
"uniqueId": "UNQ-X",
"host": "acme.com",
"applicationVersion": "APP-V-X",
"statusMessage": "STATUS",
"deviceStatus": "OK",
"subComponents": [
{
"componentStatus": "DISCONNECTED",
"componentName": "COMP-X",
"componentDetails": "DETAILS"
}
]
}
]
}
Return:
204: operation was successful
400: operation failed, JSON response body should be provided:
{
String[] errors // human readable error messages in English
}
Error response example:
{
"errors": [
"field A is null",
"field Z is empty"
]
}