This documentation describes the API framework in the CareTec.AI project. It also defines the design principles and explains the security mechanism. It aims to align understanding among the stakeholders, the project team, the technical experts and the end users.

API Design Guidelines

We have developed APIs that enable machine-to-machine automated communication. In doing so, we followed industry standards in order to maximise the usability, security and extensibility.

We've used industry best practice and standards:

  1. Representational State Transfer (REST)
  2. THE APIs are organised around resources
  3. We support the standard HTTP methods: GET, POST and DELETE

Data Exchange

We use the Javascript Object Notation (JSON) format:

POST https://app.augmentedinsights.cloud/api/v1/data HTTP/1.1
Content-Type: application/json; charset=utf-8
Content-Length: 79

{"ds":'data-stream-code-001',"ts":"2019-03-12T12:34:56.123+00:00", "val": 123.456 }

Date Format

The date format complies with the ISO 8601 standard. For example: 2019-03-12T12:34:56.123+00:00 (UTC to store in the database). The standard covers local time with offset to UTC. The summer saving time will be handled in the offset part. For example:

Out of summer saving time: UTC: 2019-03-30T01:23:45.678+00:00 same as London: 2019-03-30T01:23:45.678+00:00

During summer saving time: UTC: 2019-03-31T01:23:45.678+00:00 same as London: 2019-03-31T02:23:45.678+01:00

We support fractions of seconds up to microsecond precision for inputs from the API.

When it comes from the API as: 2019-03-30T01:23:45+00:00 it will be stored as 2019-03-30T01:23:45.000000+00:00

When it comes from the API as: 2019-03-30T01:23:45.654+00:00 it will be stored as 2019-03-30T01:23:45.654000+00:00