Modio API

Modio API

The Modio API provides access to current and historical data and configuration of connected devices.

The API is RESTful and stateless. It is implemented over HTTPS and uses JSON for data representation.

Authentication

TLS client certificates are used for authentication in the API.

The subject of the certificate will determine what permissions the API provides for reading data and making configuration changes.

API users will be provided with a certificate, or they may arrange to issue automated certificate signing requests to our CA.

Getting a cert

Download the ca cert:

$ curl -O https://www.modio.se/dist/ca.modio.se.cacert

Request the certificate from ca.modio.se:

The source code for the rust version and its docker build is open source and can be found here (gitlab).

For Linux:

$ docker run --rm -v $(pwd):/data:z registry.gitlab.com/modioab/caramel-client-rs/client:master ca.modio.se Test_Certificate_Please_Ignore --cacert-path=/data/ca.modio.se.cacert

For Windows:

docker run --rm -v "%cd%":/data:z registry.gitlab.com/modioab/caramel-client-rs/client:master ca.modio.se Test_Certificate_Please_Ignore --cacert-path=/data/ca.modio.se.cacert

Wait for the request to be signed:

Signing a request is a manual process where we verify who you are and that you requested this certificate, as well as giving you access to data in the backend. For this step to complete, you will need to contact us to verify your identity.

TL;DR

So, in short for Linux:

curl -O https://www.modio.se/dist/ca.modio.se.cacert
docker run --rm -v $(pwd):/data:z registry.gitlab.com/modioab/caramel-client-rs/client:master ca.modio.se Test_Certificate_Please_Ignore --cacert-path=/data/ca.modio.se.cacert

for Windows:

curl -O https://www.modio.se/dist/ca.modio.se.cacert
docker run --rm -v "%cd%":/data:z registry.gitlab.com/modioab/caramel-client-rs/client:master ca.modio.se Test_Certificate_Please_Ignore --cacert-path=/data/ca.modio.se.cacert