Arduino IoT Cloud API

DevicesV2

devicesV2Create

create devices_v2

Creates a new device associated to the user.


/v2/devices

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/devices"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var createDevicesV2Payload = ; // {CreateDevicesV2Payload} 
api.devicesV2Create(createDevicesV2Payload).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
createDevicesV2Payload =  # CreateDevicesV2Payload | 

try: 
    # create devices_v2
    api_response = api_instance.devices_v2_create(createDevicesV2Payload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2Create: %s\n" % e)

Scopes

Parameters

Body parameters
Name Description
createDevicesV2Payload *

DeviceV2 describes a device.

Responses


devicesV2Delete

delete devices_v2

Removes a device associated to the user


/v2/devices/{id}

Usage and SDK Samples

curl -X DELETE "https://api2.arduino.cc/iot/v2/devices/{id}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
api.devicesV2Delete(id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)

try: 
    # delete devices_v2
    api_instance.devices_v2_delete(id)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2Delete: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required

Responses


devicesV2GetEvents

getEvents devices_v2

GET device events


/v2/devices/{id}/events

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/events?limit=&start="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var opts = {
  'limit': 56, // {Integer} The number of events to select
  'start': start_example // {String} The time at which to start selecting events
};
api.devicesV2GetEvents(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)
limit = 56 # Integer | The number of events to select (optional) (default to null)
start = start_example # String | The time at which to start selecting events (optional) (default to null)

try: 
    # getEvents devices_v2
    api_response = api_instance.devices_v2_get_events(id, limit=limit, start=start)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2GetEvents: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Query parameters
Name Description
limit
Integer
The number of events to select
start
String
The time at which to start selecting events

Responses


devicesV2GetProperties

getProperties devices_v2

GET device properties


/v2/devices/{id}/properties

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/properties?show_deleted="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var opts = {
  'showDeleted': true // {Boolean} If true, shows the soft deleted properties
};
api.devicesV2GetProperties(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)
showDeleted = true # Boolean | If true, shows the soft deleted properties (optional) (default to null)

try: 
    # getProperties devices_v2
    api_response = api_instance.devices_v2_get_properties(id, showDeleted=showDeleted)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2GetProperties: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Query parameters
Name Description
show_deleted
Boolean
If true, shows the soft deleted properties

Responses


devicesV2List

list devices_v2

Returns the list of devices associated to the user


/v2/devices

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices?across_user_ids="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var opts = {
  'acrossUserIds': true // {Boolean} If true, returns all the devices
};
api.devicesV2List(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
acrossUserIds = true # Boolean | If true, returns all the devices (optional) (default to null)

try: 
    # list devices_v2
    api_response = api_instance.devices_v2_list(acrossUserIds=acrossUserIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2List: %s\n" % e)

Scopes

Parameters

Query parameters
Name Description
across_user_ids
Boolean
If true, returns all the devices

Responses


devicesV2Show

show devices_v2

Returns the device requested by the user


/v2/devices/{id}

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
api.devicesV2Show(id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)

try: 
    # show devices_v2
    api_response = api_instance.devices_v2_show(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2Show: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required

Responses


devicesV2Timeseries

timeseries devices_v2

GET device properties values in a range of time


/v2/devices/{id}/properties/{pid}

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/properties/{pid}?limit=&start="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var pid = pid_example; // {String} The id of the property
var opts = {
  'limit': 56, // {Integer} The number of properties to select
  'start': start_example // {String} The time at which to start selecting properties
};
api.devicesV2Timeseries(id, pid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)
pid = pid_example # String | The id of the property (default to null)
limit = 56 # Integer | The number of properties to select (optional) (default to null)
start = start_example # String | The time at which to start selecting properties (optional) (default to null)

try: 
    # timeseries devices_v2
    api_response = api_instance.devices_v2_timeseries(id, pid, limit=limit, start=start)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2Timeseries: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
pid*
String
The id of the property
Required
Query parameters
Name Description
limit
Integer
The number of properties to select
start
String
The time at which to start selecting properties

Responses


devicesV2Update

update devices_v2

Updates a device associated to the user


/v2/devices/{id}

Usage and SDK Samples

curl -X POST "https://api2.arduino.cc/iot/v2/devices/{id}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var devicev2 = ; // {Devicev2} 
api.devicesV2Update(id, devicev2).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)
devicev2 =  # Devicev2 | 

try: 
    # update devices_v2
    api_response = api_instance.devices_v2_update(id, devicev2)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2Update: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Body parameters
Name Description
devicev2 *

DeviceV2 describes a device.

Responses


devicesV2UpdateProperties

updateProperties devices_v2

Update device properties last values


/v2/devices/{id}/properties

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/devices/{id}/properties"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var propertiesValues = ; // {PropertiesValues} 
api.devicesV2UpdateProperties(id, propertiesValues).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2Api()
id = id_example # String | The id of the device (default to null)
propertiesValues =  # PropertiesValues | 

try: 
    # updateProperties devices_v2
    api_instance.devices_v2_update_properties(id, propertiesValues)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2UpdateProperties: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Body parameters
Name Description
propertiesValues *

Responses


DevicesV2Certs

devicesV2CertsCreate

create devices_v2_certs

Creates a new cert associated to a device. The csr is signed and saved in database. The CommonName will be replaced with the device id.


/v2/devices/{id}/certs

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/devices/{id}/certs"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2CertsApi()
var id = id_example; // {String} The id of the device
var createDevicesV2CertsPayload = ; // {CreateDevicesV2CertsPayload} 
api.devicesV2CertsCreate(id, createDevicesV2CertsPayload).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2CertsApi()
id = id_example # String | The id of the device (default to null)
createDevicesV2CertsPayload =  # CreateDevicesV2CertsPayload | 

try: 
    # create devices_v2_certs
    api_response = api_instance.devices_v2_certs_create(id, createDevicesV2CertsPayload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2CertsApi->devicesV2CertsCreate: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Body parameters
Name Description
createDevicesV2CertsPayload *

Responses


devicesV2CertsDelete

delete devices_v2_certs

Removes a cert associated to a device


/v2/devices/{id}/certs/{cid}

Usage and SDK Samples

curl -X DELETE "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2CertsApi()
var cid = cid_example; // {String} The id of the cert
var id = id_example; // {String} The id of the device
api.devicesV2CertsDelete(cid, id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2CertsApi()
cid = cid_example # String | The id of the cert (default to null)
id = id_example # String | The id of the device (default to null)

try: 
    # delete devices_v2_certs
    api_instance.devices_v2_certs_delete(cid, id)
except ApiException as e:
    print("Exception when calling DevicesV2CertsApi->devicesV2CertsDelete: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
cid*
String
The id of the cert
Required
id*
String
The id of the device
Required

Responses


devicesV2CertsList

list devices_v2_certs

Returns the list of certs associated to the device


/v2/devices/{id}/certs

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/certs"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2CertsApi()
var id = id_example; // {String} The id of the device
api.devicesV2CertsList(id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2CertsApi()
id = id_example # String | The id of the device (default to null)

try: 
    # list devices_v2_certs
    api_response = api_instance.devices_v2_certs_list(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2CertsApi->devicesV2CertsList: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required

Responses


devicesV2CertsShow

show devices_v2_certs

Returns the cert requested by the user


/v2/devices/{id}/certs/{cid}

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2CertsApi()
var cid = cid_example; // {String} The id of the cert
var id = id_example; // {String} The id of the device
api.devicesV2CertsShow(cid, id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2CertsApi()
cid = cid_example # String | The id of the cert (default to null)
id = id_example # String | The id of the device (default to null)

try: 
    # show devices_v2_certs
    api_response = api_instance.devices_v2_certs_show(cid, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2CertsApi->devicesV2CertsShow: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
cid*
String
The id of the cert
Required
id*
String
The id of the device
Required

Responses


devicesV2CertsUpdate

update devices_v2_certs

Updates a cert associated to a device. The csr is signed and saved in database. The CommonName will be replaced with the device id.


/v2/devices/{id}/certs/{cid}

Usage and SDK Samples

curl -X POST "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2CertsApi()
var cid = cid_example; // {String} The id of the cert
var id = id_example; // {String} The id of the device
var devicev2Cert = ; // {Devicev2Cert} 
api.devicesV2CertsUpdate(cid, id, devicev2Cert).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2CertsApi()
cid = cid_example # String | The id of the cert (default to null)
id = id_example # String | The id of the device (default to null)
devicev2Cert =  # Devicev2Cert | 

try: 
    # update devices_v2_certs
    api_response = api_instance.devices_v2_certs_update(cid, id, devicev2Cert)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2CertsApi->devicesV2CertsUpdate: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
cid*
String
The id of the cert
Required
id*
String
The id of the device
Required
Body parameters
Name Description
devicev2Cert *

Responses


DevicesV2Pass

devicesV2PassCheck

check devices_v2_pass

Check if the password matches.


/v2/devices/{id}/pass

Usage and SDK Samples

curl -X POST "https://api2.arduino.cc/iot/v2/devices/{id}/pass"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2PassApi()
var id = id_example; // {String} The id of the device
var checkDevicesV2PassPayload = ; // {CheckDevicesV2PassPayload} 
api.devicesV2PassCheck(id, checkDevicesV2PassPayload).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2PassApi()
id = id_example # String | The id of the device (default to null)
checkDevicesV2PassPayload =  # CheckDevicesV2PassPayload | 

try: 
    # check devices_v2_pass
    api_instance.devices_v2_pass_check(id, checkDevicesV2PassPayload)
except ApiException as e:
    print("Exception when calling DevicesV2PassApi->devicesV2PassCheck: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Body parameters
Name Description
checkDevicesV2PassPayload *

Responses


devicesV2PassDelete

delete devices_v2_pass

Removes the password for the device.


/v2/devices/{id}/pass

Usage and SDK Samples

curl -X DELETE "https://api2.arduino.cc/iot/v2/devices/{id}/pass"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2PassApi()
var id = id_example; // {String} The id of the device
api.devicesV2PassDelete(id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2PassApi()
id = id_example # String | The id of the device (default to null)

try: 
    # delete devices_v2_pass
    api_instance.devices_v2_pass_delete(id)
except ApiException as e:
    print("Exception when calling DevicesV2PassApi->devicesV2PassDelete: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required

Responses


devicesV2PassGet

get devices_v2_pass

Returns whether the password for this device is set or not. It doesn't return the password.


/v2/devices/{id}/pass

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/devices/{id}/pass?suggested_password="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2PassApi()
var id = id_example; // {String} The id of the device
var opts = {
  'suggestedPassword': true // {Boolean} If true, return a suggested password
};
api.devicesV2PassGet(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2PassApi()
id = id_example # String | The id of the device (default to null)
suggestedPassword = true # Boolean | If true, return a suggested password (optional) (default to null)

try: 
    # get devices_v2_pass
    api_response = api_instance.devices_v2_pass_get(id, suggestedPassword=suggestedPassword)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2PassApi->devicesV2PassGet: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Query parameters
Name Description
suggested_password
Boolean
If true, return a suggested password

Responses


devicesV2PassSet

set devices_v2_pass

Sets the password for the device. It can never be read back.


/v2/devices/{id}/pass

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/devices/{id}/pass"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.DevicesV2PassApi()
var id = id_example; // {String} The id of the device
var devicev2Pass = ; // {Devicev2Pass} 
api.devicesV2PassSet(id, devicev2Pass).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.DevicesV2PassApi()
id = id_example # String | The id of the device (default to null)
devicev2Pass =  # Devicev2Pass | 

try: 
    # set devices_v2_pass
    api_response = api_instance.devices_v2_pass_set(id, devicev2Pass)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2PassApi->devicesV2PassSet: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Body parameters
Name Description
devicev2Pass *

Responses


PropertiesV2

propertiesV2Create

create properties_v2

Creates a new property associated to a thing


/v2/things/{id}/properties

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/things/{id}/properties"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var property = ; // {Property} 
api.propertiesV2Create(id, property).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
property =  # Property | 

try: 
    # create properties_v2
    api_response = api_instance.properties_v2_create(id, property)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Create: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Body parameters
Name Description
property *

PropertyPayload describes a property of a thing. No field is mandatory

Responses


propertiesV2Delete

delete properties_v2

Removes a property associated to a thing


/v2/things/{id}/properties/{pid}

Usage and SDK Samples

curl -X DELETE "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}?force="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var pid = pid_example; // {String} The id of the property
var opts = {
  'force': true // {Boolean} If true, hard delete the property
};
api.propertiesV2Delete(id, pid, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
pid = pid_example # String | The id of the property (default to null)
force = true # Boolean | If true, hard delete the property (optional) (default to null)

try: 
    # delete properties_v2
    api_instance.properties_v2_delete(id, pid, force=force)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Delete: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Query parameters
Name Description
force
Boolean
If true, hard delete the property

Responses


propertiesV2List

list properties_v2

Returns the list of properties associated to the thing


/v2/things/{id}/properties

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/things/{id}/properties?show_deleted="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var opts = {
  'showDeleted': true // {Boolean} If true, shows the soft deleted properties
};
api.propertiesV2List(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
showDeleted = true # Boolean | If true, shows the soft deleted properties (optional) (default to null)

try: 
    # list properties_v2
    api_response = api_instance.properties_v2_list(id, showDeleted=showDeleted)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2List: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Query parameters
Name Description
show_deleted
Boolean
If true, shows the soft deleted properties

Responses


propertiesV2Publish

publish properties_v2

Publish a property value to MQTT


/v2/things/{id}/properties/{pid}/publish

Usage and SDK Samples

curl -X PUT "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}/publish"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var pid = pid_example; // {String} The id of the property
var propertyValue = ; // {PropertyValue} 
api.propertiesV2Publish(id, pid, propertyValue).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
pid = pid_example # String | The id of the property (default to null)
propertyValue =  # PropertyValue | 

try: 
    # publish properties_v2
    api_instance.properties_v2_publish(id, pid, propertyValue)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Publish: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Body parameters
Name Description
propertyValue *

PropertyValuePayload describes a property value

Responses


propertiesV2Show

show properties_v2

Returns the property requested by the user


/v2/things/{id}/properties/{pid}

Usage and SDK Samples

curl -X GET "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}?show_deleted="
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var pid = pid_example; // {String} The id of the property
var opts = {
  'showDeleted': true // {Boolean} If true, shows the soft deleted properties
};
api.propertiesV2Show(id, pid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
pid = pid_example # String | The id of the property (default to null)
showDeleted = true # Boolean | If true, shows the soft deleted properties (optional) (default to null)

try: 
    # show properties_v2
    api_response = api_instance.properties_v2_show(id, pid, showDeleted=showDeleted)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Show: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Query parameters
Name Description
show_deleted
Boolean
If true, shows the soft deleted properties

Responses


propertiesV2Update

update properties_v2

Updates a property associated to a thing


/v2/things/{id}/properties/{pid}

Usage and SDK Samples

curl -X POST "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var pid = pid_example; // {String} The id of the property
var property = ; // {Property} 
api.propertiesV2Update(id, pid, property).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = openapi_client.PropertiesV2Api()
id = id_example # String | The id of the thing (default to null)
pid = pid_example # String | The id of the property (default to null)
property =  # Property | 

try: 
    # update properties_v2
    api_response = api_instance.properties_v2_update(id, pid, property)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Update: %s\n" % e)

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Body parameters
Name Description
property *

PropertyPayload describes a property of a thing. No field is mandatory

Responses


SeriesV2

seriesV2BatchQuery

batch_query series_v2

Returns the batch of time-series data


/v2/series/batch_query

Usage and SDK Samples

curl -X POST "https://api2.arduino.cc/iot/v2/series/batch_query"
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new ArduinoIotClient.SeriesV2Ap