Technical

How to access and use the Atmotube Cloud API?

Data synchronized from Atmotube PRO to a smartphone is uploaded to a cloud server (depending on the availability of an internet connection). This data can be remotely accessed using the Atmotube Cloud API console.

Note : So that the data from your Atmotube PRO(s) is uploaded to the cloud, please enable the "Upload historical data to the cloud" option found in the Atmotube application settings under the "Your Data" section.

"Upload historical data to the cloud" setting in the Atmotube application

Request a private API key to get started by contacting us. In order for an API key to be issued, provide the following data from your Atmotube PRO device(s):

  • Serial Number(s) found on the original packaging, OR;
  • Atmotube ID(s) (MAC address) found in Atmotube app>Settings>About.

Here are instructions on how to locate these.

Once you have an API key, follow the steps below to use the Cloud API: 

1. Click the GET endpoint to open the dropdown and click "Try it out" to activate the fields.

2. Enter the details required:

  • Enter the API key. 
  • Enter the Atmotube ID (MAC address) (use the format - AA:BB:CC:DD:EE:FF - colon separated)
  • Specify whether the returned records should be in ascending or descending order. 
  • Specify the format the results are required in, the default is JSON, and CSV download is also an option. 
  • Enter any number of records to offset/skip, as required. 
  • Enter any number to limit the records to, as required. The default value is 100. If you don't want to limit the number of records, leave this field empty. The maximum value for the limit parameter is 1440, which corresponds to the daily data point cap for an Atmotube PRO unit (1440 minutes per day). If you specify a start date and end date, leave this field empty, as more than 1440 data points will be fetched.
  • Enter the start date and the end date—use the YYYY-MM-DD format. The maximum number of days for which data can be retrieved per request is 7 days.
  • If the format was set to CSV, specify the CSV separator (semi-colon, or comma).

 

3. Finally, click the Execute button. 

If JSON format was specified, historical data from the Atmotube PRO will be returned in the Responses section as in the example seen below:

There is also an option to download the data in JSON format in the bottom right corner of the response body section. 

If CSV format was specified, an option to download the data as a CSV file will appear in the response body section: 

 

Alternatively, the request URL found in the Responses section can be used to call the API endpoint and specify the parameters in the URL itself. Here is an example API call format:

https://api.atmotube.com/api/v1/data?api_key=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx&mac=XX:XX:XX:XX:XX:XX&limit=2000&offset=0&order=desc&start_date=2022-06-13&end_date=2022-06-17&format=json

Note: You may also use the “date” parameter in the API call instead of “start_date” and “end_date” if only a day’s worth of data is required, as shown in the example URL below:

 https://api.atmotube.com/api/v1/data?api_key=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx&mac=XX:XX:XX:XX:XX:XX&limit=1000&offset=0&order=desc&date=2022-06-13&format=json

 Each API parameter is separated by the "&" symbol.

Rate Limits

The limit for all endpoints is set to 60 requests per minute, with the restriction resetting at the start of each minute.

Got more questions? We're here to help!

Please contact us at info@atmotube.com or by submitting a support ticket using the form on the following support page:

Do you have customer service and technical support?

You may also use the ATMO Bot (usually on the right-hand side of the webpage on desktop, bottom-left for mobile) for a quick answer or leave your email address so that we may get in touch.