M2X

FREE
By attm2x
Updated 4 months ago
Data
-/10
Popularity Score
-
Latency
-
Success Rate

M2X API Documentation

AT&T M2X is a highly secure and scalable time-series data storage service for network connected devices and the Internet of Things.

In addition to data storage, M2X enables automatic data-driven action by monitoring streams of data in real-time and if a user-defined trigger condition is met, an event is fired.

The AT&T M2X API provides all the needed operations and methods to connect your devices to AT&T’s M2X service, and has supported client libraries for Ruby, Python, Node.js, PHP, C, and Java among many other languages, platforms, and devices (like Arduino, Spark Core, Raspberry Pi and more).

View API Details
Device
GETList/Search Public Devices Catalog
GETList Devices
GETSearch Devices
GETList Device Tags
POSTCreate Device
PUTUpdate Device Details
GETView Device Details
GETRead Device Location
PUTUpdate Device Location
GETList Data Streams
PUTCreate/Update Data Stream
GETView Data Stream
DELETEDelete Data Stream
DELETEDelete Device
GETView Request Log
Data
PUTUpdate Data Stream Value
GETList Data Stream Values
GETData Stream Sampling
GETData Stream Stats
GETList Values from all Data Streams of a Device
POSTSearch Values from all Data Streams of a Device
POSTPost Data Stream Values
GETExport Values from all Data Streams of a Device
DELETEDelete Data Stream Values
POSTPost Device Updates (Single Values to Multiple Streams)
POSTPost Device Updates (Multiple Values to Multiple Streams)
Triggers
GETList Device Triggers
GETView Device Trigger
DELETEDelete Device Trigger
POSTCreate Device Trigger
PUTUpdate Device Trigger
Collections
GETList Collecitons
POSTCreate Collection
GETView Collection Details
PUTUpdate Collection Details
DELETEDelete Collection
Keys
GETList Keys
POSTCreate Key
GETView Key Details
PUTUpdate Key
POSTRegenerate Key
DELETEDelete Key
Charts
GETList Charts
POSTCreate Chart
GETView Chart Details
PUTUpdate Chart
DELETEDelete Chart
GETRender Chart
Time
GETGet Time (Seconds, Milliseconds, ISO 8601)
GETGet Time (Seconds)
GETGet Time (Milliseconds)
GETGet Time (ISO 8601)
Jobs
GETList Jobs
GETView Job Details
GETView Job Results
GETList/Search Public Devices Catalog

Search the catalog of public Devices. This allows unauthenticated users to search Devices from other users that have been marked as public, allowing them to read public Device metadata, locations, streams list, and view each Devices' stream metadata and its values. The catalog of public devices is sorted by descendant creation date by default, that is, newer devices appear first on the results list.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
qSTRING
OPTIONALOnly those devices containing this text in its name or description will be returned.
pageNUMBER
OPTIONALPage number to be retrieved.
limitNUMBER
OPTIONALNumber of devices to return per page. It must be a number between 0 and 100. If a higher value is sent, the API will use 100 instead.
tagsSTRING
OPTIONALA comma delimited list of device tags.
modified_sinceSTRING
OPTIONALAn ISO8601 timestamp. All devices modified since this parameter will be included.
unmodified_sinceSTRING
OPTIONALAn ISO8601 timestamp. All devices modified before this parameter will be included.
serialSTRING
OPTIONALA comma separated list of serial numbers. Only devices having a serial number from the list will be returned.
latitudeNUMBER
OPTIONALThe last recorded latitude for the device(s) to be returned. This value must match within 1 km, unless the `distance` and/or `distance_unit` parameters are supplied, in which case devices with a last known location within the specified `distance` / `distance_unit` from the `latitude` and `longitude` coordinates will be returned.
longitudeNUMBER
OPTIONALThe last recorded longitude for the device(s) to be returned. This value must match within 1 km, unless the `distance` and/or `distance_unit` parameters are supplied, in which case devices with a last known location within the specified `distance` / `distance_unit` from the `latitude` and `longitude` coordinates will be returned.
distanceNUMBER
OPTIONALDevices within the `distance` specified from the given `latitude` and `longitude` coordinates will be returned.
distance_unitSTRING
OPTIONALThe unit of measure of the `distance` parameter. Accepts - `mi`, `miles` or `km`.
sortSTRING
OPTIONALSort order of the returned devices. Accepted values - `created`: by the devices creation timestamp, `last_activity`: by the last activity timestamp of the device, or `name`: by device name in alphabetically ascending order.
dirSTRING
OPTIONALThe direction devices will be sorted in. Accepted values - `desc`: descending order, `asc`: ascending order.
Code Snippet
unirest.get("https://attm2x-m2x-v1.p.rapidapi.com/devices/catalog?distance=1&sort=created&dir=desc")
.header("X-RapidAPI-Host", "attm2x-m2x-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://attm2x-m2x-v1.p.rapidapi.com/devices/catalog
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://attm2x-m2x-v1.p.rapidapi.com/devices/catalog?distance=1&sort=created&dir=desc")
.header("X-RapidAPI-Host", "attm2x-m2x-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication