Download OpenAPI specification:Download
This is the public api of the Cockpit sever. It provides read-access to your Saveris 1 base and logger channel data.
Responds with a list of available active bases in a Saveris setup.
curl --location --request GET 'http://localhost/api/v1/bases' \ --header 'Accept: application/json' \ --header 'x-access-token: <API Key>'
[- {
- "alarms": [
- {
- "condition": {
- "type": 3,
- "event": 12
}, - "createdAt": "2022-04-27T11:02:37.000Z",
- "severity": 2,
- "ticketId": "5c70ca2d8810321a0729f8337c13600c79202bca",
- "type": 1,
- "base": {
- "baseId": "My0xODcwMDcwMzU4",
- "baseName": "Basement1"
}
}, - {
- "condition": {
- "type": 3,
- "event": 12
}, - "createdAt": "2022-04-06T07:34:23.000Z",
- "severity": 2,
- "ticketId": "a0f16f4898fe6b524dce363963f056e517f2a7c0",
- "type": 1,
- "base": {
- "baseId": "My0xODcwMDcwMzU4",
- "baseName": "Basement1"
}
}
], - "id": "My0xODcwMDcwMzU4",
- "name": "Basement1",
- "sn": 1870070358
}
]
Responds with a list of available channels registered to one base.
baseId required | string |
offset | integer Default: 0 Index (starting at 0) at which the returned channel list should start |
limit | integer Default: 10 Maximum number of channels that should be included in the reponse |
curl --location --request GET 'http://localhost/api/v1/bases/<Base Id>/channels?offset=0&limit=10' \ --header 'Accept: application/json' \ --header 'x-access-token: <API Key>'
{- "channels": [
- {
- "device": {
- "name": "45802911",
- "serial": 45802911
}, - "id": "My0x",
- "name": "45802911_1",
- "lastMeasurement": {
- "date": "2022-04-27T15:40:00.000Z",
- "displayUnit": "°C",
- "value": 25.8
}
}, - {
- "device": {
- "name": "45802911",
- "serial": 45802911
}, - "id": "My0y",
- "name": "45802911_2",
- "lastMeasurement": {
- "date": "2022-04-27T15:40:00.000Z",
- "displayUnit": "%rH",
- "value": 10.23
}
}, - {
- "device": {
- "name": "45802911",
- "serial": 45802911
}, - "id": "My0z",
- "name": "45802911_3",
- "lastMeasurement": {
- "date": "2022-04-27T15:40:00.000Z",
- "displayUnit": "g/m³",
- "value": 73.9
}
}, - {
- "device": {
- "name": "45802911",
- "serial": 45802911
}, - "id": "My00",
- "name": "45802911_3",
- "lastMeasurement": {
- "date": "2022-04-27T15:40:00.000Z",
- "displayUnit": "td °C",
- "value": 6.09
}
}
], - "count": 4,
- "total": 4
}
Responds with detailed information about one channel.
baseId required | string |
channelId required | string |
curl --location --request GET 'http://localhost/api/v1/bases/<Base Id>/channels/<Channel Id>' \ --header 'Accept: application/json' \ --header 'x-access-token: <API Key>'
{- "id": "My0x",
- "name": "channel1_1",
- "device": {
- "name": "logger1",
- "serial": 1000001
}, - "lastMeasurement": {
- "date": "2022-05-02T13:13:00.000Z",
- "displayUnit": "°C",
- "value": 12.5
}, - "alarms": [
- {
- "condition": {
- "type": 3,
- "event": 5
}, - "createdAt": "2022-02-24T11:38:00.000Z",
- "severity": 2,
- "ticketId": "1adb47896a947da3347646cf4009f019eca4d534",
- "type": 1,
- "channel": {
- "channelId": "My0x",
- "channelName": "channel1_1"
}
}, - {
- "condition": {
- "type": 2,
- "activationValue": {
- "displayUnit": "°C",
- "value": 30.2
}, - "thresholdValue": {
- "displayUnit": "°C",
- "value": 28
}
}, - "createdAt": "2022-02-25T12:15:00.000Z",
- "severity": 2,
- "ticketId": "123b47896a947da3447646cf4009f019eca4d535",
- "type": 3
}
]
}
Responds with measurement values for a channel of a specified time interval.
Maximum time range 6 months.
If start
and end
are undefined, measurement data for the last month is returned (start
defaults to one month ago, end
defaults to now).
baseId required | string The identifier of the base. |
channelId required | string The identifier of the channel. |
start | string (TimeString) Start time as ISO8601 formatted string of the interval from which measurement values should be queried. |
end | string (TimeString) End time as ISO8601 formatted string of the interval from which measurement values should be queried. |
curl --location --request GET 'http://localhost/api/v1/bases/<Base Id>/channels/<Channel Id>/measurements?start=<ISO Date>&end=<ISO Date>' \ --header 'Accept: application/json' \ --header 'x-access-token: <API Key>'
{- "displayUnit": "°C",
- "start": "2022-05-02T14:05:00.000Z",
- "end": "2022-05-02T14:10:00.000Z",
- "values": [
- {
- "date": "2022-05-02T14:05:00.000Z",
- "value": 10
}, - {
- "date": "2022-05-02T14:06:00.000Z",
- "value": 10.12
}, - {
- "date": "2022-05-02T14:07:00.000Z",
- "value": 10.15
}, - {
- "date": "2022-05-02T14:08:00.000Z",
- "value": 10.19
}, - {
- "date": "2022-05-02T14:09:00.000Z",
- "value": 10.2
}, - {
- "date": "2022-05-02T14:10:00.000Z",
- "value": 10.21
}
]
}
Retrieves all active alarms from devices associated to a base, similar to the alarm center in cockpit. Has to be called for each base individually.
baseId required | string |
limit | integer Default: 10 The maximum number of alarms to put into the response. |
offset | integer Default: 0 The offset specifying from which alarm entry on to start retrieving data. |
curl --location --request GET 'http://localhost/api/v1/bases/<Base Id>/alarms?limit=0&offset=10' \ --header 'Accept: application/json' \ --header 'x-access-token: <API Key>'
{- "offset": 0,
- "limit": 0,
- "count": 0,
- "total": 0,
- "alarms": [
- {
- "ticketId": "string",
- "createdAt": "string",
- "severity": 0,
- "type": 3,
- "condition": {
- "type": 1,
- "event": 1,
- "activationValue": {
- "displayUnit": "string",
- "value": 0
}, - "thresholdValue": {
- "displayUnit": "string",
- "value": 0
}, - "hysteresisValue": 0
}, - "base": {
- "baseId": "string",
- "baseName": "string"
}, - "channel": {
- "channelId": "string",
- "channelName": "string"
}, - "device": {
- "name": "string",
- "serial": 0
}, - "alarmGroup": {
- "id": "string",
- "name": "string"
}
}
]
}