Saveris Cockpit OpenAPI Specification for public api (1.0)

Download OpenAPI specification:Download

API Support: support@testo.de

This is the public api of the Cockpit sever. It provides read-access to your Saveris 1 base and logger channel data.

Authentication

ApiKeyAuth

To authenticate with the Cockpit public api you need to create an api key and use this key in the "x-access-token" header.

Security Scheme Type API Key
Header parameter name: x-access-token

getBases

Responds with a list of available active bases in a Saveris setup.

Authorizations:

Responses

Request samples

curl --location --request GET 'http://localhost/api/v1/bases' \
--header 'Accept: application/json' \
--header 'x-access-token: <API Key>'

Response samples

Content type
application/json
[
  • {
    }
]

getChannels

Responds with a list of available channels registered to one base.

Authorizations:
path Parameters
baseId
required
string
query Parameters
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

Responses

Request samples

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>'

Response samples

Content type
application/json
{
  • "channels": [
    ],
  • "count": 4,
  • "total": 4
}

getChannel

Responds with detailed information about one channel.

Authorizations:
path Parameters
baseId
required
string
channelId
required
string

Responses

Request samples

curl --location --request GET 'http://localhost/api/v1/bases/<Base Id>/channels/<Channel Id>' \
--header 'Accept: application/json' \
--header 'x-access-token: <API Key>'

Response samples

Content type
application/json
{
  • "id": "My0x",
  • "name": "channel1_1",
  • "device": {
    },
  • "lastMeasurement": {
    },
  • "alarms": [
    ]
}

getChannelMeasurement

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).

Authorizations:
path Parameters
baseId
required
string

The identifier of the base.

channelId
required
string

The identifier of the channel.

query Parameters
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.

Responses

Request samples

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>'

Response samples

Content type
application/json
{
  • "displayUnit": "°C",
  • "start": "2022-05-02T14:05:00.000Z",
  • "end": "2022-05-02T14:10:00.000Z",
  • "values": [
    ]
}

getBaseAlarms

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.

Authorizations:
path Parameters
baseId
required
string
query Parameters
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.

Responses

Request samples

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>'

Response samples

Content type
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "count": 0,
  • "total": 0,
  • "alarms": [
    ]
}