Oiot.ru API description


The API works on https requests at url oiot.ru/api/

To work, it is enough to make a request to the given URL with certain parameters and receive a server response.

Example: https://oiot.ru/api/v1/?param1=xx&param2=yy


The server only responds to requests where the two variables id and token are present, which can be obtained in personal account.

Example: https://oiot.ru/api/v1/?id=xx&token=yy

Server response

By default, the server returns an array with all the latest meter readings associated with your account.

keys parameter

Each device has a unique key (for example: 30AE5F9E98888093EF9ED4401A6BBDA0 or 927D0A0CF23FB7777EEC254E4ACFB9F8).

If you pass an array of keys, the server will return in response the readings of only these devices.

It is not necessary to pass the entire length of the key. You can specify at least three leading characters of the key, the server will find them by their initial occurrence.

Example: https://oiot.ru/api/v1/?id=xx&token=yy&keys[]=30AE5&keys[]=927D0

date parameter

If you pass the following parameter, then the server will return the last known instrument readings for this date in the response.

The date format must be DD-MM-YYYY , where DD is the day with a leading zero, MM is the month with a leading zero, and YYYY is the four-digit year.

Example: https://oiot.ru/api/v1/?id=xx&token=yy&date=01-05-2020

Parameters date_start and date_finish

If these parameters are present in the request, then the server will return an array of all readings for this period.

This is useful for building reports and graphs.

There are restrictions:

  • both dates must be within the same month.
  • number of fixtures must not exceed 2
  • keys array required
  • date parameter disabled

Example: https://oiot.ru/api/v1/?keys[]=927D0&date_start=01-05-2020&date_finish=31-05-2020