This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Showing a Line Graph with vertical markers for all annotations
Hector Garcia Tellado edited this page Oct 31, 2017
·
1 revision
Annotations include all events, e.g. alerts generated by devices, operational actions like firmware upgrades, business events like public launches, etc. Annotations are generated out of band, by some service not in scope of the current PCS development phase. Some annotations are global events which apply to all devices.
These annotations can be shown in the line graphs using a vertical marker at the time when they occurred, so a user can correlate device behavior to external events.
Request with GET:
GET {Device Telemetry endpoint}/annotations?from={time}&to={time}&limit={how many}&devices=id1,id2,id3,...
Request with POST:
POST {Device Telemetry endpoint}/annotations-query
{
From: {time}
To: {time}
Limit: ...
devices: [ id1, id2, id3,... ]
}
Content-Type: application/json; charset=utf-8
{
Count: ...
Items: [
{
deviceid, time, description, status (only for alerts), etc.
$metadata
},
{
deviceid, time, description, status (only for alerts), etc.
$metadata
},
{
deviceid, time, description, status (only for alerts), etc.
$metadata
},
...
],
"$metadata": {
$type: AnnotationsList;1
$uri: ...
}
}
Note: the device Id might be null if the annotation is about a global event.
Use the data to add vertical lines in the Line Graph on the right time position.