|
2 | 2 | title: Arduino IoT Cloud APIs
|
3 | 3 | description: Arduino IoT Cloud has two different set of APIs. Read below to learn more
|
4 | 4 | author: Karl Söderby, Fabrizio Mirabito
|
5 |
| -tags: [IoT Cloud, API, JavaScript] |
| 5 | +tags: [IoT Cloud, Device API, Application API, JavaScript] |
6 | 6 | ---
|
| 7 | + |
7 | 8 | The [Arduino IoT Cloud](https://create.arduino.cc/iot/) has different sets of APIs that provide different functionalities. This article serves as an introduction to how to work and what you can achieve with them.
|
8 | 9 |
|
9 |
| -## Configuration API |
10 |
| -### What you can achieve |
11 |
| -The main goal of Configuration API is to allow you to create and manage IoT resources like dashboards, devices, things, and variables, along with the retrieval and handling of historical data coming from your IoT Devices. The core of those APIs is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts [form-encoded](https://en.wikipedia.org/wiki/POST_(HTTP)#Use_for_submitting_web_forms) request bodies, returns [JSON-encoded](http://www.json.org/) responses, and uses standard HTTP response codes, authentication, and verbs. You can use those APIs, both directly calling our HTTP endpoints or using our clients that wrap those calls into easy-to-use abstractions like objects and functions. We have Applications API clients available in `javascript`, `golang`, and `python`. |
| 10 | +## Application API |
| 11 | + |
| 12 | +The main goal of the Application API is to allow you to create and manage IoT resources like dashboards, devices, things, and variables, along with the retrieval and handling of historical data coming from your IoT Devices. |
12 | 13 |
|
13 |
| -To use the Configuration API, you need to create an **API Key** in the [API Keys](https://cloud.arduino.cc/home/api-keys) section. |
| 14 | +The core of those APIs is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts [form-encoded](https://en.wikipedia.org/wiki/POST_(HTTP)#Use_for_submitting_web_forms) request bodies, returns [JSON-encoded](http://www.json.org/) responses, and uses standard HTTP response codes, authentication, and verbs. |
14 | 15 |
|
15 |
| -**Examples** |
| 16 | +You can use those APIs, both directly calling our HTTP endpoints or using our clients that wrap those calls into easy-to-use abstractions like objects and functions. We have Applications API clients available in `javascript`, `golang`, and `python`. To use the Application API, you need to create an **API Key** in the [API Keys](https://cloud.arduino.cc/home/api-keys) section. |
16 | 17 |
|
| 18 | +With this API, you can: |
17 | 19 | - Build an automated script to create your things, in bulk
|
18 | 20 | - Duplicate the configuration of things, dashboards, devices
|
19 | 21 | - Create your own personal web application to manage your resources
|
20 | 22 | - Build a script that reads your variables' data and provides custom analytics
|
21 | 23 |
|
22 |
| -You can find the full list of available resources and actions in the [Arduino IoT Cloud Configuration API Technical Reference](https://www.arduino.cc/reference/en/iot/api/). |
| 24 | +### Resources |
| 25 | + |
| 26 | +You can find the full list of available resources and actions in the [Arduino IoT Cloud Application API Technical Reference](https://www.arduino.cc/reference/en/iot/api/). |
| 27 | + |
| 28 | +***For learning how to successfully authenticate and interface with this API, visit the [Arduino Cloud REST API & SDK](https://docs.arduino.cc/arduino-cloud/getting-started/arduino-iot-api) article. Examples using JavaScript, Python and Golang are available here.*** |
23 | 29 |
|
24 |
| -## Data API |
25 |
| -Data API allows sending and receiving any kind of data (sensors' values, commands for actuators, configuration changes...) from and to IoT Devices and the Cloud. Under the hood, they |
| 30 | +## Device API |
| 31 | + |
| 32 | +The **Device API** allows sending and receiving any kind of data (sensors' values, commands for actuators, configuration changes...) from and to IoT Devices and the Cloud. Under the hood, they: |
26 | 33 |
|
27 | 34 | - take care of the data exchange with our MQTT broker
|
28 | 35 | - handle best in class authentication & security
|
29 | 36 | - manage compression, data format, and transport protocols
|
30 | 37 |
|
31 |
| -### What you can achieve |
| 38 | +With this API, you can: |
32 | 39 | - Send sensors' values to the cloud
|
33 | 40 | - Send and receive input and commands from and to dashboards
|
34 | 41 | - Listen for variables' values changes and act upon them
|
35 | 42 |
|
36 |
| -Inside this set of API, we have: |
| 43 | +As a wrapper for the Device API, we have the following libraries: |
37 | 44 |
|
38 | 45 | - An official Arduino IoT Cloud Library for your Arduino sketches: `ArduinoIoTCloud.h`
|
39 | 46 | - An NPM Javascript package: `arduino-iot-js`
|
40 | 47 |
|
41 |
| -**Arduino IoT Cloud Sketch library** |
42 |
| -As described above, is the Arduino library that allows your Arduino devices to connect and exchange data with the IoT Cloud. If you edit your sketch directly inside IoT Cloud or Cloud Editor, you don't need to install it: it comes out of the box. |
| 48 | +### Arduino IoT Cloud Sketch library |
| 49 | + |
| 50 | +The Arduino (C++) library allows your Arduino devices to connect and exchange data with the IoT Cloud. If you use the Arduino Cloud online environment, you do not need to install this library. |
| 51 | + |
| 52 | +This library is also available in the library manager for [Arduino IDE](https://www.arduino.cc/en/software). With a paid subscription, you can push/pull changes to your online sketches in the offline editor. |
43 | 53 |
|
44 | 54 | You can find more details at:
|
45 | 55 |
|
46 | 56 | - The [official repository](https://github.com/arduino-libraries/ArduinoIoTCloud)
|
47 | 57 | - The [cheat sheet](https://docs.arduino.cc/arduino-cloud/getting-started/technical-reference)
|
48 | 58 |
|
49 |
| -**Arduino IoT JS** |
| 59 | +### Arduino IoT JS |
| 60 | + |
50 | 61 | The `arduino-iot-js` NPM module is designed for communicating with the Arduino IoT Cloud broker using the MQTT over Websocket protocol. It is primarily used to send and receive variable values.
|
51 | 62 |
|
52 | 63 | Example:
|
|
0 commit comments