Atlato Developer
DocsUse CasesCommunitySupport
DocsUse CasesCommunitySupport
Facebook
Linkedin
Instagram
  1. Device API
  • Overview
    • Developer Platform
  • Getting Started
    • Register Account
    • Manage Apps
    • Manage a Company
    • App Access
    • Store App Access
    • Mode
  • App Store
    • Authentication
    • Access Rights
    • Event Log
    • Company Settings
    • Manage Account
  • Device Integration
    • Design
    • Installation
    • Device List
  • Device API
    • Protocols
    • New Integration
    • Data Output
    • Device Input Names
  • Deployment
    • Custom Client App
  • API Request
    • REST API
    • Request Structure
    • Metadata
    • Pagination
    • Errors
    • Troubleshooting
  • Support
    • Developer Request Types
  • Guides
    • Best practices
    • Timezones
    • Libraries
    • Key Concepts
    • Terms of Use
    • Rate limits
  • Feedback Center
    • Feedback
    • Community
    • FAQ
  • Api Integration
    • Use token in your app
    • Event Logging API
    • Meta Data API
    • Lastest Device Data API
    • Past Device Data API
    • Devices API
    • Country City Currency API
  • App Integration APIs
    • Meta Data
    • Meta Data API
    • Lastest Device Data API
    • Past Device Data API
    • Event Logging API
    • Devices API
    • Country City Currency API
  • Developer Platform
    • Access
    • User
    • Device
    • Manage Account
    • Company
  1. Device API

Data Output

Device Data Retrieval from AtlatoDB#

Data retrieval occurs in two forms: live data, which provides real-time information, and historical data, which offers a record of past information.

Live Data#

To obtain live data from the system, follow these steps:
1.
Create Socket Connection:
Establish a socket connection to the server.
2.
Listen for Data Event:
Subscribe to the 'data' event to receive real-time updates.
3.
Register Device ID List:
Provide a list of device IDs as an array parameter to specify which devices' data you wish to observe.
Usage example:
NodeJS
Python
Sample Respnose:
Socket Data
data
object 
required
device data packet
raw
object 
required
raw values of device
converted
object 
required
calculated values
err
object 
required
error codes
serial
string 
required
imei number of device
deviceId
string 
required
device id
timestamp
string 
required
timestamp of datapacket
dId
string 
required
device id
data: The data object is a key component of the API response, encapsulating detailed information about each data packet received from the devices. Below is a detailed description of the attributes contained within the data object.
raw: An object that contains the raw data received from the device. This data is saved according to Device Input Names.
converted: An object that contains the converted data. This data is also saved according to Device Input Names.
err: An object that represents any errors in the data packet.
serial: The IMEI number of the device, which uniquely identifies the device.
deviceId: The ID of the device.
timestamp: The timestamp indicating when the data was received.
dId :The ID of the device, represented as deviceId.

Historical Data#

To retrieve historical data from the system, follow these steps:
1.
Make a GET Request:
Endpoint: /data/past
Method: POST
Content-Type: application/json
2.
Request Body:
Include the following parameters in the JSON body of your POST request:
{
  "deviceId": "string",
  "fromDate": "YYYY-MM-DD HH:mm:ss",
  "toDate": "YYYY-MM-DD HH:mm:ss",
}
deviceId: (Required) The ID of the device for which you want to retrieve historical data.
fromDate: The start time for the historical data range in "YYYY-MM-DD HH:mm" format.
toDate: The end time for the historical data range in "YYYY-MM-DD HH:mm" format.
WARNING
Duration Limitation: The duration between fromDate and toDate must be less than 7 days.
3.
Response:
data: Array containing historical data filtered by the specified start and end times.
message: A string message providing additional information about the request or any errors.
Usage example:
NodeJS
Python
Sample Respnose:
History Data
data
array [object {4}] 
required
device data packets as array
raw
object 
required
raw values of device
converted
object 
optional
calculated values
err
object 
optional
error codes
timestamp
string 
required
timestamp of device data packet
message
string 
required
response message
data: An array of objects, each representing a data packet received from a device. Each object within the data array contains the following properties.
raw: An object that contains the raw data received from the device. This data is saved according to Device Input Names.
converted: An object that contains the converted data. This data is also saved according to Device Input Names.
err: An object that represents any errors in the data packet.
timestamp: The timestamp indicating when the data was received.
message: A string that represents the response message of the request. It provides a status or result summary of the API call.

Definitions#

TermDefinition
deviceIdThe deviceId serves as a unique identifier assigned to each device upon its installation within our system. This identifier is generated by the Atlato system during the device registration process. It is essential for specifying the particular device for which data retrieval or operational commands are intended in API requests.
JWT Token"JWT Token" stands for JSON Web Token. It is a compact and self-contained method for securely transmitting information between parties as a JSON object. JWTs can be used to authenticate users and securely transmit information over the network. They consist of three parts: a header, a payload, and a signature, which are encoded and can be digitally signed.
INFO
Link to API documentation - Lastest Device Data API
INFO
Link to API documentation - Past Device Data API
INFO
Link to API documentation - Devices API
Modified at 2024-10-09 11:41:37
Previous
New Integration
Next
Device Input Names
Built with