Server's API

API description for server

Using the API, you can send a request to the server and get minute or hourly data at a specific interval. To use the API, your application or website needs to send a corresponding HTTP request to the server. Requests can be sent using GET or POST. In response to a request, the server returns an HTTP message containing the result of processing in the body. The results returned by the server are in the format JSON.

To work with the API, you need an API key, which can be obtained on the Profile page in the smart-MAC Dashboard.
This feature is available for a BUSINESS license.

Image 357

Key features and limitations:

  • In response to a request, the hourly data for the selected period comes.
  • Period no more than 1 day for minute data and 45 days for hourly data.
  • If the interval is incorrect, the request period will be maximum from the end date of the period (date2).
  • If there are no dates in the request (date1 and date2), data will be received in one last hour. The last hour is the previous current one. If there is no data, the query will return an empty array.
  • In the absence of the data1 parameter, data will be received for maximum interval from data2.
  • The date is sent in GMT in UNIX format accurate to seconds.
  • Requests can be sent no more than once per minute.

GET request format for receiving data from the server
https://dash.smart-maic.com/api?devid=[Device ID]&date1=[start date]&date2=[end date]&period=hour&apikey=[API key]
POST request format for receiving data from the server
Address: https://dash.smart-maic.com/api
Request parameters:
devid=[Device ID]    *) required
date1=[start date]
date2=[end date]
period=[minute or hour]
apikey=[API key]        *) required

Sample GET request to the server. Show »
https://dash.smart-maic.com/api?devid=1728053249&date1=1554577200&date2=1554663600&period=hour&apikey=122951987

Export to EXCEL

Try a file with which you can quickly download hourly data to EXCEL by API request to the server for further analysis.

To run the file you need to install some libraries. Open Visal Basic -> "Tools" -> "References..." and check the box to:

  • Microsoft Scripting Runtime
  • Microsoft Internet Controls
  • Microsoft WinHTTP Services

Note that the time on the server is saved in GMT.

You can download the file by links below:

  • 1-line meter smart-MAC D101 Here »
  • 3-lines meter smart-MAC D103 Here »
  • pulse meter smart-MAC D105 Here »
Leave your wishes and comments on the forum. Ask »

Successes in development!

This article was helpful for 35 people. Is this article helpful for you?