Arduino IoT Cloud API

DashboardsV2

dashboardsV2Clone

clone dashboards_v2

Clone an existing dashboard


/v2/dashboards/{id}/clone

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/clone" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Clone clone = ; // Clone | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Clone");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final Clone clone = new Clone(); // Clone | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Clone(id, clone, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Clone: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Clone clone = ; // Clone | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Clone");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
Clone *clone = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// clone dashboards_v2
[apiInstance dashboardsV2CloneWith:id
    clone:clone
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDashboardv2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var clone = ; // {Clone} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Clone(id, clone, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2CloneExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var clone = new Clone(); // Clone | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // clone dashboards_v2
                ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Clone: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$clone = ; // Clone | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2Clone($id, $clone, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Clone: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $clone = WWW::OPenAPIClient::Object::Clone->new(); # Clone | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2Clone(id => $id, clone => $clone, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Clone: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
clone =  # Clone | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # clone dashboards_v2
    api_response = api_instance.dashboards_v2_clone(id, clone, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Clone: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let clone = ; // Clone
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Clone(id, clone, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
clone *

Responses


dashboardsV2Create

create dashboards_v2

Create a new dashboard


/v2/dashboards

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/dashboards" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        Dashboardv2 dashboardv2 = ; // Dashboardv2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Create(dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Create");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Dashboardv2 dashboardv2 = new Dashboardv2(); // Dashboardv2 | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Create(dashboardv2, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Create: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        Dashboardv2 dashboardv2 = ; // Dashboardv2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Create(dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Create");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
Dashboardv2 *dashboardv2 = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create dashboards_v2
[apiInstance dashboardsV2CreateWith:dashboardv2
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDashboardv2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var dashboardv2 = ; // {Dashboardv2} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Create(dashboardv2, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2CreateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var dashboardv2 = new Dashboardv2(); // Dashboardv2 | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create dashboards_v2
                ArduinoDashboardv2 result = apiInstance.dashboardsV2Create(dashboardv2, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Create: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$dashboardv2 = ; // Dashboardv2 | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2Create($dashboardv2, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Create: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $dashboardv2 = WWW::OPenAPIClient::Object::Dashboardv2->new(); # Dashboardv2 | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2Create(dashboardv2 => $dashboardv2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Create: $@\n";
}
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.DashboardsV2Api()
dashboardv2 =  # Dashboardv2 | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # create dashboards_v2
    api_response = api_instance.dashboards_v2_create(dashboardv2, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Create: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let dashboardv2 = ; // Dashboardv2
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Create(dashboardv2, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
dashboardv2 *

DashboardV2Payload describes a dashboard

Responses


dashboardsV2Delete

delete dashboards_v2

Delete a dashboard


/v2/dashboards/{id}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2Delete(id, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Delete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Delete(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Delete: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2Delete(id, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Delete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// delete dashboards_v2
[apiInstance dashboardsV2DeleteWith:id
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Delete(id, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2DeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // delete dashboards_v2
                apiInstance.dashboardsV2Delete(id, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->dashboardsV2Delete($id, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->dashboardsV2Delete(id => $id, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Delete: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # delete dashboards_v2
    api_instance.dashboards_v2_delete(id, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Delete: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Delete(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String

Responses


dashboardsV2DeleteShare

deleteShare dashboards_v2

Delete a user the dashboard has been shared with


/v2/dashboards/{id}/shares/{user_id}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/shares/{user_id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String userId = userId_example; // String | The id of the user
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2DeleteShare(id, userId, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2DeleteShare");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final String userId = new String(); // String | The id of the user
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2DeleteShare(id, userId, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2DeleteShare: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String userId = userId_example; // String | The id of the user
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2DeleteShare(id, userId, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2DeleteShare");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
String *userId = userId_example; // The id of the user (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// deleteShare dashboards_v2
[apiInstance dashboardsV2DeleteShareWith:id
    userId:userId
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var userId = userId_example; // {String} The id of the user
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2DeleteShare(id, userId, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2DeleteShareExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var userId = userId_example;  // String | The id of the user (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // deleteShare dashboards_v2
                apiInstance.dashboardsV2DeleteShare(id, userId, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2DeleteShare: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$userId = userId_example; // String | The id of the user
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->dashboardsV2DeleteShare($id, $userId, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2DeleteShare: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $userId = userId_example; # String | The id of the user
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->dashboardsV2DeleteShare(id => $id, userId => $userId, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2DeleteShare: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
userId = userId_example # String | The id of the user (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # deleteShare dashboards_v2
    api_instance.dashboards_v2_delete_share(id, userId, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2DeleteShare: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let userId = userId_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2DeleteShare(id, userId, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
user_id*
String
The id of the user
Required
Header parameters
Name Description
X-Organization
String

Responses



dashboardsV2List

list dashboards_v2

Returns the list of dashboards


/v2/dashboards

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/dashboards?name=name_example&user_id=userId_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String name = name_example; // String | The name of the dashboard
        String userId = userId_example; // String | The user_id of the dashboard's owner
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDashboardv2] result = apiInstance.dashboardsV2List(name, userId, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String name = new String(); // String | The name of the dashboard
final String userId = new String(); // String | The user_id of the dashboard's owner
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2List(name, userId, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2List: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String name = name_example; // String | The name of the dashboard
        String userId = userId_example; // String | The user_id of the dashboard's owner
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDashboardv2] result = apiInstance.dashboardsV2List(name, userId, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2List");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *name = name_example; // The name of the dashboard (optional) (default to null)
String *userId = userId_example; // The user_id of the dashboard's owner (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// list dashboards_v2
[apiInstance dashboardsV2ListWith:name
    userId:userId
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoDashboardv2] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var opts = {
  'name': name_example, // {String} The name of the dashboard
  'userId': userId_example, // {String} The user_id of the dashboard's owner
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2List(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2ListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var name = name_example;  // String | The name of the dashboard (optional)  (default to null)
            var userId = userId_example;  // String | The user_id of the dashboard's owner (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // list dashboards_v2
                array[ArduinoDashboardv2] result = apiInstance.dashboardsV2List(name, userId, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2List: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$name = name_example; // String | The name of the dashboard
$userId = userId_example; // String | The user_id of the dashboard's owner
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2List($name, $userId, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2List: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $name = name_example; # String | The name of the dashboard
my $userId = userId_example; # String | The user_id of the dashboard's owner
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2List(name => $name, userId => $userId, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2List: $@\n";
}
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.DashboardsV2Api()
name = name_example # String | The name of the dashboard (optional) (default to null)
userId = userId_example # String | The user_id of the dashboard's owner (optional) (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # list dashboards_v2
    api_response = api_instance.dashboards_v2_list(name=name, userId=userId, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2List: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let name = name_example; // String
    let userId = userId_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2List(name, userId, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
name
String
The name of the dashboard
user_id
String
The user_id of the dashboard's owner

Responses


dashboardsV2ListShares

listShares dashboards_v2

List of users the dashboard has been shared with


/v2/dashboards/{id}/shares

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.dashboardshare+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/shares"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDashboardshare] result = apiInstance.dashboardsV2ListShares(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2ListShares");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2ListShares(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2ListShares: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDashboardshare] result = apiInstance.dashboardsV2ListShares(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2ListShares");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// listShares dashboards_v2
[apiInstance dashboardsV2ListSharesWith:id
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoDashboardshare] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2ListShares(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2ListSharesExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // listShares dashboards_v2
                array[ArduinoDashboardshare] result = apiInstance.dashboardsV2ListShares(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2ListShares: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2ListShares($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2ListShares: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2ListShares(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2ListShares: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # listShares dashboards_v2
    api_response = api_instance.dashboards_v2_list_shares(id, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2ListShares: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2ListShares(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String

Responses


dashboardsV2RequestAccess

requestAccess dashboards_v2

Request access to a dashboard


/v2/dashboards/{id}/share_request

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/share_request" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Sharerequest sharerequest = ; // Sharerequest | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2RequestAccess(id, sharerequest, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2RequestAccess");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final Sharerequest sharerequest = new Sharerequest(); // Sharerequest | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2RequestAccess(id, sharerequest, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2RequestAccess: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Sharerequest sharerequest = ; // Sharerequest | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2RequestAccess(id, sharerequest, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2RequestAccess");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
Sharerequest *sharerequest = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// requestAccess dashboards_v2
[apiInstance dashboardsV2RequestAccessWith:id
    sharerequest:sharerequest
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var sharerequest = ; // {Sharerequest} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2RequestAccess(id, sharerequest, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2RequestAccessExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var sharerequest = new Sharerequest(); // Sharerequest | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // requestAccess dashboards_v2
                apiInstance.dashboardsV2RequestAccess(id, sharerequest, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2RequestAccess: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$sharerequest = ; // Sharerequest | 
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->dashboardsV2RequestAccess($id, $sharerequest, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2RequestAccess: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $sharerequest = WWW::OPenAPIClient::Object::Sharerequest->new(); # Sharerequest | 
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->dashboardsV2RequestAccess(id => $id, sharerequest => $sharerequest, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2RequestAccess: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
sharerequest =  # Sharerequest | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # requestAccess dashboards_v2
    api_instance.dashboards_v2_request_access(id, sharerequest, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2RequestAccess: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let sharerequest = ; // Sharerequest
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2RequestAccess(id, sharerequest, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
sharerequest *

Responses


dashboardsV2Share

share dashboards_v2

Share a dashboard


/v2/dashboards/{id}/shares

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/shares" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Dashboardshare dashboardshare = ; // Dashboardshare | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2Share(id, dashboardshare, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Share");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final Dashboardshare dashboardshare = new Dashboardshare(); // Dashboardshare | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Share(id, dashboardshare, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Share: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Dashboardshare dashboardshare = ; // Dashboardshare | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.dashboardsV2Share(id, dashboardshare, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Share");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
Dashboardshare *dashboardshare = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// share dashboards_v2
[apiInstance dashboardsV2ShareWith:id
    dashboardshare:dashboardshare
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var dashboardshare = ; // {Dashboardshare} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Share(id, dashboardshare, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2ShareExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var dashboardshare = new Dashboardshare(); // Dashboardshare | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // share dashboards_v2
                apiInstance.dashboardsV2Share(id, dashboardshare, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Share: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$dashboardshare = ; // Dashboardshare | 
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->dashboardsV2Share($id, $dashboardshare, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Share: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $dashboardshare = WWW::OPenAPIClient::Object::Dashboardshare->new(); # Dashboardshare | 
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->dashboardsV2Share(id => $id, dashboardshare => $dashboardshare, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Share: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
dashboardshare =  # Dashboardshare | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # share dashboards_v2
    api_instance.dashboards_v2_share(id, dashboardshare, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Share: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let dashboardshare = ; // Dashboardshare
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Share(id, dashboardshare, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
dashboardshare *

Responses


dashboardsV2Show

show dashboards_v2

Show a dashboard


/v2/dashboards/{id}

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Show");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Show(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Show: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Show");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// show dashboards_v2
[apiInstance dashboardsV2ShowWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDashboardv2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Show(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2ShowExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // show dashboards_v2
                ArduinoDashboardv2 result = apiInstance.dashboardsV2Show(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Show: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2Show($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Show: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Show: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # show dashboards_v2
    api_response = api_instance.dashboards_v2_show(id, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Show: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Show(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String

Responses


dashboardsV2Template

template dashboards_v2

Get a template of the dashboard


/v2/dashboards/{id}/template

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.dashboardv2template+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/template"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2template result = apiInstance.dashboardsV2Template(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Template");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Template(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Template: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2template result = apiInstance.dashboardsV2Template(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Template");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// template dashboards_v2
[apiInstance dashboardsV2TemplateWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDashboardv2template output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Template(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2TemplateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // template dashboards_v2
                ArduinoDashboardv2template result = apiInstance.dashboardsV2Template(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Template: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2Template($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Template: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2Template(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Template: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # template dashboards_v2
    api_response = api_instance.dashboards_v2_template(id, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Template: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Template(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String

Responses


dashboardsV2Update

update dashboards_v2

Updates an existing dashboard


/v2/dashboards/{id}

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;

import java.io.File;
import java.util.*;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Dashboardv2 dashboardv2 = ; // Dashboardv2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Update(id, dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Update");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the dashboard
final Dashboardv2 dashboardv2 = new Dashboardv2(); // Dashboardv2 | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.dashboardsV2Update(id, dashboardv2, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Update: $e\n');
}

import org.openapitools.client.api.DashboardsV2Api;

public class DashboardsV2ApiExample {
    public static void main(String[] args) {
        DashboardsV2Api apiInstance = new DashboardsV2Api();
        String id = id_example; // String | The id of the dashboard
        Dashboardv2 dashboardv2 = ; // Dashboardv2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Update(id, dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Update");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
Dashboardv2 *dashboardv2 = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// update dashboards_v2
[apiInstance dashboardsV2UpdateWith:id
    dashboardv2:dashboardv2
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDashboardv2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var dashboardv2 = ; // {Dashboardv2} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.dashboardsV2Update(id, dashboardv2, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class dashboardsV2UpdateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DashboardsV2Api();
            var id = id_example;  // String | The id of the dashboard (default to null)
            var dashboardv2 = new Dashboardv2(); // Dashboardv2 | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // update dashboards_v2
                ArduinoDashboardv2 result = apiInstance.dashboardsV2Update(id, dashboardv2, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Update: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$dashboardv2 = ; // Dashboardv2 | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->dashboardsV2Update($id, $dashboardv2, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Update: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $dashboardv2 = WWW::OPenAPIClient::Object::Dashboardv2->new(); # Dashboardv2 | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->dashboardsV2Update(id => $id, dashboardv2 => $dashboardv2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Update: $@\n";
}
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.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
dashboardv2 =  # Dashboardv2 | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # update dashboards_v2
    api_response = api_instance.dashboards_v2_update(id, dashboardv2, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Update: %s\n" % e)
extern crate DashboardsV2Api;

pub fn main() {
    let id = id_example; // String
    let dashboardv2 = ; // Dashboardv2
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Update(id, dashboardv2, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the dashboard
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
dashboardv2 *

DashboardV2Payload describes a dashboard

Responses


DevicesV2

devicesV2Create

create devices_v2

Creates a new device associated to the user.


/v2/devices

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.devicev2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices" \
 -d '{
  "connection_type" : "wifi",
  "serial" : "serial",
  "user_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "fqbn" : "fqbn",
  "name" : "name",
  "wifi_fw_version" : "wifi_fw_version",
  "type" : "mkrwifi1010"
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        CreateDevicesV2Payload createDevicesV2Payload = ; // CreateDevicesV2Payload | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Create(createDevicesV2Payload, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Create");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateDevicesV2Payload createDevicesV2Payload = new CreateDevicesV2Payload(); // CreateDevicesV2Payload | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2Create(createDevicesV2Payload, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2Create: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        CreateDevicesV2Payload createDevicesV2Payload = ; // CreateDevicesV2Payload | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Create(createDevicesV2Payload, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Create");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
CreateDevicesV2Payload *createDevicesV2Payload = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create devices_v2
[apiInstance devicesV2CreateWith:createDevicesV2Payload
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2Api()
var createDevicesV2Payload = ; // {CreateDevicesV2Payload} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2Create(createDevicesV2Payload, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CreateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var createDevicesV2Payload = new CreateDevicesV2Payload(); // CreateDevicesV2Payload | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create devices_v2
                ArduinoDevicev2 result = apiInstance.devicesV2Create(createDevicesV2Payload, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2Create: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$createDevicesV2Payload = ; // CreateDevicesV2Payload | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2Create($createDevicesV2Payload, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2Create: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $createDevicesV2Payload = WWW::OPenAPIClient::Object::CreateDevicesV2Payload->new(); # CreateDevicesV2Payload | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2Create(createDevicesV2Payload => $createDevicesV2Payload, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Create: $@\n";
}
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 | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let createDevicesV2Payload = ; // CreateDevicesV2Payload
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Create(createDevicesV2Payload, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/devices/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.devicesV2Delete(id, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Delete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2Delete(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2Delete: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.devicesV2Delete(id, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Delete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// delete devices_v2
[apiInstance devicesV2DeleteWith:id
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2Api()
var id = id_example; // {String} The id of the device
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2Delete(id, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2DeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // delete devices_v2
                apiInstance.devicesV2Delete(id, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2Delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->devicesV2Delete($id, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2Delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->devicesV2Delete(id => $id, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Delete: $@\n";
}
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)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Delete(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Header parameters
Name Description
X-Organization
String

Responses


devicesV2GetEvents

getEvents devices_v2

GET device events


/v2/devices/{id}/events

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.devicev2.event.properties+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/events?limit=56&start=start_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Integer limit = 56; // Integer | The number of events to select
        String start = start_example; // String | The time at which to start selecting events
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2EventProperties result = apiInstance.devicesV2GetEvents(id, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetEvents");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Integer limit = new Integer(); // Integer | The number of events to select
final String start = new String(); // String | The time at which to start selecting events
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2GetEvents(id, limit, start, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2GetEvents: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Integer limit = 56; // Integer | The number of events to select
        String start = start_example; // String | The time at which to start selecting events
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2EventProperties result = apiInstance.devicesV2GetEvents(id, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetEvents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
Integer *limit = 56; // The number of events to select (optional) (default to null)
String *start = start_example; // The time at which to start selecting events (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// getEvents devices_v2
[apiInstance devicesV2GetEventsWith:id
    limit:limit
    start:start
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2EventProperties output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2GetEvents(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2GetEventsExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var limit = 56;  // Integer | The number of events to select (optional)  (default to null)
            var start = start_example;  // String | The time at which to start selecting events (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // getEvents devices_v2
                ArduinoDevicev2EventProperties result = apiInstance.devicesV2GetEvents(id, limit, start, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2GetEvents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$limit = 56; // Integer | The number of events to select
$start = start_example; // String | The time at which to start selecting events
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2GetEvents($id, $limit, $start, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2GetEvents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $limit = 56; # Integer | The number of events to select
my $start = start_example; # String | The time at which to start selecting events
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2GetEvents(id => $id, limit => $limit, start => $start, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2GetEvents: $@\n";
}
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)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let limit = 56; // Integer
    let start = start_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2GetEvents(id, limit, start, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Header parameters
Name Description
X-Organization
String
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 \
 \
 -H "Accept: application/vnd.arduino.devicev2properties+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/properties?show_deleted=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2properties result = apiInstance.devicesV2GetProperties(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetProperties");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted properties
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2GetProperties(id, showDeleted, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2GetProperties: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2properties result = apiInstance.devicesV2GetProperties(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetProperties");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted properties (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// getProperties devices_v2
[apiInstance devicesV2GetPropertiesWith:id
    showDeleted:showDeleted
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2properties output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2GetProperties(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2GetPropertiesExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted properties (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // getProperties devices_v2
                ArduinoDevicev2properties result = apiInstance.devicesV2GetProperties(id, showDeleted, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2GetProperties: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$showDeleted = true; // Boolean | If true, shows the soft deleted properties
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2GetProperties($id, $showDeleted, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2GetProperties: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $showDeleted = true; # Boolean | If true, shows the soft deleted properties
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2GetProperties(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2GetProperties: $@\n";
}
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 false)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let showDeleted = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2GetProperties(id, showDeleted, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


devicesV2GetStatusEvents

GetStatusEvents devices_v2

GET connection status events


/v2/devices/{id}/status

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.devicev2.status.events+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/status?limit=56&start=start_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Integer limit = 56; // Integer | The number of events to select
        String start = start_example; // String | The time at which to start selecting events
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2StatusEvents result = apiInstance.devicesV2GetStatusEvents(id, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetStatusEvents");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Integer limit = new Integer(); // Integer | The number of events to select
final String start = new String(); // String | The time at which to start selecting events
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2GetStatusEvents(id, limit, start, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2GetStatusEvents: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Integer limit = 56; // Integer | The number of events to select
        String start = start_example; // String | The time at which to start selecting events
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2StatusEvents result = apiInstance.devicesV2GetStatusEvents(id, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2GetStatusEvents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
Integer *limit = 56; // The number of events to select (optional) (default to 30)
String *start = start_example; // The time at which to start selecting events (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// GetStatusEvents devices_v2
[apiInstance devicesV2GetStatusEventsWith:id
    limit:limit
    start:start
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2StatusEvents output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2GetStatusEvents(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2GetStatusEventsExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var limit = 56;  // Integer | The number of events to select (optional)  (default to 30)
            var start = start_example;  // String | The time at which to start selecting events (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // GetStatusEvents devices_v2
                ArduinoDevicev2StatusEvents result = apiInstance.devicesV2GetStatusEvents(id, limit, start, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2GetStatusEvents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$limit = 56; // Integer | The number of events to select
$start = start_example; // String | The time at which to start selecting events
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2GetStatusEvents($id, $limit, $start, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2GetStatusEvents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $limit = 56; # Integer | The number of events to select
my $start = start_example; # String | The time at which to start selecting events
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2GetStatusEvents(id => $id, limit => $limit, start => $start, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2GetStatusEvents: $@\n";
}
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 30)
start = start_example # String | The time at which to start selecting events (optional) (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # GetStatusEvents devices_v2
    api_response = api_instance.devices_v2_get_status_events(id, limit=limit, start=start, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2Api->devicesV2GetStatusEvents: %s\n" % e)
extern crate DevicesV2Api;

pub fn main() {
    let id = id_example; // String
    let limit = 56; // Integer
    let start = start_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2GetStatusEvents(id, limit, start, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


devicesV2List

list devices_v2

Returns the list of devices associated to the user


/v2/devices

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.devicev2+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices?across_user_ids=true&serial=serial_example&tags="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        Boolean acrossUserIds = true; // Boolean | If true, returns all the devices
        String serial = serial_example; // String | Filter by device serial number
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, tags, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean acrossUserIds = new Boolean(); // Boolean | If true, returns all the devices
final String serial = new String(); // String | Filter by device serial number
final array[String] tags = new array[String](); // array[String] | Filter by tags
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2List(acrossUserIds, serial, tags, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2List: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        Boolean acrossUserIds = true; // Boolean | If true, returns all the devices
        String serial = serial_example; // String | Filter by device serial number
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, tags, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2List");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
Boolean *acrossUserIds = true; // If true, returns all the devices (optional) (default to false)
String *serial = serial_example; // Filter by device serial number (optional) (default to null)
array[String] *tags = ; // Filter by tags (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// list devices_v2
[apiInstance devicesV2ListWith:acrossUserIds
    serial:serial
    tags:tags
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoDevicev2] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2Api()
var opts = {
  'acrossUserIds': true, // {Boolean} If true, returns all the devices
  'serial': serial_example, // {String} Filter by device serial number
  'tags': , // {array[String]} Filter by tags
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2List(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2ListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var acrossUserIds = true;  // Boolean | If true, returns all the devices (optional)  (default to false)
            var serial = serial_example;  // String | Filter by device serial number (optional)  (default to null)
            var tags = new array[String](); // array[String] | Filter by tags (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // list devices_v2
                array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, tags, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2List: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$acrossUserIds = true; // Boolean | If true, returns all the devices
$serial = serial_example; // String | Filter by device serial number
$tags = ; // array[String] | Filter by tags
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2List($acrossUserIds, $serial, $tags, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2List: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $acrossUserIds = true; # Boolean | If true, returns all the devices
my $serial = serial_example; # String | Filter by device serial number
my $tags = []; # array[String] | Filter by tags
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2List(acrossUserIds => $acrossUserIds, serial => $serial, tags => $tags, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2List: $@\n";
}
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 false)
serial = serial_example # String | Filter by device serial number (optional) (default to null)
tags =  # array[String] | Filter by tags (optional) (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let acrossUserIds = true; // Boolean
    let serial = serial_example; // String
    let tags = ; // array[String]
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2List(acrossUserIds, serial, tags, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
across_user_ids
Boolean
If true, returns all the devices
serial
String
Filter by device serial number
tags
array[String]
Filter by tags

Responses


devicesV2Show

show devices_v2

Returns the device requested by the user


/v2/devices/{id}

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.devicev2+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Show");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2Show(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2Show: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Show");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// show devices_v2
[apiInstance devicesV2ShowWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

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

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2ShowExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // show devices_v2
                ArduinoDevicev2 result = apiInstance.devicesV2Show(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2Show: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2Show($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2Show: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Show: $@\n";
}
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)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Show(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Header parameters
Name Description
X-Organization
String

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2propertyvalues+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/properties/{pid}?limit=56&start=start_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String pid = pid_example; // String | The id of the property
        Integer limit = 56; // Integer | The number of properties to select
        String start = start_example; // String | The time at which to start selecting properties
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2propertyvalues result = apiInstance.devicesV2Timeseries(id, pid, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Timeseries");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final String pid = new String(); // String | The id of the property
final Integer limit = new Integer(); // Integer | The number of properties to select
final String start = new String(); // String | The time at which to start selecting properties
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2Timeseries(id, pid, limit, start, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2Timeseries: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        String pid = pid_example; // String | The id of the property
        Integer limit = 56; // Integer | The number of properties to select
        String start = start_example; // String | The time at which to start selecting properties
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2propertyvalues result = apiInstance.devicesV2Timeseries(id, pid, limit, start, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Timeseries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
String *pid = pid_example; // The id of the property (default to null)
Integer *limit = 56; // The number of properties to select (optional) (default to null)
String *start = start_example; // The time at which to start selecting properties (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// timeseries devices_v2
[apiInstance devicesV2TimeseriesWith:id
    pid:pid
    limit:limit
    start:start
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2propertyvalues output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} 
};
api.devicesV2Timeseries(id, pid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2TimeseriesExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var pid = pid_example;  // String | The id of the property (default to null)
            var limit = 56;  // Integer | The number of properties to select (optional)  (default to null)
            var start = start_example;  // String | The time at which to start selecting properties (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // timeseries devices_v2
                ArduinoDevicev2propertyvalues result = apiInstance.devicesV2Timeseries(id, pid, limit, start, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2Timeseries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$pid = pid_example; // String | The id of the property
$limit = 56; // Integer | The number of properties to select
$start = start_example; // String | The time at which to start selecting properties
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2Timeseries($id, $pid, $limit, $start, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2Timeseries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $pid = pid_example; # String | The id of the property
my $limit = 56; # Integer | The number of properties to select
my $start = start_example; # String | The time at which to start selecting properties
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2Timeseries(id => $id, pid => $pid, limit => $limit, start => $start, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Timeseries: $@\n";
}
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)
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let limit = 56; // Integer
    let start = start_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Timeseries(id, pid, limit, start, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
pid*
String
The id of the property
Required
Header parameters
Name Description
X-Organization
String
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 \
 \
 -H "Accept: application/vnd.arduino.devicev2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Devicev2 devicev2 = ; // Devicev2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Update(id, devicev2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Update");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Devicev2 devicev2 = new Devicev2(); // Devicev2 | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2Update(id, devicev2, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2Update: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        Devicev2 devicev2 = ; // Devicev2 | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoDevicev2 result = apiInstance.devicesV2Update(id, devicev2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2Update");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
Devicev2 *devicev2 = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// update devices_v2
[apiInstance devicesV2UpdateWith:id
    devicev2:devicev2
    xOrganization:xOrganization
              completionHandler: ^(ArduinoDevicev2 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

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

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2UpdateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var devicev2 = new Devicev2(); // Devicev2 | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // update devices_v2
                ArduinoDevicev2 result = apiInstance.devicesV2Update(id, devicev2, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2Update: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$devicev2 = ; // Devicev2 | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->devicesV2Update($id, $devicev2, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2Update: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $devicev2 = WWW::OPenAPIClient::Object::Devicev2->new(); # Devicev2 | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->devicesV2Update(id => $id, devicev2 => $devicev2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Update: $@\n";
}
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 | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let devicev2 = ; // Devicev2
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Update(id, devicev2, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Header parameters
Name Description
X-Organization
String
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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/properties" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2Api;

import java.io.File;
import java.util.*;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        PropertiesValues propertiesValues = ; // PropertiesValues | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.devicesV2UpdateProperties(id, propertiesValues, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2UpdateProperties");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final PropertiesValues propertiesValues = new PropertiesValues(); // PropertiesValues | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.devicesV2UpdateProperties(id, propertiesValues, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2UpdateProperties: $e\n');
}

import org.openapitools.client.api.DevicesV2Api;

public class DevicesV2ApiExample {
    public static void main(String[] args) {
        DevicesV2Api apiInstance = new DevicesV2Api();
        String id = id_example; // String | The id of the device
        PropertiesValues propertiesValues = ; // PropertiesValues | 
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.devicesV2UpdateProperties(id, propertiesValues, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2Api#devicesV2UpdateProperties");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2Api *apiInstance = [[DevicesV2Api alloc] init];
String *id = id_example; // The id of the device (default to null)
PropertiesValues *propertiesValues = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// updateProperties devices_v2
[apiInstance devicesV2UpdatePropertiesWith:id
    propertiesValues:propertiesValues
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

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

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2UpdatePropertiesExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2Api();
            var id = id_example;  // String | The id of the device (default to null)
            var propertiesValues = new PropertiesValues(); // PropertiesValues | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // updateProperties devices_v2
                apiInstance.devicesV2UpdateProperties(id, propertiesValues, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2Api.devicesV2UpdateProperties: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2Api();
$id = id_example; // String | The id of the device
$propertiesValues = ; // PropertiesValues | 
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->devicesV2UpdateProperties($id, $propertiesValues, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2Api->devicesV2UpdateProperties: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2Api->new();
my $id = id_example; # String | The id of the device
my $propertiesValues = WWW::OPenAPIClient::Object::PropertiesValues->new(); # PropertiesValues | 
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->devicesV2UpdateProperties(id => $id, propertiesValues => $propertiesValues, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2UpdateProperties: $@\n";
}
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 | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let propertiesValues = ; // PropertiesValues
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2UpdateProperties(id, propertiesValues, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Header parameters
Name Description
X-Organization
String
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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.cert+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs" \
 -d '{
  "csr" : "-----BEGIN CERTIFICATE-----\n\t\t\tMIIBeDCCAR4CAQAwgY0xCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl\n\t\t\tMQ8wDQYDVQQHEwZNeUNpdHkxFDASBgNVBAoTC0NvbXBhbnkgTHRkMQswCQYDVQQL\n\t\t\tEwJJVDEUMBIGA1UEAxMLZXhhbXBsZS5jb20xHzAdBgkqhkiG9w0BCQEMEHRlc3RA\n\t\t\tZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATf6J9Gk79XGJ2I\n\t\t\t+v6p/r0UmPufUcUwtlx7gx87+DaI8Vpj9R5KN71HsHYw5uq+Lm0cr0CZIdtZU4cP\n\t\t\tupd6jDQToC4wLAYJKoZIhvcNAQkOMR8wHTAbBgNVHREEFDASgRB0ZXN0QGV4YW1w\n\t\t\tbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIGQqtlGzYdjPwYZYJ41albMBcdrKI7+8\n\t\t\toiNSNWyDxJSGAiEAqQPPxMdr6vaXCCjr5s1J01WLKHzGoPFCR40rqAPs8eQ=\n\t\t\t-----END CERTIFICATE-----\n\t\t\t",
  "ca" : "ca",
  "enabled" : true
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2CertsApi;

import java.io.File;
import java.util.*;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String id = id_example; // String | The id of the device
        CreateDevicesV2CertsPayload createDevicesV2CertsPayload = ; // CreateDevicesV2CertsPayload | 

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsCreate(id, createDevicesV2CertsPayload);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsCreate");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final CreateDevicesV2CertsPayload createDevicesV2CertsPayload = new CreateDevicesV2CertsPayload(); // CreateDevicesV2CertsPayload | 

try {
    final result = await api_instance.devicesV2CertsCreate(id, createDevicesV2CertsPayload);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2CertsCreate: $e\n');
}

import org.openapitools.client.api.DevicesV2CertsApi;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String id = id_example; // String | The id of the device
        CreateDevicesV2CertsPayload createDevicesV2CertsPayload = ; // CreateDevicesV2CertsPayload | 

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsCreate(id, createDevicesV2CertsPayload);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsCreate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2CertsApi *apiInstance = [[DevicesV2CertsApi alloc] init];
String *id = id_example; // The id of the device (default to null)
CreateDevicesV2CertsPayload *createDevicesV2CertsPayload = ; // 

// create devices_v2_certs
[apiInstance devicesV2CertsCreateWith:id
    createDevicesV2CertsPayload:createDevicesV2CertsPayload
              completionHandler: ^(ArduinoDevicev2Cert output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CertsCreateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2CertsApi();
            var id = id_example;  // String | The id of the device (default to null)
            var createDevicesV2CertsPayload = new CreateDevicesV2CertsPayload(); // CreateDevicesV2CertsPayload | 

            try {
                // create devices_v2_certs
                ArduinoDevicev2Cert result = apiInstance.devicesV2CertsCreate(id, createDevicesV2CertsPayload);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2CertsApi.devicesV2CertsCreate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2CertsApi();
$id = id_example; // String | The id of the device
$createDevicesV2CertsPayload = ; // CreateDevicesV2CertsPayload | 

try {
    $result = $api_instance->devicesV2CertsCreate($id, $createDevicesV2CertsPayload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2CertsApi->devicesV2CertsCreate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2CertsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2CertsApi->new();
my $id = id_example; # String | The id of the device
my $createDevicesV2CertsPayload = WWW::OPenAPIClient::Object::CreateDevicesV2CertsPayload->new(); # CreateDevicesV2CertsPayload | 

eval {
    my $result = $api_instance->devicesV2CertsCreate(id => $id, createDevicesV2CertsPayload => $createDevicesV2CertsPayload);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2CertsApi->devicesV2CertsCreate: $@\n";
}
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)
extern crate DevicesV2CertsApi;

pub fn main() {
    let id = id_example; // String
    let createDevicesV2CertsPayload = ; // CreateDevicesV2CertsPayload

    let mut context = DevicesV2CertsApi::Context::default();
    let result = client.devicesV2CertsCreate(id, createDevicesV2CertsPayload, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2CertsApi;

import java.io.File;
import java.util.*;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device

        try {
            apiInstance.devicesV2CertsDelete(cid, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String cid = new String(); // String | The id of the cert
final String id = new String(); // String | The id of the device

try {
    final result = await api_instance.devicesV2CertsDelete(cid, id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2CertsDelete: $e\n');
}

import org.openapitools.client.api.DevicesV2CertsApi;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device

        try {
            apiInstance.devicesV2CertsDelete(cid, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2CertsApi *apiInstance = [[DevicesV2CertsApi alloc] init];
String *cid = cid_example; // The id of the cert (default to null)
String *id = id_example; // The id of the device (default to null)

// delete devices_v2_certs
[apiInstance devicesV2CertsDeleteWith:cid
    id:id
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CertsDeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2CertsApi();
            var cid = cid_example;  // String | The id of the cert (default to null)
            var id = id_example;  // String | The id of the device (default to null)

            try {
                // delete devices_v2_certs
                apiInstance.devicesV2CertsDelete(cid, id);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2CertsApi.devicesV2CertsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2CertsApi();
$cid = cid_example; // String | The id of the cert
$id = id_example; // String | The id of the device

try {
    $api_instance->devicesV2CertsDelete($cid, $id);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2CertsApi->devicesV2CertsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2CertsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2CertsApi->new();
my $cid = cid_example; # String | The id of the cert
my $id = id_example; # String | The id of the device

eval {
    $api_instance->devicesV2CertsDelete(cid => $cid, id => $id);
};
if ($@) {
    warn "Exception when calling DevicesV2CertsApi->devicesV2CertsDelete: $@\n";
}
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)
extern crate DevicesV2CertsApi;

pub fn main() {
    let cid = cid_example; // String
    let id = id_example; // String

    let mut context = DevicesV2CertsApi::Context::default();
    let result = client.devicesV2CertsDelete(cid, id, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.cert+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2CertsApi;

import java.io.File;
import java.util.*;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String id = id_example; // String | The id of the device

        try {
            array[ArduinoDevicev2Cert] result = apiInstance.devicesV2CertsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsList");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device

try {
    final result = await api_instance.devicesV2CertsList(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2CertsList: $e\n');
}

import org.openapitools.client.api.DevicesV2CertsApi;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String id = id_example; // String | The id of the device

        try {
            array[ArduinoDevicev2Cert] result = apiInstance.devicesV2CertsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2CertsApi *apiInstance = [[DevicesV2CertsApi alloc] init];
String *id = id_example; // The id of the device (default to null)

// list devices_v2_certs
[apiInstance devicesV2CertsListWith:id
              completionHandler: ^(array[ArduinoDevicev2Cert] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CertsListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2CertsApi();
            var id = id_example;  // String | The id of the device (default to null)

            try {
                // list devices_v2_certs
                array[ArduinoDevicev2Cert] result = apiInstance.devicesV2CertsList(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2CertsApi.devicesV2CertsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2CertsApi();
$id = id_example; // String | The id of the device

try {
    $result = $api_instance->devicesV2CertsList($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2CertsApi->devicesV2CertsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2CertsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2CertsApi->new();
my $id = id_example; # String | The id of the device

eval {
    my $result = $api_instance->devicesV2CertsList(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2CertsApi->devicesV2CertsList: $@\n";
}
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)
extern crate DevicesV2CertsApi;

pub fn main() {
    let id = id_example; // String

    let mut context = DevicesV2CertsApi::Context::default();
    let result = client.devicesV2CertsList(id, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.cert+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2CertsApi;

import java.io.File;
import java.util.*;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsShow(cid, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsShow");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String cid = new String(); // String | The id of the cert
final String id = new String(); // String | The id of the device

try {
    final result = await api_instance.devicesV2CertsShow(cid, id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2CertsShow: $e\n');
}

import org.openapitools.client.api.DevicesV2CertsApi;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsShow(cid, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsShow");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2CertsApi *apiInstance = [[DevicesV2CertsApi alloc] init];
String *cid = cid_example; // The id of the cert (default to null)
String *id = id_example; // The id of the device (default to null)

// show devices_v2_certs
[apiInstance devicesV2CertsShowWith:cid
    id:id
              completionHandler: ^(ArduinoDevicev2Cert output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CertsShowExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2CertsApi();
            var cid = cid_example;  // String | The id of the cert (default to null)
            var id = id_example;  // String | The id of the device (default to null)

            try {
                // show devices_v2_certs
                ArduinoDevicev2Cert result = apiInstance.devicesV2CertsShow(cid, id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2CertsApi.devicesV2CertsShow: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2CertsApi();
$cid = cid_example; // String | The id of the cert
$id = id_example; // String | The id of the device

try {
    $result = $api_instance->devicesV2CertsShow($cid, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2CertsApi->devicesV2CertsShow: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2CertsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2CertsApi->new();
my $cid = cid_example; # String | The id of the cert
my $id = id_example; # String | The id of the device

eval {
    my $result = $api_instance->devicesV2CertsShow(cid => $cid, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2CertsApi->devicesV2CertsShow: $@\n";
}
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)
extern crate DevicesV2CertsApi;

pub fn main() {
    let cid = cid_example; // String
    let id = id_example; // String

    let mut context = DevicesV2CertsApi::Context::default();
    let result = client.devicesV2CertsShow(cid, id, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.cert+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2CertsApi;

import java.io.File;
import java.util.*;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device
        Devicev2Cert devicev2Cert = ; // Devicev2Cert | 

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsUpdate(cid, id, devicev2Cert);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsUpdate");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String cid = new String(); // String | The id of the cert
final String id = new String(); // String | The id of the device
final Devicev2Cert devicev2Cert = new Devicev2Cert(); // Devicev2Cert | 

try {
    final result = await api_instance.devicesV2CertsUpdate(cid, id, devicev2Cert);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2CertsUpdate: $e\n');
}

import org.openapitools.client.api.DevicesV2CertsApi;

public class DevicesV2CertsApiExample {
    public static void main(String[] args) {
        DevicesV2CertsApi apiInstance = new DevicesV2CertsApi();
        String cid = cid_example; // String | The id of the cert
        String id = id_example; // String | The id of the device
        Devicev2Cert devicev2Cert = ; // Devicev2Cert | 

        try {
            ArduinoDevicev2Cert result = apiInstance.devicesV2CertsUpdate(cid, id, devicev2Cert);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2CertsApi#devicesV2CertsUpdate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2CertsApi *apiInstance = [[DevicesV2CertsApi alloc] init];
String *cid = cid_example; // The id of the cert (default to null)
String *id = id_example; // The id of the device (default to null)
Devicev2Cert *devicev2Cert = ; // 

// update devices_v2_certs
[apiInstance devicesV2CertsUpdateWith:cid
    id:id
    devicev2Cert:devicev2Cert
              completionHandler: ^(ArduinoDevicev2Cert output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2CertsUpdateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2CertsApi();
            var cid = cid_example;  // String | The id of the cert (default to null)
            var id = id_example;  // String | The id of the device (default to null)
            var devicev2Cert = new Devicev2Cert(); // Devicev2Cert | 

            try {
                // update devices_v2_certs
                ArduinoDevicev2Cert result = apiInstance.devicesV2CertsUpdate(cid, id, devicev2Cert);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2CertsApi.devicesV2CertsUpdate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2CertsApi();
$cid = cid_example; // String | The id of the cert
$id = id_example; // String | The id of the device
$devicev2Cert = ; // Devicev2Cert | 

try {
    $result = $api_instance->devicesV2CertsUpdate($cid, $id, $devicev2Cert);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2CertsApi->devicesV2CertsUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2CertsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2CertsApi->new();
my $cid = cid_example; # String | The id of the cert
my $id = id_example; # String | The id of the device
my $devicev2Cert = WWW::OPenAPIClient::Object::Devicev2Cert->new(); # Devicev2Cert | 

eval {
    my $result = $api_instance->devicesV2CertsUpdate(cid => $cid, id => $id, devicev2Cert => $devicev2Cert);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2CertsApi->devicesV2CertsUpdate: $@\n";
}
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)
extern crate DevicesV2CertsApi;

pub fn main() {
    let cid = cid_example; // String
    let id = id_example; // String
    let devicev2Cert = ; // Devicev2Cert

    let mut context = DevicesV2CertsApi::Context::default();
    let result = client.devicesV2CertsUpdate(cid, id, devicev2Cert, &context).wait();

    println!("{:?}", result);
}

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


DevicesV2Ota

devicesV2OtaSend

send devices_v2_ota

Send a binary url to a device


/v2/devices/{id}/ota

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/ota" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2OtaApi;

import java.io.File;
import java.util.*;

public class DevicesV2OtaApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2OtaApi apiInstance = new DevicesV2OtaApi();
        String id = id_example; // String | The id of the device
        Devicev2Otabinaryurl devicev2Otabinaryurl = ; // Devicev2Otabinaryurl | 

        try {
            apiInstance.devicesV2OtaSend(id, devicev2Otabinaryurl);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2OtaApi#devicesV2OtaSend");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Devicev2Otabinaryurl devicev2Otabinaryurl = new Devicev2Otabinaryurl(); // Devicev2Otabinaryurl | 

try {
    final result = await api_instance.devicesV2OtaSend(id, devicev2Otabinaryurl);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2OtaSend: $e\n');
}

import org.openapitools.client.api.DevicesV2OtaApi;

public class DevicesV2OtaApiExample {
    public static void main(String[] args) {
        DevicesV2OtaApi apiInstance = new DevicesV2OtaApi();
        String id = id_example; // String | The id of the device
        Devicev2Otabinaryurl devicev2Otabinaryurl = ; // Devicev2Otabinaryurl | 

        try {
            apiInstance.devicesV2OtaSend(id, devicev2Otabinaryurl);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2OtaApi#devicesV2OtaSend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2OtaApi *apiInstance = [[DevicesV2OtaApi alloc] init];
String *id = id_example; // The id of the device (default to null)
Devicev2Otabinaryurl *devicev2Otabinaryurl = ; // 

// send devices_v2_ota
[apiInstance devicesV2OtaSendWith:id
    devicev2Otabinaryurl:devicev2Otabinaryurl
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2OtaApi()
var id = id_example; // {String} The id of the device
var devicev2Otabinaryurl = ; // {Devicev2Otabinaryurl} 
api.devicesV2OtaSend(id, devicev2Otabinaryurl).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2OtaSendExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2OtaApi();
            var id = id_example;  // String | The id of the device (default to null)
            var devicev2Otabinaryurl = new Devicev2Otabinaryurl(); // Devicev2Otabinaryurl | 

            try {
                // send devices_v2_ota
                apiInstance.devicesV2OtaSend(id, devicev2Otabinaryurl);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2OtaApi.devicesV2OtaSend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2OtaApi();
$id = id_example; // String | The id of the device
$devicev2Otabinaryurl = ; // Devicev2Otabinaryurl | 

try {
    $api_instance->devicesV2OtaSend($id, $devicev2Otabinaryurl);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2OtaApi->devicesV2OtaSend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2OtaApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2OtaApi->new();
my $id = id_example; # String | The id of the device
my $devicev2Otabinaryurl = WWW::OPenAPIClient::Object::Devicev2Otabinaryurl->new(); # Devicev2Otabinaryurl | 

eval {
    $api_instance->devicesV2OtaSend(id => $id, devicev2Otabinaryurl => $devicev2Otabinaryurl);
};
if ($@) {
    warn "Exception when calling DevicesV2OtaApi->devicesV2OtaSend: $@\n";
}
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.DevicesV2OtaApi()
id = id_example # String | The id of the device (default to null)
devicev2Otabinaryurl =  # Devicev2Otabinaryurl | 

try:
    # send devices_v2_ota
    api_instance.devices_v2_ota_send(id, devicev2Otabinaryurl)
except ApiException as e:
    print("Exception when calling DevicesV2OtaApi->devicesV2OtaSend: %s\n" % e)
extern crate DevicesV2OtaApi;

pub fn main() {
    let id = id_example; // String
    let devicev2Otabinaryurl = ; // Devicev2Otabinaryurl

    let mut context = DevicesV2OtaApi::Context::default();
    let result = client.devicesV2OtaSend(id, devicev2Otabinaryurl, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


devicesV2OtaUpload

upload devices_v2_ota

Upload a binary and send it to a device


/v2/devices/{id}/ota

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: multipart/form-data" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/ota"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2OtaApi;

import java.io.File;
import java.util.*;

public class DevicesV2OtaApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2OtaApi apiInstance = new DevicesV2OtaApi();
        String id = id_example; // String | The id of the device
        File otaFile = BINARY_DATA_HERE; // File | OTA file
        Boolean async = true; // Boolean | If false, wait for the full OTA process, until it gets a result from the device
        Integer expireInMins = 56; // Integer | Binary expire time in minutes, default 10 mins

        try {
            apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2OtaApi#devicesV2OtaUpload");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final File otaFile = new File(); // File | OTA file
final Boolean async = new Boolean(); // Boolean | If false, wait for the full OTA process, until it gets a result from the device
final Integer expireInMins = new Integer(); // Integer | Binary expire time in minutes, default 10 mins

try {
    final result = await api_instance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2OtaUpload: $e\n');
}

import org.openapitools.client.api.DevicesV2OtaApi;

public class DevicesV2OtaApiExample {
    public static void main(String[] args) {
        DevicesV2OtaApi apiInstance = new DevicesV2OtaApi();
        String id = id_example; // String | The id of the device
        File otaFile = BINARY_DATA_HERE; // File | OTA file
        Boolean async = true; // Boolean | If false, wait for the full OTA process, until it gets a result from the device
        Integer expireInMins = 56; // Integer | Binary expire time in minutes, default 10 mins

        try {
            apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2OtaApi#devicesV2OtaUpload");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2OtaApi *apiInstance = [[DevicesV2OtaApi alloc] init];
String *id = id_example; // The id of the device (default to null)
File *otaFile = BINARY_DATA_HERE; // OTA file (default to null)
Boolean *async = true; // If false, wait for the full OTA process, until it gets a result from the device (optional) (default to true)
Integer *expireInMins = 56; // Binary expire time in minutes, default 10 mins (optional) (default to 10)

// upload devices_v2_ota
[apiInstance devicesV2OtaUploadWith:id
    otaFile:otaFile
    async:async
    expireInMins:expireInMins
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2OtaApi()
var id = id_example; // {String} The id of the device
var otaFile = BINARY_DATA_HERE; // {File} OTA file
var opts = {
  'async': true, // {Boolean} If false, wait for the full OTA process, until it gets a result from the device
  'expireInMins': 56 // {Integer} Binary expire time in minutes, default 10 mins
};
api.devicesV2OtaUpload(id, otaFile, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2OtaUploadExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2OtaApi();
            var id = id_example;  // String | The id of the device (default to null)
            var otaFile = BINARY_DATA_HERE;  // File | OTA file (default to null)
            var async = true;  // Boolean | If false, wait for the full OTA process, until it gets a result from the device (optional)  (default to true)
            var expireInMins = 56;  // Integer | Binary expire time in minutes, default 10 mins (optional)  (default to 10)

            try {
                // upload devices_v2_ota
                apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2OtaApi.devicesV2OtaUpload: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2OtaApi();
$id = id_example; // String | The id of the device
$otaFile = BINARY_DATA_HERE; // File | OTA file
$async = true; // Boolean | If false, wait for the full OTA process, until it gets a result from the device
$expireInMins = 56; // Integer | Binary expire time in minutes, default 10 mins

try {
    $api_instance->devicesV2OtaUpload($id, $otaFile, $async, $expireInMins);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2OtaApi->devicesV2OtaUpload: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2OtaApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2OtaApi->new();
my $id = id_example; # String | The id of the device
my $otaFile = BINARY_DATA_HERE; # File | OTA file
my $async = true; # Boolean | If false, wait for the full OTA process, until it gets a result from the device
my $expireInMins = 56; # Integer | Binary expire time in minutes, default 10 mins

eval {
    $api_instance->devicesV2OtaUpload(id => $id, otaFile => $otaFile, async => $async, expireInMins => $expireInMins);
};
if ($@) {
    warn "Exception when calling DevicesV2OtaApi->devicesV2OtaUpload: $@\n";
}
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.DevicesV2OtaApi()
id = id_example # String | The id of the device (default to null)
otaFile = BINARY_DATA_HERE # File | OTA file (default to null)
async = true # Boolean | If false, wait for the full OTA process, until it gets a result from the device (optional) (default to true)
expireInMins = 56 # Integer | Binary expire time in minutes, default 10 mins (optional) (default to 10)

try:
    # upload devices_v2_ota
    api_instance.devices_v2_ota_upload(id, otaFile, async=async, expireInMins=expireInMins)
except ApiException as e:
    print("Exception when calling DevicesV2OtaApi->devicesV2OtaUpload: %s\n" % e)
extern crate DevicesV2OtaApi;

pub fn main() {
    let id = id_example; // String
    let otaFile = BINARY_DATA_HERE; // File
    let async = true; // Boolean
    let expireInMins = 56; // Integer

    let mut context = DevicesV2OtaApi::Context::default();
    let result = client.devicesV2OtaUpload(id, otaFile, async, expireInMins, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the device
Required
Form parameters
Name Description
async
Boolean
If false, wait for the full OTA process, until it gets a result from the device
expire_in_mins
Integer
Binary expire time in minutes, default 10 mins
ota_file*
File (binary)
OTA file
Required

Responses


DevicesV2Pass

devicesV2PassCheck

check devices_v2_pass

Check if the password matches.


/v2/devices/{id}/pass

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass" \
 -d '{
  "password" : "password"
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2PassApi;

import java.io.File;
import java.util.*;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        CheckDevicesV2PassPayload checkDevicesV2PassPayload = ; // CheckDevicesV2PassPayload | 

        try {
            apiInstance.devicesV2PassCheck(id, checkDevicesV2PassPayload);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassCheck");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final CheckDevicesV2PassPayload checkDevicesV2PassPayload = new CheckDevicesV2PassPayload(); // CheckDevicesV2PassPayload | 

try {
    final result = await api_instance.devicesV2PassCheck(id, checkDevicesV2PassPayload);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2PassCheck: $e\n');
}

import org.openapitools.client.api.DevicesV2PassApi;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        CheckDevicesV2PassPayload checkDevicesV2PassPayload = ; // CheckDevicesV2PassPayload | 

        try {
            apiInstance.devicesV2PassCheck(id, checkDevicesV2PassPayload);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassCheck");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2PassApi *apiInstance = [[DevicesV2PassApi alloc] init];
String *id = id_example; // The id of the device (default to null)
CheckDevicesV2PassPayload *checkDevicesV2PassPayload = ; // 

// check devices_v2_pass
[apiInstance devicesV2PassCheckWith:id
    checkDevicesV2PassPayload:checkDevicesV2PassPayload
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2PassCheckExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2PassApi();
            var id = id_example;  // String | The id of the device (default to null)
            var checkDevicesV2PassPayload = new CheckDevicesV2PassPayload(); // CheckDevicesV2PassPayload | 

            try {
                // check devices_v2_pass
                apiInstance.devicesV2PassCheck(id, checkDevicesV2PassPayload);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2PassApi.devicesV2PassCheck: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2PassApi();
$id = id_example; // String | The id of the device
$checkDevicesV2PassPayload = ; // CheckDevicesV2PassPayload | 

try {
    $api_instance->devicesV2PassCheck($id, $checkDevicesV2PassPayload);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2PassApi->devicesV2PassCheck: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2PassApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2PassApi->new();
my $id = id_example; # String | The id of the device
my $checkDevicesV2PassPayload = WWW::OPenAPIClient::Object::CheckDevicesV2PassPayload->new(); # CheckDevicesV2PassPayload | 

eval {
    $api_instance->devicesV2PassCheck(id => $id, checkDevicesV2PassPayload => $checkDevicesV2PassPayload);
};
if ($@) {
    warn "Exception when calling DevicesV2PassApi->devicesV2PassCheck: $@\n";
}
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)
extern crate DevicesV2PassApi;

pub fn main() {
    let id = id_example; // String
    let checkDevicesV2PassPayload = ; // CheckDevicesV2PassPayload

    let mut context = DevicesV2PassApi::Context::default();
    let result = client.devicesV2PassCheck(id, checkDevicesV2PassPayload, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2PassApi;

import java.io.File;
import java.util.*;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device

        try {
            apiInstance.devicesV2PassDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device

try {
    final result = await api_instance.devicesV2PassDelete(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2PassDelete: $e\n');
}

import org.openapitools.client.api.DevicesV2PassApi;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device

        try {
            apiInstance.devicesV2PassDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2PassApi *apiInstance = [[DevicesV2PassApi alloc] init];
String *id = id_example; // The id of the device (default to null)

// delete devices_v2_pass
[apiInstance devicesV2PassDeleteWith:id
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2PassDeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2PassApi();
            var id = id_example;  // String | The id of the device (default to null)

            try {
                // delete devices_v2_pass
                apiInstance.devicesV2PassDelete(id);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2PassApi.devicesV2PassDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2PassApi();
$id = id_example; // String | The id of the device

try {
    $api_instance->devicesV2PassDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2PassApi->devicesV2PassDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2PassApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2PassApi->new();
my $id = id_example; # String | The id of the device

eval {
    $api_instance->devicesV2PassDelete(id => $id);
};
if ($@) {
    warn "Exception when calling DevicesV2PassApi->devicesV2PassDelete: $@\n";
}
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)
extern crate DevicesV2PassApi;

pub fn main() {
    let id = id_example; // String

    let mut context = DevicesV2PassApi::Context::default();
    let result = client.devicesV2PassDelete(id, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.pass+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass?suggested_password=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2PassApi;

import java.io.File;
import java.util.*;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        Boolean suggestedPassword = true; // Boolean | If true, return a suggested password

        try {
            ArduinoDevicev2Pass result = apiInstance.devicesV2PassGet(id, suggestedPassword);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Boolean suggestedPassword = new Boolean(); // Boolean | If true, return a suggested password

try {
    final result = await api_instance.devicesV2PassGet(id, suggestedPassword);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2PassGet: $e\n');
}

import org.openapitools.client.api.DevicesV2PassApi;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        Boolean suggestedPassword = true; // Boolean | If true, return a suggested password

        try {
            ArduinoDevicev2Pass result = apiInstance.devicesV2PassGet(id, suggestedPassword);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2PassApi *apiInstance = [[DevicesV2PassApi alloc] init];
String *id = id_example; // The id of the device (default to null)
Boolean *suggestedPassword = true; // If true, return a suggested password (optional) (default to false)

// get devices_v2_pass
[apiInstance devicesV2PassGetWith:id
    suggestedPassword:suggestedPassword
              completionHandler: ^(ArduinoDevicev2Pass output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2PassGetExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2PassApi();
            var id = id_example;  // String | The id of the device (default to null)
            var suggestedPassword = true;  // Boolean | If true, return a suggested password (optional)  (default to false)

            try {
                // get devices_v2_pass
                ArduinoDevicev2Pass result = apiInstance.devicesV2PassGet(id, suggestedPassword);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2PassApi.devicesV2PassGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2PassApi();
$id = id_example; // String | The id of the device
$suggestedPassword = true; // Boolean | If true, return a suggested password

try {
    $result = $api_instance->devicesV2PassGet($id, $suggestedPassword);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2PassApi->devicesV2PassGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2PassApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2PassApi->new();
my $id = id_example; # String | The id of the device
my $suggestedPassword = true; # Boolean | If true, return a suggested password

eval {
    my $result = $api_instance->devicesV2PassGet(id => $id, suggestedPassword => $suggestedPassword);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2PassApi->devicesV2PassGet: $@\n";
}
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 false)

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)
extern crate DevicesV2PassApi;

pub fn main() {
    let id = id_example; // String
    let suggestedPassword = true; // Boolean

    let mut context = DevicesV2PassApi::Context::default();
    let result = client.devicesV2PassGet(id, suggestedPassword, &context).wait();

    println!("{:?}", result);
}

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 \
 \
 -H "Accept: application/vnd.arduino.devicev2.pass+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2PassApi;

import java.io.File;
import java.util.*;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        Devicev2Pass devicev2Pass = ; // Devicev2Pass | 

        try {
            ArduinoDevicev2Pass result = apiInstance.devicesV2PassSet(id, devicev2Pass);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassSet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Devicev2Pass devicev2Pass = new Devicev2Pass(); // Devicev2Pass | 

try {
    final result = await api_instance.devicesV2PassSet(id, devicev2Pass);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2PassSet: $e\n');
}

import org.openapitools.client.api.DevicesV2PassApi;

public class DevicesV2PassApiExample {
    public static void main(String[] args) {
        DevicesV2PassApi apiInstance = new DevicesV2PassApi();
        String id = id_example; // String | The id of the device
        Devicev2Pass devicev2Pass = ; // Devicev2Pass | 

        try {
            ArduinoDevicev2Pass result = apiInstance.devicesV2PassSet(id, devicev2Pass);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2PassApi#devicesV2PassSet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2PassApi *apiInstance = [[DevicesV2PassApi alloc] init];
String *id = id_example; // The id of the device (default to null)
Devicev2Pass *devicev2Pass = ; // 

// set devices_v2_pass
[apiInstance devicesV2PassSetWith:id
    devicev2Pass:devicev2Pass
              completionHandler: ^(ArduinoDevicev2Pass output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2PassSetExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2PassApi();
            var id = id_example;  // String | The id of the device (default to null)
            var devicev2Pass = new Devicev2Pass(); // Devicev2Pass | 

            try {
                // set devices_v2_pass
                ArduinoDevicev2Pass result = apiInstance.devicesV2PassSet(id, devicev2Pass);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2PassApi.devicesV2PassSet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2PassApi();
$id = id_example; // String | The id of the device
$devicev2Pass = ; // Devicev2Pass | 

try {
    $result = $api_instance->devicesV2PassSet($id, $devicev2Pass);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2PassApi->devicesV2PassSet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2PassApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2PassApi->new();
my $id = id_example; # String | The id of the device
my $devicev2Pass = WWW::OPenAPIClient::Object::Devicev2Pass->new(); # Devicev2Pass | 

eval {
    my $result = $api_instance->devicesV2PassSet(id => $id, devicev2Pass => $devicev2Pass);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2PassApi->devicesV2PassSet: $@\n";
}
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)
extern crate DevicesV2PassApi;

pub fn main() {
    let id = id_example; // String
    let devicev2Pass = ; // Devicev2Pass

    let mut context = DevicesV2PassApi::Context::default();
    let result = client.devicesV2PassSet(id, devicev2Pass, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


DevicesV2Tags

devicesV2TagsDelete

delete devices_v2_tags

Delete a tag associated to the device given its key.


/v2/devices/{id}/tags/{key}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/tags/{key}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2TagsApi;

import java.io.File;
import java.util.*;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device
        String key = key_example; // String | The key of the tag

        try {
            apiInstance.devicesV2TagsDelete(id, key);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final String key = new String(); // String | The key of the tag

try {
    final result = await api_instance.devicesV2TagsDelete(id, key);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2TagsDelete: $e\n');
}

import org.openapitools.client.api.DevicesV2TagsApi;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device
        String key = key_example; // String | The key of the tag

        try {
            apiInstance.devicesV2TagsDelete(id, key);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2TagsApi *apiInstance = [[DevicesV2TagsApi alloc] init];
String *id = id_example; // The id of the device (default to null)
String *key = key_example; // The key of the tag (default to null)

// delete devices_v2_tags
[apiInstance devicesV2TagsDeleteWith:id
    key:key
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2TagsApi()
var id = id_example; // {String} The id of the device
var key = key_example; // {String} The key of the tag
api.devicesV2TagsDelete(id, key).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2TagsDeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2TagsApi();
            var id = id_example;  // String | The id of the device (default to null)
            var key = key_example;  // String | The key of the tag (default to null)

            try {
                // delete devices_v2_tags
                apiInstance.devicesV2TagsDelete(id, key);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2TagsApi.devicesV2TagsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2TagsApi();
$id = id_example; // String | The id of the device
$key = key_example; // String | The key of the tag

try {
    $api_instance->devicesV2TagsDelete($id, $key);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2TagsApi->devicesV2TagsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2TagsApi->new();
my $id = id_example; # String | The id of the device
my $key = key_example; # String | The key of the tag

eval {
    $api_instance->devicesV2TagsDelete(id => $id, key => $key);
};
if ($@) {
    warn "Exception when calling DevicesV2TagsApi->devicesV2TagsDelete: $@\n";
}
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.DevicesV2TagsApi()
id = id_example # String | The id of the device (default to null)
key = key_example # String | The key of the tag (default to null)

try:
    # delete devices_v2_tags
    api_instance.devices_v2_tags_delete(id, key)
except ApiException as e:
    print("Exception when calling DevicesV2TagsApi->devicesV2TagsDelete: %s\n" % e)
extern crate DevicesV2TagsApi;

pub fn main() {
    let id = id_example; // String
    let key = key_example; // String

    let mut context = DevicesV2TagsApi::Context::default();
    let result = client.devicesV2TagsDelete(id, key, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


devicesV2TagsList

list devices_v2_tags

List tags associated to the device.


/v2/devices/{id}/tags

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.tags+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/tags"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2TagsApi;

import java.io.File;
import java.util.*;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device

        try {
            ArduinoTags result = apiInstance.devicesV2TagsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsList");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device

try {
    final result = await api_instance.devicesV2TagsList(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2TagsList: $e\n');
}

import org.openapitools.client.api.DevicesV2TagsApi;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device

        try {
            ArduinoTags result = apiInstance.devicesV2TagsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2TagsApi *apiInstance = [[DevicesV2TagsApi alloc] init];
String *id = id_example; // The id of the device (default to null)

// list devices_v2_tags
[apiInstance devicesV2TagsListWith:id
              completionHandler: ^(ArduinoTags output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

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

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2TagsListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2TagsApi();
            var id = id_example;  // String | The id of the device (default to null)

            try {
                // list devices_v2_tags
                ArduinoTags result = apiInstance.devicesV2TagsList(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2TagsApi.devicesV2TagsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2TagsApi();
$id = id_example; // String | The id of the device

try {
    $result = $api_instance->devicesV2TagsList($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2TagsApi->devicesV2TagsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2TagsApi->new();
my $id = id_example; # String | The id of the device

eval {
    my $result = $api_instance->devicesV2TagsList(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2TagsApi->devicesV2TagsList: $@\n";
}
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.DevicesV2TagsApi()
id = id_example # String | The id of the device (default to null)

try:
    # list devices_v2_tags
    api_response = api_instance.devices_v2_tags_list(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesV2TagsApi->devicesV2TagsList: %s\n" % e)
extern crate DevicesV2TagsApi;

pub fn main() {
    let id = id_example; // String

    let mut context = DevicesV2TagsApi::Context::default();
    let result = client.devicesV2TagsList(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


devicesV2TagsUpsert

upsert devices_v2_tags

Creates or updates a tag associated to the device.


/v2/devices/{id}/tags

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/tags" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DevicesV2TagsApi;

import java.io.File;
import java.util.*;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device
        Tag tag = ; // Tag | 

        try {
            apiInstance.devicesV2TagsUpsert(id, tag);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsUpsert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the device
final Tag tag = new Tag(); // Tag | 

try {
    final result = await api_instance.devicesV2TagsUpsert(id, tag);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2TagsUpsert: $e\n');
}

import org.openapitools.client.api.DevicesV2TagsApi;

public class DevicesV2TagsApiExample {
    public static void main(String[] args) {
        DevicesV2TagsApi apiInstance = new DevicesV2TagsApi();
        String id = id_example; // String | The id of the device
        Tag tag = ; // Tag | 

        try {
            apiInstance.devicesV2TagsUpsert(id, tag);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2TagsApi#devicesV2TagsUpsert");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
DevicesV2TagsApi *apiInstance = [[DevicesV2TagsApi alloc] init];
String *id = id_example; // The id of the device (default to null)
Tag *tag = ; // 

// upsert devices_v2_tags
[apiInstance devicesV2TagsUpsertWith:id
    tag:tag
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.DevicesV2TagsApi()
var id = id_example; // {String} The id of the device
var tag = ; // {Tag} 
api.devicesV2TagsUpsert(id, tag).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class devicesV2TagsUpsertExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new DevicesV2TagsApi();
            var id = id_example;  // String | The id of the device (default to null)
            var tag = new Tag(); // Tag | 

            try {
                // upsert devices_v2_tags
                apiInstance.devicesV2TagsUpsert(id, tag);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2TagsApi.devicesV2TagsUpsert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DevicesV2TagsApi();
$id = id_example; // String | The id of the device
$tag = ; // Tag | 

try {
    $api_instance->devicesV2TagsUpsert($id, $tag);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2TagsApi->devicesV2TagsUpsert: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DevicesV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DevicesV2TagsApi->new();
my $id = id_example; # String | The id of the device
my $tag = WWW::OPenAPIClient::Object::Tag->new(); # Tag | 

eval {
    $api_instance->devicesV2TagsUpsert(id => $id, tag => $tag);
};
if ($@) {
    warn "Exception when calling DevicesV2TagsApi->devicesV2TagsUpsert: $@\n";
}
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.DevicesV2TagsApi()
id = id_example # String | The id of the device (default to null)
tag =  # Tag | 

try:
    # upsert devices_v2_tags
    api_instance.devices_v2_tags_upsert(id, tag)
except ApiException as e:
    print("Exception when calling DevicesV2TagsApi->devicesV2TagsUpsert: %s\n" % e)
extern crate DevicesV2TagsApi;

pub fn main() {
    let id = id_example; // String
    let tag = ; // Tag

    let mut context = DevicesV2TagsApi::Context::default();
    let result = client.devicesV2TagsUpsert(id, tag, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


LoraDevicesV1

loraDevicesV1Create

create lora_devices_v1

Create a new lora device. Its info are saved on our database, and on the lora provider network. Creates a device_v2 automatically


/v1/lora-devices/

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/vnd.arduino.loradevicev1+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v1/lora-devices/" \
 -d '{
  "app" : "app",
  "app_key" : "app_key",
  "serial" : "serial",
  "user_id" : "user_id",
  "eui" : "eui",
  "frequency_plan" : "EU_863_870_TTN",
  "name" : "name",
  "app_eui" : "app_eui",
  "type" : "lora-device"
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LoraDevicesV1Api;

import java.io.File;
import java.util.*;

public class LoraDevicesV1ApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        LoraDevicesV1Api apiInstance = new LoraDevicesV1Api();
        CreateLoraDevicesV1Payload createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoLoradevicev1 result = apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoraDevicesV1Api#loraDevicesV1Create");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateLoraDevicesV1Payload createLoraDevicesV1Payload = new CreateLoraDevicesV1Payload(); // CreateLoraDevicesV1Payload | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->loraDevicesV1Create: $e\n');
}

import org.openapitools.client.api.LoraDevicesV1Api;

public class LoraDevicesV1ApiExample {
    public static void main(String[] args) {
        LoraDevicesV1Api apiInstance = new LoraDevicesV1Api();
        CreateLoraDevicesV1Payload createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoLoradevicev1 result = apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoraDevicesV1Api#loraDevicesV1Create");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
LoraDevicesV1Api *apiInstance = [[LoraDevicesV1Api alloc] init];
CreateLoraDevicesV1Payload *createLoraDevicesV1Payload = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create lora_devices_v1
[apiInstance loraDevicesV1CreateWith:createLoraDevicesV1Payload
    xOrganization:xOrganization
              completionHandler: ^(ArduinoLoradevicev1 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ArduinoIotClient = require('@arduino/arduino-iot-client');

// Create an instance of the API class
var api = new ArduinoIotClient.LoraDevicesV1Api()
var createLoraDevicesV1Payload = ; // {CreateLoraDevicesV1Payload} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.loraDevicesV1Create(createLoraDevicesV1Payload, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class loraDevicesV1CreateExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new LoraDevicesV1Api();
            var createLoraDevicesV1Payload = new CreateLoraDevicesV1Payload(); // CreateLoraDevicesV1Payload | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create lora_devices_v1
                ArduinoLoradevicev1 result = apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LoraDevicesV1Api.loraDevicesV1Create: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LoraDevicesV1Api();
$createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->loraDevicesV1Create($createLoraDevicesV1Payload, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoraDevicesV1Api->loraDevicesV1Create: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LoraDevicesV1Api;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LoraDevicesV1Api->new();
my $createLoraDevicesV1Payload = WWW::OPenAPIClient::Object::CreateLoraDevicesV1Payload->new(); # CreateLoraDevicesV1Payload | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->loraDevicesV1Create(createLoraDevicesV1Payload => $createLoraDevicesV1Payload, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoraDevicesV1Api->loraDevicesV1Create: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.LoraDevicesV1Api()
createLoraDevicesV1Payload =  # CreateLoraDevicesV1Payload | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # create lora_devices_v1
    api_response = api_instance.lora_devices_v1_create(createLoraDevicesV1Payload, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoraDevicesV1Api->loraDevicesV1Create: %s\n" % e)
extern crate LoraDevicesV1Api;

pub fn main() {
    let createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload
    let xOrganization = xOrganization_example; // String

    let mut context = LoraDevicesV1Api::Context::default();
    let result = client.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
createLoraDevicesV1Payload *

Responses


LoraFreqPlanV1

loraFreqPlanV1List

list lora_freq_plan_v1

List the lora frequency plans supported


/v1/lora-freq-plans/

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/vnd.arduino.lorafreqplansv1+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/lora-freq-plans/"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.LoraFreqPlanV1Api;

import java.io.File;
import java.util.*;

public class LoraFreqPlanV1ApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        LoraFreqPlanV1Api apiInstance = new LoraFreqPlanV1Api();

        try {
            ArduinoLorafreqplansv1 result = apiInstance.loraFreqPlanV1List();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoraFreqPlanV1Api#loraFreqPlanV1List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.loraFreqPlanV1List();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->loraFreqPlanV1List: $e\n');
}

import org.openapitools.client.api.LoraFreqPlanV1Api;

public class LoraFreqPlanV1ApiExample {
    public static void main(String[] args) {
        LoraFreqPlanV1Api apiInstance = new LoraFreqPlanV1Api();

        try {
            ArduinoLorafreqplansv1 result = apiInstance.loraFreqPlanV1List();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoraFreqPlanV1Api#loraFreqPlanV1List");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
LoraFreqPlanV1Api *apiInstance = [[LoraFreqPlanV1Api alloc] init];

// list lora_freq_plan_v1
[apiInstance loraFreqPlanV1ListWithCompletionHandler: 
              ^(ArduinoLorafreqplansv1 output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ArduinoIotClient = require('@arduino/arduino-iot-client');

// Create an instance of the API class
var api = new ArduinoIotClient.LoraFreqPlanV1Api()api.loraFreqPlanV1List().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class loraFreqPlanV1ListExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new LoraFreqPlanV1Api();

            try {
                // list lora_freq_plan_v1
                ArduinoLorafreqplansv1 result = apiInstance.loraFreqPlanV1List();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling LoraFreqPlanV1Api.loraFreqPlanV1List: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\LoraFreqPlanV1Api();

try {
    $result = $api_instance->loraFreqPlanV1List();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LoraFreqPlanV1Api->loraFreqPlanV1List: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::LoraFreqPlanV1Api;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::LoraFreqPlanV1Api->new();

eval {
    my $result = $api_instance->loraFreqPlanV1List();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoraFreqPlanV1Api->loraFreqPlanV1List: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.LoraFreqPlanV1Api()

try:
    # list lora_freq_plan_v1
    api_response = api_instance.lora_freq_plan_v1_list()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoraFreqPlanV1Api->loraFreqPlanV1List: %s\n" % e)
extern crate LoraFreqPlanV1Api;

pub fn main() {

    let mut context = LoraFreqPlanV1Api::Context::default();
    let result = client.loraFreqPlanV1List(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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 \
 \
 -H "Accept: application/vnd.arduino.property+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        Property property = ; // Property | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Create(id, property, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Create");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final Property property = new Property(); // Property | 
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Create(id, property, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Create: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        Property property = ; // Property | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Create(id, property, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Create");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
Property *property = ; // 
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// create properties_v2
[apiInstance propertiesV2CreateWith:id
    property:property
    xOrganization:xOrganization
              completionHandler: ^(ArduinoProperty output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

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

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2CreateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var property = new Property(); // Property | 
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // create properties_v2
                ArduinoProperty result = apiInstance.propertiesV2Create(id, property, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Create: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$property = ; // Property | 
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $result = $api_instance->propertiesV2Create($id, $property, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Create: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $property = WWW::OPenAPIClient::Object::Property->new(); # Property | 
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    my $result = $api_instance->propertiesV2Create(id => $id, property => $property, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Create: $@\n";
}
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 | 
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let property = ; // Property
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Create(id, property, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}?force=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Boolean force = true; // Boolean | If true, hard delete the property
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            apiInstance.propertiesV2Delete(id, pid, force, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Delete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String pid = new String(); // String | The id of the property
final Boolean force = new Boolean(); // Boolean | If true, hard delete the property
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Delete(id, pid, force, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Delete: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Boolean force = true; // Boolean | If true, hard delete the property
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            apiInstance.propertiesV2Delete(id, pid, force, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Delete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *pid = pid_example; // The id of the property (default to null)
Boolean *force = true; // If true, hard delete the property (optional) (default to false)
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// delete properties_v2
[apiInstance propertiesV2DeleteWith:id
    pid:pid
    force:force
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2Delete(id, pid, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2DeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var pid = pid_example;  // String | The id of the property (default to null)
            var force = true;  // Boolean | If true, hard delete the property (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // delete properties_v2
                apiInstance.propertiesV2Delete(id, pid, force, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$pid = pid_example; // String | The id of the property
$force = true; // Boolean | If true, hard delete the property
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $api_instance->propertiesV2Delete($id, $pid, $force, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $pid = pid_example; # String | The id of the property
my $force = true; # Boolean | If true, hard delete the property
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    $api_instance->propertiesV2Delete(id => $id, pid => $pid, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Delete: $@\n";
}
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 false)
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Delete(id, pid, force, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
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 \
 \
 -H "Accept: application/vnd.arduino.property+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties?show_deleted=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            array[ArduinoProperty] result = apiInstance.propertiesV2List(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted properties
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2List(id, showDeleted, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2List: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            array[ArduinoProperty] result = apiInstance.propertiesV2List(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2List");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted properties (optional) (default to false)
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// list properties_v2
[apiInstance propertiesV2ListWith:id
    showDeleted:showDeleted
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoProperty] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2List(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2ListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted properties (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // list properties_v2
                array[ArduinoProperty] result = apiInstance.propertiesV2List(id, showDeleted, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2List: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$showDeleted = true; // Boolean | If true, shows the soft deleted properties
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $result = $api_instance->propertiesV2List($id, $showDeleted, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2List: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $showDeleted = true; # Boolean | If true, shows the soft deleted properties
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    my $result = $api_instance->propertiesV2List(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2List: $@\n";
}
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 false)
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let showDeleted = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2List(id, showDeleted, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
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 \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}/publish" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        PropertyValue propertyValue = ; // PropertyValue | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            apiInstance.propertiesV2Publish(id, pid, propertyValue, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Publish");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String pid = new String(); // String | The id of the property
final PropertyValue propertyValue = new PropertyValue(); // PropertyValue | 
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Publish(id, pid, propertyValue, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Publish: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        PropertyValue propertyValue = ; // PropertyValue | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            apiInstance.propertiesV2Publish(id, pid, propertyValue, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Publish");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *pid = pid_example; // The id of the property (default to null)
PropertyValue *propertyValue = ; // 
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// publish properties_v2
[apiInstance propertiesV2PublishWith:id
    pid:pid
    propertyValue:propertyValue
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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} 
var opts = {
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2Publish(id, pid, propertyValue, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2PublishExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var pid = pid_example;  // String | The id of the property (default to null)
            var propertyValue = new PropertyValue(); // PropertyValue | 
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // publish properties_v2
                apiInstance.propertiesV2Publish(id, pid, propertyValue, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Publish: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$pid = pid_example; // String | The id of the property
$propertyValue = ; // PropertyValue | 
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $api_instance->propertiesV2Publish($id, $pid, $propertyValue, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Publish: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $pid = pid_example; # String | The id of the property
my $propertyValue = WWW::OPenAPIClient::Object::PropertyValue->new(); # PropertyValue | 
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    $api_instance->propertiesV2Publish(id => $id, pid => $pid, propertyValue => $propertyValue, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Publish: $@\n";
}
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 | 
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let propertyValue = ; // PropertyValue
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Publish(id, pid, propertyValue, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
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 \
 \
 -H "Accept: application/vnd.arduino.property+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}?show_deleted=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Show(id, pid, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Show");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String pid = new String(); // String | The id of the property
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted properties
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Show(id, pid, showDeleted, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Show: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted properties
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Show(id, pid, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Show");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *pid = pid_example; // The id of the property (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted properties (optional) (default to false)
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// show properties_v2
[apiInstance propertiesV2ShowWith:id
    pid:pid
    showDeleted:showDeleted
    xOrganization:xOrganization
              completionHandler: ^(ArduinoProperty output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2Show(id, pid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2ShowExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var pid = pid_example;  // String | The id of the property (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted properties (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // show properties_v2
                ArduinoProperty result = apiInstance.propertiesV2Show(id, pid, showDeleted, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Show: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$pid = pid_example; // String | The id of the property
$showDeleted = true; // Boolean | If true, shows the soft deleted properties
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $result = $api_instance->propertiesV2Show($id, $pid, $showDeleted, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Show: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $pid = pid_example; # String | The id of the property
my $showDeleted = true; # Boolean | If true, shows the soft deleted properties
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    my $result = $api_instance->propertiesV2Show(id => $id, pid => $pid, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Show: $@\n";
}
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 false)
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let showDeleted = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Show(id, pid, showDeleted, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


propertiesV2Timeseries

timeseries properties_v2

Get numerical property's historic data binned on a specified time interval (note: the total number of data points should NOT be greater than 1000 otherwise the result will be truncated)


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

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.timeseriesmedia+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}/timeseries?aggregation=aggregation_example&desc=true&from=from_example&interval=56&to=to_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | ID of a numerical property
        String aggregation = aggregation_example; // String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
        Boolean desc = true; // Boolean | Whether data's ordering (by time) should be descending
        String from = from_example; // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
        Integer interval = 56; // Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
        String to = to_example; // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoTimeseriesmedia result = apiInstance.propertiesV2Timeseries(id, pid, aggregation, desc, from, interval, to, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Timeseries");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String pid = new String(); // String | ID of a numerical property
final String aggregation = new String(); // String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
final Boolean desc = new Boolean(); // Boolean | Whether data's ordering (by time) should be descending
final String from = new String(); // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
final Integer interval = new Integer(); // Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
final String to = new String(); // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Timeseries(id, pid, aggregation, desc, from, interval, to, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Timeseries: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | ID of a numerical property
        String aggregation = aggregation_example; // String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
        Boolean desc = true; // Boolean | Whether data's ordering (by time) should be descending
        String from = from_example; // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
        Integer interval = 56; // Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
        String to = to_example; // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoTimeseriesmedia result = apiInstance.propertiesV2Timeseries(id, pid, aggregation, desc, from, interval, to, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Timeseries");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *pid = pid_example; // ID of a numerical property (default to null)
String *aggregation = aggregation_example; // Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5 (optional) (default to null)
Boolean *desc = true; // Whether data's ordering (by time) should be descending (optional) (default to false)
String *from = from_example; // Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional) (default to null)
Integer *interval = 56; // Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) (optional) (default to null)
String *to = to_example; // Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional) (default to null)
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// timeseries properties_v2
[apiInstance propertiesV2TimeseriesWith:id
    pid:pid
    aggregation:aggregation
    desc:desc
    from:from
    interval:interval
    to:to
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTimeseriesmedia output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.PropertiesV2Api()
var id = id_example; // {String} The id of the thing
var pid = pid_example; // {String} ID of a numerical property
var opts = {
  'aggregation': aggregation_example, // {String} Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
  'desc': true, // {Boolean} Whether data's ordering (by time) should be descending
  'from': from_example, // {String} Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
  'interval': 56, // {Integer} Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
  'to': to_example, // {String} Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2Timeseries(id, pid, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2TimeseriesExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var pid = pid_example;  // String | ID of a numerical property (default to null)
            var aggregation = aggregation_example;  // String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5 (optional)  (default to null)
            var desc = true;  // Boolean | Whether data's ordering (by time) should be descending (optional)  (default to false)
            var from = from_example;  // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional)  (default to null)
            var interval = 56;  // Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) (optional)  (default to null)
            var to = to_example;  // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // timeseries properties_v2
                ArduinoTimeseriesmedia result = apiInstance.propertiesV2Timeseries(id, pid, aggregation, desc, from, interval, to, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Timeseries: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$pid = pid_example; // String | ID of a numerical property
$aggregation = aggregation_example; // String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
$desc = true; // Boolean | Whether data's ordering (by time) should be descending
$from = from_example; // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
$interval = 56; // Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
$to = to_example; // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $result = $api_instance->propertiesV2Timeseries($id, $pid, $aggregation, $desc, $from, $interval, $to, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Timeseries: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $pid = pid_example; # String | ID of a numerical property
my $aggregation = aggregation_example; # String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
my $desc = true; # Boolean | Whether data's ordering (by time) should be descending
my $from = from_example; # String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
my $interval = 56; # Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
my $to = to_example; # String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    my $result = $api_instance->propertiesV2Timeseries(id => $id, pid => $pid, aggregation => $aggregation, desc => $desc, from => $from, interval => $interval, to => $to, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Timeseries: $@\n";
}
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 | ID of a numerical property (default to null)
aggregation = aggregation_example # String | Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5 (optional) (default to null)
desc = true # Boolean | Whether data's ordering (by time) should be descending (optional) (default to false)
from = from_example # String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional) (default to null)
interval = 56 # Integer | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) (optional) (default to null)
to = to_example # String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) (optional) (default to null)
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

try:
    # timeseries properties_v2
    api_response = api_instance.properties_v2_timeseries(id, pid, aggregation=aggregation, desc=desc, from=from, interval=interval, to=to, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PropertiesV2Api->propertiesV2Timeseries: %s\n" % e)
extern crate PropertiesV2Api;

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let aggregation = aggregation_example; // String
    let desc = true; // Boolean
    let from = from_example; // String
    let interval = 56; // Integer
    let to = to_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Timeseries(id, pid, aggregation, desc, from, interval, to, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
ID of a numerical property
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
Query parameters
Name Description
aggregation
String
Samples aggregation statistic. Supported aggregations AVG|MAX|MIN|COUNT|SUM|PCT_99|PCT_95|PCT_90|PCT_75|PCT_50|PCT_15|PCT_5
desc
Boolean
Whether data's ordering (by time) should be descending
from
String
Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)
interval
Integer
Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response)
to
String
Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z)

Responses


propertiesV2Update

update properties_v2

Updates a property associated to a thing


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

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.property+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertiesV2Api;

import java.io.File;
import java.util.*;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Property property = ; // Property | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Update(id, pid, property, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Update");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String pid = new String(); // String | The id of the property
final Property property = new Property(); // Property | 
final String xOrganization = new String(); // String | The id of the organization

try {
    final result = await api_instance.propertiesV2Update(id, pid, property, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->propertiesV2Update: $e\n');
}

import org.openapitools.client.api.PropertiesV2Api;

public class PropertiesV2ApiExample {
    public static void main(String[] args) {
        PropertiesV2Api apiInstance = new PropertiesV2Api();
        String id = id_example; // String | The id of the thing
        String pid = pid_example; // String | The id of the property
        Property property = ; // Property | 
        String xOrganization = xOrganization_example; // String | The id of the organization

        try {
            ArduinoProperty result = apiInstance.propertiesV2Update(id, pid, property, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertiesV2Api#propertiesV2Update");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
PropertiesV2Api *apiInstance = [[PropertiesV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *pid = pid_example; // The id of the property (default to null)
Property *property = ; // 
String *xOrganization = xOrganization_example; // The id of the organization (optional) (default to null)

// update properties_v2
[apiInstance propertiesV2UpdateWith:id
    pid:pid
    property:property
    xOrganization:xOrganization
              completionHandler: ^(ArduinoProperty output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
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} 
var opts = {
  'xOrganization': xOrganization_example // {String} The id of the organization
};
api.propertiesV2Update(id, pid, property, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class propertiesV2UpdateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PropertiesV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var pid = pid_example;  // String | The id of the property (default to null)
            var property = new Property(); // Property | 
            var xOrganization = xOrganization_example;  // String | The id of the organization (optional)  (default to null)

            try {
                // update properties_v2
                ArduinoProperty result = apiInstance.propertiesV2Update(id, pid, property, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertiesV2Api.propertiesV2Update: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PropertiesV2Api();
$id = id_example; // String | The id of the thing
$pid = pid_example; // String | The id of the property
$property = ; // Property | 
$xOrganization = xOrganization_example; // String | The id of the organization

try {
    $result = $api_instance->propertiesV2Update($id, $pid, $property, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PropertiesV2Api->propertiesV2Update: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PropertiesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PropertiesV2Api->new();
my $id = id_example; # String | The id of the thing
my $pid = pid_example; # String | The id of the property
my $property = WWW::OPenAPIClient::Object::Property->new(); # Property | 
my $xOrganization = xOrganization_example; # String | The id of the organization

eval {
    my $result = $api_instance->propertiesV2Update(id => $id, pid => $pid, property => $property, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Update: $@\n";
}
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 | 
xOrganization = xOrganization_example # String | The id of the organization (optional) (default to null)

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

pub fn main() {
    let id = id_example; // String
    let pid = pid_example; // String
    let property = ; // Property
    let xOrganization = xOrganization_example; // String

    let mut context = PropertiesV2Api::Context::default();
    let result = client.propertiesV2Update(id, pid, property, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
pid*
String
The id of the property
Required
Header parameters
Name Description
X-Organization
String
The id of the organization
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 aggregated samples


/v2/series/batch_query

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.series.batch+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/series/batch_query" \
 -d '{
  "resp_version" : 1,
  "requests" : [ {
    "q" : "q",
    "series_limit" : 6,
    "aggregation" : "AVG",
    "from" : "2000-01-23T04:56:07.000+00:00",
    "interval" : 0,
    "to" : "2000-01-23T04:56:07.000+00:00"
  }, {
    "q" : "q",
    "series_limit" : 6,
    "aggregation" : "AVG",
    "from" : "2000-01-23T04:56:07.000+00:00",
    "interval" : 0,
    "to" : "2000-01-23T04:56:07.000+00:00"
  } ]
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SeriesV2Api;

import java.io.File;
import java.util.*;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchQueryRequestsMediaV1 batchQueryRequestsMediaV1 = ; // BatchQueryRequestsMediaV1 | 

        try {
            ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQuery");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final BatchQueryRequestsMediaV1 batchQueryRequestsMediaV1 = new BatchQueryRequestsMediaV1(); // BatchQueryRequestsMediaV1 | 

try {
    final result = await api_instance.seriesV2BatchQuery(batchQueryRequestsMediaV1);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->seriesV2BatchQuery: $e\n');
}

import org.openapitools.client.api.SeriesV2Api;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchQueryRequestsMediaV1 batchQueryRequestsMediaV1 = ; // BatchQueryRequestsMediaV1 | 

        try {
            ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQuery");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
SeriesV2Api *apiInstance = [[SeriesV2Api alloc] init];
BatchQueryRequestsMediaV1 *batchQueryRequestsMediaV1 = ; // 

// batch_query series_v2
[apiInstance seriesV2BatchQueryWith:batchQueryRequestsMediaV1
              completionHandler: ^(ArduinoSeriesBatch output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.SeriesV2Api()
var batchQueryRequestsMediaV1 = ; // {BatchQueryRequestsMediaV1} 
api.seriesV2BatchQuery(batchQueryRequestsMediaV1).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class seriesV2BatchQueryExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SeriesV2Api();
            var batchQueryRequestsMediaV1 = new BatchQueryRequestsMediaV1(); // BatchQueryRequestsMediaV1 | 

            try {
                // batch_query series_v2
                ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SeriesV2Api.seriesV2BatchQuery: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SeriesV2Api();
$batchQueryRequestsMediaV1 = ; // BatchQueryRequestsMediaV1 | 

try {
    $result = $api_instance->seriesV2BatchQuery($batchQueryRequestsMediaV1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SeriesV2Api->seriesV2BatchQuery: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SeriesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SeriesV2Api->new();
my $batchQueryRequestsMediaV1 = WWW::OPenAPIClient::Object::BatchQueryRequestsMediaV1->new(); # BatchQueryRequestsMediaV1 | 

eval {
    my $result = $api_instance->seriesV2BatchQuery(batchQueryRequestsMediaV1 => $batchQueryRequestsMediaV1);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQuery: $@\n";
}
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.SeriesV2Api()
batchQueryRequestsMediaV1 =  # BatchQueryRequestsMediaV1 | 

try:
    # batch_query series_v2
    api_response = api_instance.series_v2_batch_query(batchQueryRequestsMediaV1)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2BatchQuery: %s\n" % e)
extern crate SeriesV2Api;

pub fn main() {
    let batchQueryRequestsMediaV1 = ; // BatchQueryRequestsMediaV1

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQuery(batchQueryRequestsMediaV1, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
batchQueryRequestsMediaV1 *

Responses


seriesV2BatchQueryRaw

batch_query_raw series_v2

Returns the batch of time-series raw samples


/v2/series/batch_query_raw

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.series.raw.batch+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/series/batch_query_raw" \
 -d '{
  "resp_version" : 6,
  "requests" : [ {
    "q" : "q",
    "series_limit" : 0,
    "from" : "2000-01-23T04:56:07.000+00:00",
    "sort" : "DESC",
    "to" : "2000-01-23T04:56:07.000+00:00"
  }, {
    "q" : "q",
    "series_limit" : 0,
    "from" : "2000-01-23T04:56:07.000+00:00",
    "sort" : "DESC",
    "to" : "2000-01-23T04:56:07.000+00:00"
  } ]
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SeriesV2Api;

import java.io.File;
import java.util.*;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchQueryRawRequestsMediaV1 batchQueryRawRequestsMediaV1 = ; // BatchQueryRawRequestsMediaV1 | 

        try {
            ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQueryRaw");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final BatchQueryRawRequestsMediaV1 batchQueryRawRequestsMediaV1 = new BatchQueryRawRequestsMediaV1(); // BatchQueryRawRequestsMediaV1 | 

try {
    final result = await api_instance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->seriesV2BatchQueryRaw: $e\n');
}

import org.openapitools.client.api.SeriesV2Api;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchQueryRawRequestsMediaV1 batchQueryRawRequestsMediaV1 = ; // BatchQueryRawRequestsMediaV1 | 

        try {
            ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQueryRaw");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
SeriesV2Api *apiInstance = [[SeriesV2Api alloc] init];
BatchQueryRawRequestsMediaV1 *batchQueryRawRequestsMediaV1 = ; // 

// batch_query_raw series_v2
[apiInstance seriesV2BatchQueryRawWith:batchQueryRawRequestsMediaV1
              completionHandler: ^(ArduinoSeriesRawBatch output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.SeriesV2Api()
var batchQueryRawRequestsMediaV1 = ; // {BatchQueryRawRequestsMediaV1} 
api.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class seriesV2BatchQueryRawExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SeriesV2Api();
            var batchQueryRawRequestsMediaV1 = new BatchQueryRawRequestsMediaV1(); // BatchQueryRawRequestsMediaV1 | 

            try {
                // batch_query_raw series_v2
                ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SeriesV2Api.seriesV2BatchQueryRaw: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SeriesV2Api();
$batchQueryRawRequestsMediaV1 = ; // BatchQueryRawRequestsMediaV1 | 

try {
    $result = $api_instance->seriesV2BatchQueryRaw($batchQueryRawRequestsMediaV1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SeriesV2Api->seriesV2BatchQueryRaw: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SeriesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SeriesV2Api->new();
my $batchQueryRawRequestsMediaV1 = WWW::OPenAPIClient::Object::BatchQueryRawRequestsMediaV1->new(); # BatchQueryRawRequestsMediaV1 | 

eval {
    my $result = $api_instance->seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1 => $batchQueryRawRequestsMediaV1);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQueryRaw: $@\n";
}
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.SeriesV2Api()
batchQueryRawRequestsMediaV1 =  # BatchQueryRawRequestsMediaV1 | 

try:
    # batch_query_raw series_v2
    api_response = api_instance.series_v2_batch_query_raw(batchQueryRawRequestsMediaV1)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2BatchQueryRaw: %s\n" % e)
extern crate SeriesV2Api;

pub fn main() {
    let batchQueryRawRequestsMediaV1 = ; // BatchQueryRawRequestsMediaV1

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
batchQueryRawRequestsMediaV1 *

Responses


seriesV2BatchQueryRawLastValue

batch_query_raw_last_value series_v2

Returns the batch of time-series data raw


/v2/series/batch_query_raw/lastvalue

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.series.raw.batch.lastvalue+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/series/batch_query_raw/lastvalue" \
 -d '{
  "requests" : [ {
    "thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "property_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
  }, {
    "thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "property_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
  } ]
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SeriesV2Api;

import java.io.File;
import java.util.*;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchLastValueRequestsMediaV1 batchLastValueRequestsMediaV1 = ; // BatchLastValueRequestsMediaV1 | 

        try {
            ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQueryRawLastValue");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final BatchLastValueRequestsMediaV1 batchLastValueRequestsMediaV1 = new BatchLastValueRequestsMediaV1(); // BatchLastValueRequestsMediaV1 | 

try {
    final result = await api_instance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->seriesV2BatchQueryRawLastValue: $e\n');
}

import org.openapitools.client.api.SeriesV2Api;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchLastValueRequestsMediaV1 batchLastValueRequestsMediaV1 = ; // BatchLastValueRequestsMediaV1 | 

        try {
            ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQueryRawLastValue");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
SeriesV2Api *apiInstance = [[SeriesV2Api alloc] init];
BatchLastValueRequestsMediaV1 *batchLastValueRequestsMediaV1 = ; // 

// batch_query_raw_last_value series_v2
[apiInstance seriesV2BatchQueryRawLastValueWith:batchLastValueRequestsMediaV1
              completionHandler: ^(ArduinoSeriesRawBatchLastvalue output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.SeriesV2Api()
var batchLastValueRequestsMediaV1 = ; // {BatchLastValueRequestsMediaV1} 
api.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class seriesV2BatchQueryRawLastValueExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SeriesV2Api();
            var batchLastValueRequestsMediaV1 = new BatchLastValueRequestsMediaV1(); // BatchLastValueRequestsMediaV1 | 

            try {
                // batch_query_raw_last_value series_v2
                ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SeriesV2Api.seriesV2BatchQueryRawLastValue: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SeriesV2Api();
$batchLastValueRequestsMediaV1 = ; // BatchLastValueRequestsMediaV1 | 

try {
    $result = $api_instance->seriesV2BatchQueryRawLastValue($batchLastValueRequestsMediaV1);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SeriesV2Api->seriesV2BatchQueryRawLastValue: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SeriesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SeriesV2Api->new();
my $batchLastValueRequestsMediaV1 = WWW::OPenAPIClient::Object::BatchLastValueRequestsMediaV1->new(); # BatchLastValueRequestsMediaV1 | 

eval {
    my $result = $api_instance->seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1 => $batchLastValueRequestsMediaV1);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQueryRawLastValue: $@\n";
}
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.SeriesV2Api()
batchLastValueRequestsMediaV1 =  # BatchLastValueRequestsMediaV1 | 

try:
    # batch_query_raw_last_value series_v2
    api_response = api_instance.series_v2_batch_query_raw_last_value(batchLastValueRequestsMediaV1)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2BatchQueryRawLastValue: %s\n" % e)
extern crate SeriesV2Api;

pub fn main() {
    let batchLastValueRequestsMediaV1 = ; // BatchLastValueRequestsMediaV1

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
batchLastValueRequestsMediaV1 *

Responses


seriesV2HistoricData

historic_data series_v2

Request sending of historical data of properties by email


/v2/series/historic_data

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/series/historic_data" \
 -d '{
  "from" : "2000-01-23T04:56:07.000+00:00",
  "to" : "2000-01-23T04:56:07.000+00:00",
  "properties" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ]
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SeriesV2Api;

import java.io.File;
import java.util.*;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        SeriesV2Api apiInstance = new SeriesV2Api();
        HistoricDataRequest historicDataRequest = ; // HistoricDataRequest | 

        try {
            apiInstance.seriesV2HistoricData(historicDataRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2HistoricData");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final HistoricDataRequest historicDataRequest = new HistoricDataRequest(); // HistoricDataRequest | 

try {
    final result = await api_instance.seriesV2HistoricData(historicDataRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->seriesV2HistoricData: $e\n');
}

import org.openapitools.client.api.SeriesV2Api;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        SeriesV2Api apiInstance = new SeriesV2Api();
        HistoricDataRequest historicDataRequest = ; // HistoricDataRequest | 

        try {
            apiInstance.seriesV2HistoricData(historicDataRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2HistoricData");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
SeriesV2Api *apiInstance = [[SeriesV2Api alloc] init];
HistoricDataRequest *historicDataRequest = ; // 

// historic_data series_v2
[apiInstance seriesV2HistoricDataWith:historicDataRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.SeriesV2Api()
var historicDataRequest = ; // {HistoricDataRequest} 
api.seriesV2HistoricData(historicDataRequest).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class seriesV2HistoricDataExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SeriesV2Api();
            var historicDataRequest = new HistoricDataRequest(); // HistoricDataRequest | 

            try {
                // historic_data series_v2
                apiInstance.seriesV2HistoricData(historicDataRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling SeriesV2Api.seriesV2HistoricData: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SeriesV2Api();
$historicDataRequest = ; // HistoricDataRequest | 

try {
    $api_instance->seriesV2HistoricData($historicDataRequest);
} catch (Exception $e) {
    echo 'Exception when calling SeriesV2Api->seriesV2HistoricData: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SeriesV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SeriesV2Api->new();
my $historicDataRequest = WWW::OPenAPIClient::Object::HistoricDataRequest->new(); # HistoricDataRequest | 

eval {
    $api_instance->seriesV2HistoricData(historicDataRequest => $historicDataRequest);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2HistoricData: $@\n";
}
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.SeriesV2Api()
historicDataRequest =  # HistoricDataRequest | 

try:
    # historic_data series_v2
    api_instance.series_v2_historic_data(historicDataRequest)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2HistoricData: %s\n" % e)
extern crate SeriesV2Api;

pub fn main() {
    let historicDataRequest = ; // HistoricDataRequest

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2HistoricData(historicDataRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
historicDataRequest *

Responses


ThingsV2

thingsV2Clone

clone things_v2

Clone a given thing


/v2/things/{id}/clone

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/clone" \
 -d '{
  "name" : "name",
  "include_tags" : true
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingClone thingClone = ; // ThingClone | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Clone(id, thingClone, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Clone");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final ThingClone thingClone = new ThingClone(); // ThingClone | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Clone(id, thingClone, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Clone: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingClone thingClone = ; // ThingClone | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Clone(id, thingClone, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Clone");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
ThingClone *thingClone = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// clone things_v2
[apiInstance thingsV2CloneWith:id
    thingClone:thingClone
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var thingClone = ; // {ThingClone} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Clone(id, thingClone, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2CloneExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var thingClone = new ThingClone(); // ThingClone | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // clone things_v2
                ArduinoThing result = apiInstance.thingsV2Clone(id, thingClone, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Clone: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$thingClone = ; // ThingClone | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2Clone($id, $thingClone, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Clone: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $thingClone = WWW::OPenAPIClient::Object::ThingClone->new(); # ThingClone | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2Clone(id => $id, thingClone => $thingClone, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Clone: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
thingClone =  # ThingClone | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # clone things_v2
    api_response = api_instance.things_v2_clone(id, thingClone, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Clone: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let thingClone = ; // ThingClone
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Clone(id, thingClone, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
thingClone *

Payload to clone a new thing from an existing one

Responses


thingsV2Create

create things_v2

Creates a new thing associated to the user


/v2/things

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things?force=true" \
 -d '{
  "device_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "timezone" : "America/New_York",
  "webhook_uri" : "webhook_uri",
  "name" : "name",
  "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "webhook_active" : true,
  "properties" : [ {
    "min_value" : 6.027456183070403,
    "update_strategy" : "ON_CHANGE",
    "name" : "name",
    "update_parameter" : 5.962133916683182,
    "permission" : "READ_ONLY",
    "persist" : true,
    "tag" : 1,
    "variable_name" : "variable_name",
    "type" : "ANALOG",
    "max_value" : 0.8008281904610115
  }, {
    "min_value" : 6.027456183070403,
    "update_strategy" : "ON_CHANGE",
    "name" : "name",
    "update_parameter" : 5.962133916683182,
    "permission" : "READ_ONLY",
    "persist" : true,
    "tag" : 1,
    "variable_name" : "variable_name",
    "type" : "ANALOG",
    "max_value" : 0.8008281904610115
  } ],
  "tags" : [ {
    "value" : "value",
    "key" : "key"
  }, {
    "value" : "value",
    "key" : "key"
  } ]
}' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        ThingCreate thingCreate = ; // ThingCreate | 
        Boolean force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Create(thingCreate, force, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Create");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ThingCreate thingCreate = new ThingCreate(); // ThingCreate | 
final Boolean force = new Boolean(); // Boolean | If true, detach device from the other thing, and attach to this thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Create(thingCreate, force, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Create: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        ThingCreate thingCreate = ; // ThingCreate | 
        Boolean force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Create(thingCreate, force, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Create");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
ThingCreate *thingCreate = ; // 
Boolean *force = true; // If true, detach device from the other thing, and attach to this thing (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create things_v2
[apiInstance thingsV2CreateWith:thingCreate
    force:force
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var thingCreate = ; // {ThingCreate} 
var opts = {
  'force': true, // {Boolean} If true, detach device from the other thing, and attach to this thing
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Create(thingCreate, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2CreateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var thingCreate = new ThingCreate(); // ThingCreate | 
            var force = true;  // Boolean | If true, detach device from the other thing, and attach to this thing (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create things_v2
                ArduinoThing result = apiInstance.thingsV2Create(thingCreate, force, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Create: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$thingCreate = ; // ThingCreate | 
$force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2Create($thingCreate, $force, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Create: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $thingCreate = WWW::OPenAPIClient::Object::ThingCreate->new(); # ThingCreate | 
my $force = true; # Boolean | If true, detach device from the other thing, and attach to this thing
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2Create(thingCreate => $thingCreate, force => $force, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Create: $@\n";
}
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.ThingsV2Api()
thingCreate =  # ThingCreate | 
force = true # Boolean | If true, detach device from the other thing, and attach to this thing (optional) (default to false)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # create things_v2
    api_response = api_instance.things_v2_create(thingCreate, force=force, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Create: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let thingCreate = ; // ThingCreate
    let force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Create(thingCreate, force, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
thingCreate *

Payload to create a new thing

Query parameters
Name Description
force
Boolean
If true, detach device from the other thing, and attach to this thing

Responses


thingsV2CreateSketch

createSketch things_v2

Creates a new sketch thing associated to the thing


/v2/things/{id}/sketch

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/sketch" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingSketch thingSketch = ; // ThingSketch | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2CreateSketch(id, thingSketch, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2CreateSketch");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final ThingSketch thingSketch = new ThingSketch(); // ThingSketch | 
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2CreateSketch(id, thingSketch, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2CreateSketch: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingSketch thingSketch = ; // ThingSketch | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2CreateSketch(id, thingSketch, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2CreateSketch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
ThingSketch *thingSketch = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// createSketch things_v2
[apiInstance thingsV2CreateSketchWith:id
    thingSketch:thingSketch
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var thingSketch = ; // {ThingSketch} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2CreateSketch(id, thingSketch, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2CreateSketchExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var thingSketch = new ThingSketch(); // ThingSketch | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // createSketch things_v2
                ArduinoThing result = apiInstance.thingsV2CreateSketch(id, thingSketch, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2CreateSketch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$thingSketch = ; // ThingSketch | 
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2CreateSketch($id, $thingSketch, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2CreateSketch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $thingSketch = WWW::OPenAPIClient::Object::ThingSketch->new(); # ThingSketch | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2CreateSketch(id => $id, thingSketch => $thingSketch, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2CreateSketch: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
thingSketch =  # ThingSketch | 
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # createSketch things_v2
    api_response = api_instance.things_v2_create_sketch(id, thingSketch, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2CreateSketch: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let thingSketch = ; // ThingSketch
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2CreateSketch(id, thingSketch, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
thingSketch *

ThingSketchPayload describes a sketch of a thing

Responses


thingsV2Delete

delete things_v2

Removes a thing associated to the user


/v2/things/{id}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/things/{id}?force=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        Boolean force = true; // Boolean | If true, hard delete the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.thingsV2Delete(id, force, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Delete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final Boolean force = new Boolean(); // Boolean | If true, hard delete the thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Delete(id, force, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Delete: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        Boolean force = true; // Boolean | If true, hard delete the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.thingsV2Delete(id, force, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Delete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
Boolean *force = true; // If true, hard delete the thing (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// delete things_v2
[apiInstance thingsV2DeleteWith:id
    force:force
    xOrganization:xOrganization
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var opts = {
  'force': true, // {Boolean} If true, hard delete the thing
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Delete(id, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2DeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var force = true;  // Boolean | If true, hard delete the thing (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // delete things_v2
                apiInstance.thingsV2Delete(id, force, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$force = true; // Boolean | If true, hard delete the thing
$xOrganization = xOrganization_example; // String | 

try {
    $api_instance->thingsV2Delete($id, $force, $xOrganization);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $force = true; # Boolean | If true, hard delete the thing
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->thingsV2Delete(id => $id, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Delete: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
force = true # Boolean | If true, hard delete the thing (optional) (default to false)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # delete things_v2
    api_instance.things_v2_delete(id, force=force, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Delete: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Delete(id, force, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
force
Boolean
If true, hard delete the thing

Responses


thingsV2DeleteSketch

deleteSketch things_v2


/v2/things/{id}/sketch

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/sketch"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2DeleteSketch(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2DeleteSketch");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2DeleteSketch(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2DeleteSketch: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2DeleteSketch(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2DeleteSketch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// deleteSketch things_v2
[apiInstance thingsV2DeleteSketchWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2DeleteSketch(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2DeleteSketchExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // deleteSketch things_v2
                ArduinoThing result = apiInstance.thingsV2DeleteSketch(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2DeleteSketch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2DeleteSketch($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2DeleteSketch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2DeleteSketch(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2DeleteSketch: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # deleteSketch things_v2
    api_response = api_instance.things_v2_delete_sketch(id, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2DeleteSketch: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2DeleteSketch(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String

Responses


thingsV2List

list things_v2

Returns the list of things associated to the user


/v2/things

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.thing+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things?across_user_ids=true&device_id=deviceId_example&ids=&show_deleted=true&show_properties=true&tags="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        Boolean acrossUserIds = true; // Boolean | If true, returns all the things
        String deviceId = deviceId_example; // String | The id of the device you want to filter
        array[String] ids = ; // array[String] | Filter only the desired things
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted things
        Boolean showProperties = true; // Boolean | If true, returns things with their properties, and last values
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoThing] result = apiInstance.thingsV2List(acrossUserIds, deviceId, ids, showDeleted, showProperties, tags, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean acrossUserIds = new Boolean(); // Boolean | If true, returns all the things
final String deviceId = new String(); // String | The id of the device you want to filter
final array[String] ids = new array[String](); // array[String] | Filter only the desired things
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted things
final Boolean showProperties = new Boolean(); // Boolean | If true, returns things with their properties, and last values
final array[String] tags = new array[String](); // array[String] | Filter by tags
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2List(acrossUserIds, deviceId, ids, showDeleted, showProperties, tags, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2List: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        Boolean acrossUserIds = true; // Boolean | If true, returns all the things
        String deviceId = deviceId_example; // String | The id of the device you want to filter
        array[String] ids = ; // array[String] | Filter only the desired things
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted things
        Boolean showProperties = true; // Boolean | If true, returns things with their properties, and last values
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoThing] result = apiInstance.thingsV2List(acrossUserIds, deviceId, ids, showDeleted, showProperties, tags, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2List");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
Boolean *acrossUserIds = true; // If true, returns all the things (optional) (default to false)
String *deviceId = deviceId_example; // The id of the device you want to filter (optional) (default to null)
array[String] *ids = ; // Filter only the desired things (optional) (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted things (optional) (default to false)
Boolean *showProperties = true; // If true, returns things with their properties, and last values (optional) (default to false)
array[String] *tags = ; // Filter by tags (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// list things_v2
[apiInstance thingsV2ListWith:acrossUserIds
    deviceId:deviceId
    ids:ids
    showDeleted:showDeleted
    showProperties:showProperties
    tags:tags
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoThing] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var opts = {
  'acrossUserIds': true, // {Boolean} If true, returns all the things
  'deviceId': deviceId_example, // {String} The id of the device you want to filter
  'ids': , // {array[String]} Filter only the desired things
  'showDeleted': true, // {Boolean} If true, shows the soft deleted things
  'showProperties': true, // {Boolean} If true, returns things with their properties, and last values
  'tags': , // {array[String]} Filter by tags
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2List(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2ListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var acrossUserIds = true;  // Boolean | If true, returns all the things (optional)  (default to false)
            var deviceId = deviceId_example;  // String | The id of the device you want to filter (optional)  (default to null)
            var ids = new array[String](); // array[String] | Filter only the desired things (optional)  (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted things (optional)  (default to false)
            var showProperties = true;  // Boolean | If true, returns things with their properties, and last values (optional)  (default to false)
            var tags = new array[String](); // array[String] | Filter by tags (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // list things_v2
                array[ArduinoThing] result = apiInstance.thingsV2List(acrossUserIds, deviceId, ids, showDeleted, showProperties, tags, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2List: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$acrossUserIds = true; // Boolean | If true, returns all the things
$deviceId = deviceId_example; // String | The id of the device you want to filter
$ids = ; // array[String] | Filter only the desired things
$showDeleted = true; // Boolean | If true, shows the soft deleted things
$showProperties = true; // Boolean | If true, returns things with their properties, and last values
$tags = ; // array[String] | Filter by tags
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2List($acrossUserIds, $deviceId, $ids, $showDeleted, $showProperties, $tags, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2List: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $acrossUserIds = true; # Boolean | If true, returns all the things
my $deviceId = deviceId_example; # String | The id of the device you want to filter
my $ids = []; # array[String] | Filter only the desired things
my $showDeleted = true; # Boolean | If true, shows the soft deleted things
my $showProperties = true; # Boolean | If true, returns things with their properties, and last values
my $tags = []; # array[String] | Filter by tags
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2List(acrossUserIds => $acrossUserIds, deviceId => $deviceId, ids => $ids, showDeleted => $showDeleted, showProperties => $showProperties, tags => $tags, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2List: $@\n";
}
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.ThingsV2Api()
acrossUserIds = true # Boolean | If true, returns all the things (optional) (default to false)
deviceId = deviceId_example # String | The id of the device you want to filter (optional) (default to null)
ids =  # array[String] | Filter only the desired things (optional) (default to null)
showDeleted = true # Boolean | If true, shows the soft deleted things (optional) (default to false)
showProperties = true # Boolean | If true, returns things with their properties, and last values (optional) (default to false)
tags =  # array[String] | Filter by tags (optional) (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # list things_v2
    api_response = api_instance.things_v2_list(acrossUserIds=acrossUserIds, deviceId=deviceId, ids=ids, showDeleted=showDeleted, showProperties=showProperties, tags=tags, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2List: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let acrossUserIds = true; // Boolean
    let deviceId = deviceId_example; // String
    let ids = ; // array[String]
    let showDeleted = true; // Boolean
    let showProperties = true; // Boolean
    let tags = ; // array[String]
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2List(acrossUserIds, deviceId, ids, showDeleted, showProperties, tags, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
across_user_ids
Boolean
If true, returns all the things
device_id
String
The id of the device you want to filter
ids
array[String]
Filter only the desired things
show_deleted
Boolean
If true, shows the soft deleted things
show_properties
Boolean
If true, returns things with their properties, and last values
tags
array[String]
Filter by tags

Responses


thingsV2Show

show things_v2

Returns the thing requested by the user


/v2/things/{id}

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}?show_deleted=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Show(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Show");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Show(id, showDeleted, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Show: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Show(id, showDeleted, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Show");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted thing (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// show things_v2
[apiInstance thingsV2ShowWith:id
    showDeleted:showDeleted
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var opts = {
  'showDeleted': true, // {Boolean} If true, shows the soft deleted thing
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Show(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2ShowExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted thing (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // show things_v2
                ArduinoThing result = apiInstance.thingsV2Show(id, showDeleted, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Show: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$showDeleted = true; // Boolean | If true, shows the soft deleted thing
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2Show($id, $showDeleted, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Show: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $showDeleted = true; # Boolean | If true, shows the soft deleted thing
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2Show(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Show: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
showDeleted = true # Boolean | If true, shows the soft deleted thing (optional) (default to false)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # show things_v2
    api_response = api_instance.things_v2_show(id, showDeleted=showDeleted, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Show: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let showDeleted = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Show(id, showDeleted, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


thingsV2Template

template things_v2

Extract template from the given thing


/v2/things/{id}/template

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.thingtemplate+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/template"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThingtemplate result = apiInstance.thingsV2Template(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Template");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Template(id, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Template: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThingtemplate result = apiInstance.thingsV2Template(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Template");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// template things_v2
[apiInstance thingsV2TemplateWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThingtemplate output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Template(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2TemplateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // template things_v2
                ArduinoThingtemplate result = apiInstance.thingsV2Template(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Template: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2Template($id, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Template: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2Template(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Template: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # template things_v2
    api_response = api_instance.things_v2_template(id, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Template: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Template(id, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String

Responses


thingsV2Update

update things_v2

Updates a thing associated to the user


/v2/things/{id}

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}?force=true" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingUpdate thingUpdate = ; // ThingUpdate | 
        Boolean force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Update(id, thingUpdate, force, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Update");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final ThingUpdate thingUpdate = new ThingUpdate(); // ThingUpdate | 
final Boolean force = new Boolean(); // Boolean | If true, detach device from the other thing, and attach to this thing
final String xOrganization = new String(); // String | 

try {
    final result = await api_instance.thingsV2Update(id, thingUpdate, force, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2Update: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        ThingUpdate thingUpdate = ; // ThingUpdate | 
        Boolean force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoThing result = apiInstance.thingsV2Update(id, thingUpdate, force, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2Update");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
ThingUpdate *thingUpdate = ; // 
Boolean *force = true; // If true, detach device from the other thing, and attach to this thing (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// update things_v2
[apiInstance thingsV2UpdateWith:id
    thingUpdate:thingUpdate
    force:force
    xOrganization:xOrganization
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var thingUpdate = ; // {ThingUpdate} 
var opts = {
  'force': true, // {Boolean} If true, detach device from the other thing, and attach to this thing
  'xOrganization': xOrganization_example // {String} 
};
api.thingsV2Update(id, thingUpdate, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2UpdateExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var thingUpdate = new ThingUpdate(); // ThingUpdate | 
            var force = true;  // Boolean | If true, detach device from the other thing, and attach to this thing (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // update things_v2
                ArduinoThing result = apiInstance.thingsV2Update(id, thingUpdate, force, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2Update: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$thingUpdate = ; // ThingUpdate | 
$force = true; // Boolean | If true, detach device from the other thing, and attach to this thing
$xOrganization = xOrganization_example; // String | 

try {
    $result = $api_instance->thingsV2Update($id, $thingUpdate, $force, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2Update: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $thingUpdate = WWW::OPenAPIClient::Object::ThingUpdate->new(); # ThingUpdate | 
my $force = true; # Boolean | If true, detach device from the other thing, and attach to this thing
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->thingsV2Update(id => $id, thingUpdate => $thingUpdate, force => $force, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Update: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
thingUpdate =  # ThingUpdate | 
force = true # Boolean | If true, detach device from the other thing, and attach to this thing (optional) (default to false)
xOrganization = xOrganization_example # String |  (optional) (default to null)

try:
    # update things_v2
    api_response = api_instance.things_v2_update(id, thingUpdate, force=force, xOrganization=xOrganization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2Update: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let thingUpdate = ; // ThingUpdate
    let force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2Update(id, thingUpdate, force, xOrganization, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
thingUpdate *

Payload to update an existing thing

Query parameters
Name Description
force
Boolean
If true, detach device from the other thing, and attach to this thing

Responses


thingsV2UpdateSketch

updateSketch things_v2

Update an existing thing sketch


/v2/things/{id}/sketch/{sketchId}

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.thing+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/sketch/{sketchId}" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2Api;

import java.io.File;
import java.util.*;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String sketchId = sketchId_example; // String | The id of the sketch
        String xOrganization = xOrganization_example; // String | 
        UpdateSketch updateSketch = ; // UpdateSketch | 

        try {
            ArduinoThing result = apiInstance.thingsV2UpdateSketch(id, sketchId, xOrganization, updateSketch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2UpdateSketch");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String sketchId = new String(); // String | The id of the sketch
final String xOrganization = new String(); // String | 
final UpdateSketch updateSketch = new UpdateSketch(); // UpdateSketch | 

try {
    final result = await api_instance.thingsV2UpdateSketch(id, sketchId, xOrganization, updateSketch);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2UpdateSketch: $e\n');
}

import org.openapitools.client.api.ThingsV2Api;

public class ThingsV2ApiExample {
    public static void main(String[] args) {
        ThingsV2Api apiInstance = new ThingsV2Api();
        String id = id_example; // String | The id of the thing
        String sketchId = sketchId_example; // String | The id of the sketch
        String xOrganization = xOrganization_example; // String | 
        UpdateSketch updateSketch = ; // UpdateSketch | 

        try {
            ArduinoThing result = apiInstance.thingsV2UpdateSketch(id, sketchId, xOrganization, updateSketch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2Api#thingsV2UpdateSketch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2Api *apiInstance = [[ThingsV2Api alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *sketchId = sketchId_example; // The id of the sketch (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)
UpdateSketch *updateSketch = ; //  (optional)

// updateSketch things_v2
[apiInstance thingsV2UpdateSketchWith:id
    sketchId:sketchId
    xOrganization:xOrganization
    updateSketch:updateSketch
              completionHandler: ^(ArduinoThing output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2Api()
var id = id_example; // {String} The id of the thing
var sketchId = sketchId_example; // {String} The id of the sketch
var opts = {
  'xOrganization': xOrganization_example, // {String} 
  'updateSketch':  // {UpdateSketch} 
};
api.thingsV2UpdateSketch(id, sketchId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2UpdateSketchExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2Api();
            var id = id_example;  // String | The id of the thing (default to null)
            var sketchId = sketchId_example;  // String | The id of the sketch (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)
            var updateSketch = new UpdateSketch(); // UpdateSketch |  (optional) 

            try {
                // updateSketch things_v2
                ArduinoThing result = apiInstance.thingsV2UpdateSketch(id, sketchId, xOrganization, updateSketch);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2Api.thingsV2UpdateSketch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2Api();
$id = id_example; // String | The id of the thing
$sketchId = sketchId_example; // String | The id of the sketch
$xOrganization = xOrganization_example; // String | 
$updateSketch = ; // UpdateSketch | 

try {
    $result = $api_instance->thingsV2UpdateSketch($id, $sketchId, $xOrganization, $updateSketch);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2Api->thingsV2UpdateSketch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2Api;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2Api->new();
my $id = id_example; # String | The id of the thing
my $sketchId = sketchId_example; # String | The id of the sketch
my $xOrganization = xOrganization_example; # String | 
my $updateSketch = WWW::OPenAPIClient::Object::UpdateSketch->new(); # UpdateSketch | 

eval {
    my $result = $api_instance->thingsV2UpdateSketch(id => $id, sketchId => $sketchId, xOrganization => $xOrganization, updateSketch => $updateSketch);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2UpdateSketch: $@\n";
}
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.ThingsV2Api()
id = id_example # String | The id of the thing (default to null)
sketchId = sketchId_example # String | The id of the sketch (default to null)
xOrganization = xOrganization_example # String |  (optional) (default to null)
updateSketch =  # UpdateSketch |  (optional)

try:
    # updateSketch things_v2
    api_response = api_instance.things_v2_update_sketch(id, sketchId, xOrganization=xOrganization, updateSketch=updateSketch)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2Api->thingsV2UpdateSketch: %s\n" % e)
extern crate ThingsV2Api;

pub fn main() {
    let id = id_example; // String
    let sketchId = sketchId_example; // String
    let xOrganization = xOrganization_example; // String
    let updateSketch = ; // UpdateSketch

    let mut context = ThingsV2Api::Context::default();
    let result = client.thingsV2UpdateSketch(id, sketchId, xOrganization, updateSketch, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
sketchId*
String
The id of the sketch
Required
Header parameters
Name Description
X-Organization
String
Body parameters
Name Description
updateSketch

Responses


ThingsV2Tags

thingsV2TagsDelete

delete things_v2_tags

Delete a tag associated to the thing given its key.


/v2/things/{id}/tags/{key}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v2/things/{id}/tags/{key}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2TagsApi;

import java.io.File;
import java.util.*;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing
        String key = key_example; // String | The key of the tag

        try {
            apiInstance.thingsV2TagsDelete(id, key);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final String key = new String(); // String | The key of the tag

try {
    final result = await api_instance.thingsV2TagsDelete(id, key);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2TagsDelete: $e\n');
}

import org.openapitools.client.api.ThingsV2TagsApi;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing
        String key = key_example; // String | The key of the tag

        try {
            apiInstance.thingsV2TagsDelete(id, key);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2TagsApi *apiInstance = [[ThingsV2TagsApi alloc] init];
String *id = id_example; // The id of the thing (default to null)
String *key = key_example; // The key of the tag (default to null)

// delete things_v2_tags
[apiInstance thingsV2TagsDeleteWith:id
    key:key
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2TagsApi()
var id = id_example; // {String} The id of the thing
var key = key_example; // {String} The key of the tag
api.thingsV2TagsDelete(id, key).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2TagsDeleteExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2TagsApi();
            var id = id_example;  // String | The id of the thing (default to null)
            var key = key_example;  // String | The key of the tag (default to null)

            try {
                // delete things_v2_tags
                apiInstance.thingsV2TagsDelete(id, key);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2TagsApi.thingsV2TagsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2TagsApi();
$id = id_example; // String | The id of the thing
$key = key_example; // String | The key of the tag

try {
    $api_instance->thingsV2TagsDelete($id, $key);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2TagsApi->thingsV2TagsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2TagsApi->new();
my $id = id_example; # String | The id of the thing
my $key = key_example; # String | The key of the tag

eval {
    $api_instance->thingsV2TagsDelete(id => $id, key => $key);
};
if ($@) {
    warn "Exception when calling ThingsV2TagsApi->thingsV2TagsDelete: $@\n";
}
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.ThingsV2TagsApi()
id = id_example # String | The id of the thing (default to null)
key = key_example # String | The key of the tag (default to null)

try:
    # delete things_v2_tags
    api_instance.things_v2_tags_delete(id, key)
except ApiException as e:
    print("Exception when calling ThingsV2TagsApi->thingsV2TagsDelete: %s\n" % e)
extern crate ThingsV2TagsApi;

pub fn main() {
    let id = id_example; // String
    let key = key_example; // String

    let mut context = ThingsV2TagsApi::Context::default();
    let result = client.thingsV2TagsDelete(id, key, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the thing
Required
key*
String
The key of the tag
Required

Responses


thingsV2TagsList

list things_v2_tags

List tags associated to the thing.


/v2/things/{id}/tags

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.tags+json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v2/things/{id}/tags"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2TagsApi;

import java.io.File;
import java.util.*;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing

        try {
            ArduinoTags result = apiInstance.thingsV2TagsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsList");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing

try {
    final result = await api_instance.thingsV2TagsList(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2TagsList: $e\n');
}

import org.openapitools.client.api.ThingsV2TagsApi;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing

        try {
            ArduinoTags result = apiInstance.thingsV2TagsList(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2TagsApi *apiInstance = [[ThingsV2TagsApi alloc] init];
String *id = id_example; // The id of the thing (default to null)

// list things_v2_tags
[apiInstance thingsV2TagsListWith:id
              completionHandler: ^(ArduinoTags output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2TagsApi()
var id = id_example; // {String} The id of the thing
api.thingsV2TagsList(id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2TagsListExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2TagsApi();
            var id = id_example;  // String | The id of the thing (default to null)

            try {
                // list things_v2_tags
                ArduinoTags result = apiInstance.thingsV2TagsList(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2TagsApi.thingsV2TagsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2TagsApi();
$id = id_example; // String | The id of the thing

try {
    $result = $api_instance->thingsV2TagsList($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2TagsApi->thingsV2TagsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2TagsApi->new();
my $id = id_example; # String | The id of the thing

eval {
    my $result = $api_instance->thingsV2TagsList(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2TagsApi->thingsV2TagsList: $@\n";
}
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.ThingsV2TagsApi()
id = id_example # String | The id of the thing (default to null)

try:
    # list things_v2_tags
    api_response = api_instance.things_v2_tags_list(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ThingsV2TagsApi->thingsV2TagsList: %s\n" % e)
extern crate ThingsV2TagsApi;

pub fn main() {
    let id = id_example; // String

    let mut context = ThingsV2TagsApi::Context::default();
    let result = client.thingsV2TagsList(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses


thingsV2TagsUpsert

upsert things_v2_tags

Creates or updates a tag associated to the thing.


/v2/things/{id}/tags

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json,application/x-www-form-urlencoded" \
 "https://api2.arduino.cc/iot/v2/things/{id}/tags" \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ThingsV2TagsApi;

import java.io.File;
import java.util.*;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure OAuth2 access token for authorization: oauth2
        OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
        oauth2.setAccessToken("YOUR ACCESS TOKEN");

        // Create an instance of the API class
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing
        Tag tag = ; // Tag | 

        try {
            apiInstance.thingsV2TagsUpsert(id, tag);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsUpsert");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the thing
final Tag tag = new Tag(); // Tag | 

try {
    final result = await api_instance.thingsV2TagsUpsert(id, tag);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->thingsV2TagsUpsert: $e\n');
}

import org.openapitools.client.api.ThingsV2TagsApi;

public class ThingsV2TagsApiExample {
    public static void main(String[] args) {
        ThingsV2TagsApi apiInstance = new ThingsV2TagsApi();
        String id = id_example; // String | The id of the thing
        Tag tag = ; // Tag | 

        try {
            apiInstance.thingsV2TagsUpsert(id, tag);
        } catch (ApiException e) {
            System.err.println("Exception when calling ThingsV2TagsApi#thingsV2TagsUpsert");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


// Create an instance of the API class
ThingsV2TagsApi *apiInstance = [[ThingsV2TagsApi alloc] init];
String *id = id_example; // The id of the thing (default to null)
Tag *tag = ; // 

// upsert things_v2_tags
[apiInstance thingsV2TagsUpsertWith:id
    tag:tag
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
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";

// Create an instance of the API class
var api = new ArduinoIotClient.ThingsV2TagsApi()
var id = id_example; // {String} The id of the thing
var tag = ; // {Tag} 
api.thingsV2TagsUpsert(id, tag).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;

namespace Example
{
    public class thingsV2TagsUpsertExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new ThingsV2TagsApi();
            var id = id_example;  // String | The id of the thing (default to null)
            var tag = new Tag(); // Tag | 

            try {
                // upsert things_v2_tags
                apiInstance.thingsV2TagsUpsert(id, tag);
            } catch (Exception e) {
                Debug.Print("Exception when calling ThingsV2TagsApi.thingsV2TagsUpsert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ThingsV2TagsApi();
$id = id_example; // String | The id of the thing
$tag = ; // Tag | 

try {
    $api_instance->thingsV2TagsUpsert($id, $tag);
} catch (Exception $e) {
    echo 'Exception when calling ThingsV2TagsApi->thingsV2TagsUpsert: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ThingsV2TagsApi;

# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ThingsV2TagsApi->new();
my $id = id_example; # String | The id of the thing
my $tag = WWW::OPenAPIClient::Object::Tag->new(); # Tag | 

eval {
    $api_instance->thingsV2TagsUpsert(id => $id, tag => $tag);
};
if ($@) {
    warn "Exception when calling ThingsV2TagsApi->thingsV2TagsUpsert: $@\n";
}
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.ThingsV2TagsApi()
id = id_example # String | The id of the thing (default to null)
tag =  # Tag | 

try:
    # upsert things_v2_tags
    api_instance.things_v2_tags_upsert(id, tag)
except ApiException as e:
    print("Exception when calling ThingsV2TagsApi->thingsV2TagsUpsert: %s\n" % e)
extern crate ThingsV2TagsApi;

pub fn main() {
    let id = id_example; // String
    let tag = ; // Tag

    let mut context = ThingsV2TagsApi::Context::default();
    let result = client.thingsV2TagsUpsert(id, tag, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

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

Responses