Introduction

Introduction #

Endpoints #

APIs are served by the api.nr.iotready.no domain.

REST URL: https://api.nr.iotready.no/api/v1

MQTT URL: mqtts://api.nr.iotready.no/v1

See MQTT chapter for details on MQTT connection.

Content Types #

All API content type is json unless specified. It’s recommended to specify Content-Type: application/json, but it’s not a requirement as it’s expected as default.

Content type can be set like this:

curl -H "Content-Type: application/json" \
    https://api.nr.iotready.no/api/v1/device/123

For PATCH operations the default is Content-Type: application/merge-patch+json. This indicates JSON merge patch (RFC7396).

Timestamp format #

All json timestamps and query parameter timestamps uses the RFC3339 timestamp format.

Errors #

Errors are given by http response codes with response body as error text.

Typical http response codes used:

Code Name Cause
200 OK Valid
400 Bad Request Invalid body or params
401 Unauthorized No valid credentials
403 Forbidden Not allowed
404 Not Found Resource not found
405 Method Not Allowed Not supported method
500 Internal Server Error Internal error