Arduino IoT Cloud API

DashboardsV2

dashboardsV2Clone

clone dashboards_v2

Clone an existing dashboard


/iot/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" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/clone" \
 -d '{
  "overrides" : [ {
    "old_thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "new_thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
  }, {
    "old_thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "new_thing_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
  } ]
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Clone(id => $id, clone => $clone, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Clone: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
clone =  # Clone object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # clone dashboards_v2
    api_response = apiInstance.dashboards_v2_clone(id, clone, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
clone *

Add overrides used when performing a clone of a dashboard

Responses


dashboardsV2Create

create dashboards_v2

Create a new dashboard


/iot/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" \
 "https://api2.arduino.cc/iot/v2/dashboards" \
 -d '{
  "soft_deleted" : false,
  "name" : "name",
  "cover_image" : "cover_image",
  "widgets" : [ {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  }, {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  } ]
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Create(dashboardv2 => $dashboardv2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
dashboardv2 =  # Dashboardv2 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # create dashboards_v2
    api_response = apiInstance.dashboards_v2_create(dashboardv2, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
dashboardv2 *

Describes a dashboard

Responses


dashboardsV2Delete

delete dashboards_v2

Delete a dashboard


/iot/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}?force=true"
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
        Boolean force = true; // Boolean | If true, hard delete the thing
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.dashboardsV2Delete(id, force, 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 Boolean force = new Boolean(); // Boolean | If true, hard delete the thing
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.dashboardsV2Delete(id, force, 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
        Boolean force = true; // Boolean | If true, hard delete the thing
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.dashboardsV2Delete(id, force, 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)
Boolean *force = true; // If true, hard delete the thing (optional) (default to false)
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// delete dashboards_v2
[apiInstance dashboardsV2DeleteWith: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.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var opts = {
  'force': true, // {Boolean} If true, hard delete the thing
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
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 force = true;  // Boolean | If true, hard delete the thing (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // delete dashboards_v2
                apiInstance.dashboardsV2Delete(id, force, 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
$force = true; // Boolean | If true, hard delete the thing
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $api_instance->dashboardsV2Delete($id, $force, $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 $force = true; # Boolean | If true, hard delete the thing
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    $api_instance->dashboardsV2Delete(id => $id, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
force = true # Boolean object instance | If true, hard delete the thing (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # delete dashboards_v2
    apiInstance.dashboards_v2_delete(id, force=force, 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 force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = DashboardsV2Api::Context::default();
    let result = client.dashboardsV2Delete(id, force, 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
Organization space identifer (optional)
Query parameters
Name Description
force
Boolean
If true, hard delete the thing

Responses


dashboardsV2DeleteShare

deleteShare dashboards_v2

Delete a user the dashboard has been shared with


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->dashboardsV2DeleteShare(id => $id, userId => $userId, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2DeleteShare: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
userId = userId_example # String object instance | The id of the user (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # deleteShare dashboards_v2
    apiInstance.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
Organization space identifer (optional)

Responses



dashboardsV2List

list dashboards_v2

Returns the list of dashboards


/iot/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 | Filter by name of the dashboard. It support like matching.
        String userId = userId_example; // String | Filter by user_id of the dashboard's owner
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        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 | Filter by name of the dashboard. It support like matching.
final String userId = new String(); // String | Filter by user_id of the dashboard's owner
final String xOrganization = new String(); // String | Organization space identifer (optional)

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 | Filter by name of the dashboard. It support like matching.
        String userId = userId_example; // String | Filter by user_id of the dashboard's owner
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        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; // Filter by name of the dashboard. It support like matching. (optional) (default to null)
String *userId = userId_example; // Filter by user_id of the dashboard's owner (optional) (default to null)
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (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} Filter by name of the dashboard. It support like matching.
  'userId': userId_example, // {String} Filter by user_id of the dashboard's owner
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
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 | Filter by name of the dashboard. It support like matching. (optional)  (default to null)
            var userId = userId_example;  // String | Filter by user_id of the dashboard's owner (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (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 | Filter by name of the dashboard. It support like matching.
$userId = userId_example; // String | Filter by user_id of the dashboard's owner
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

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 | Filter by name of the dashboard. It support like matching.
my $userId = userId_example; # String | Filter by user_id of the dashboard's owner
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2List(name => $name, userId => $userId, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
name = name_example # String object instance | Filter by name of the dashboard. It support like matching. (optional) (default to null)
userId = userId_example # String object instance | Filter by user_id of the dashboard's owner (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # list dashboards_v2
    api_response = apiInstance.dashboards_v2_list(name=name, userId=userId, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Query parameters
Name Description
name
String
Filter by name of the dashboard. It support like matching.
user_id
String
Filter by user_id of the dashboard's owner

Responses


dashboardsV2ListShares

listShares dashboards_v2

List of users the dashboard has been shared with


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2ListShares(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2ListShares: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # listShares dashboards_v2
    api_response = apiInstance.dashboards_v2_list_shares(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


dashboardsV2Patch

patch dashboards_v2

Updates an existing dashboard field without overwriting the existing data


/iot/v2/dashboards/{id}

Usage and SDK Samples

curl -X PATCH \
 \
 -H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}" \
 -d '{
  "soft_deleted" : false,
  "name" : "name",
  "cover_image" : "cover_image",
  "widgets" : [ {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  }, {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  } ]
}'
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 | Organization space identifer (optional)

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Patch(id, dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Patch");
            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 | Organization space identifer (optional)

try {
    final result = await api_instance.dashboardsV2Patch(id, dashboardv2, xOrganization);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->dashboardsV2Patch: $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 | Organization space identifer (optional)

        try {
            ArduinoDashboardv2 result = apiInstance.dashboardsV2Patch(id, dashboardv2, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Patch");
            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; // Organization space identifer (optional) (optional) (default to null)

// patch dashboards_v2
[apiInstance dashboardsV2PatchWith: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} Organization space identifer (optional)
};
api.dashboardsV2Patch(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 dashboardsV2PatchExample
    {
        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 | Organization space identifer (optional) (optional)  (default to null)

            try {
                // patch dashboards_v2
                ArduinoDashboardv2 result = apiInstance.dashboardsV2Patch(id, dashboardv2, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Patch: " + 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 | Organization space identifer (optional)

try {
    $result = $api_instance->dashboardsV2Patch($id, $dashboardv2, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DashboardsV2Api->dashboardsV2Patch: ', $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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Patch(id => $id, dashboardv2 => $dashboardv2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Patch: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
dashboardv2 =  # Dashboardv2 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # patch dashboards_v2
    api_response = apiInstance.dashboards_v2_patch(id, dashboardv2, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling DashboardsV2Api->dashboardsV2Patch: %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.dashboardsV2Patch(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
Organization space identifer (optional)
Body parameters
Name Description
dashboardv2 *

Describes a dashboard

Responses


dashboardsV2RequestAccess

requestAccess dashboards_v2

Request access to a dashboard


/iot/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" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/share_request" \
 -d '{
  "message" : "message"
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->dashboardsV2RequestAccess(id => $id, sharerequest => $sharerequest, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2RequestAccess: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
sharerequest =  # Sharerequest object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # requestAccess dashboards_v2
    apiInstance.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
Organization space identifer (optional)
Body parameters
Name Description
sharerequest *

Responses


dashboardsV2Share

share dashboards_v2

Share a dashboard


/iot/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" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}/shares" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->dashboardsV2Share(id => $id, dashboardshare => $dashboardshare, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Share: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
dashboardshare =  # Dashboardshare object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # share dashboards_v2
    apiInstance.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
Organization space identifer (optional)
Body parameters
Name Description
dashboardshare *

Responses


dashboardsV2Show

show dashboards_v2

Show a dashboard by id


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # show dashboards_v2
    api_response = apiInstance.dashboards_v2_show(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


dashboardsV2Template

template dashboards_v2

Get a template of the dashboard


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Template(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Template: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # template dashboards_v2
    api_response = apiInstance.dashboards_v2_template(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


dashboardsV2Update

update dashboards_v2

Updates an existing dashboard


/iot/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" \
 "https://api2.arduino.cc/iot/v2/dashboards/{id}" \
 -d '{
  "soft_deleted" : false,
  "name" : "name",
  "cover_image" : "cover_image",
  "widgets" : [ {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  }, {
    "height_mobile" : 6,
    "y_mobile" : 9,
    "variables" : [ "046b6c7f-0b8a-43b9-b35d-6489e6daee91", "046b6c7f-0b8a-43b9-b35d-6489e6daee91" ],
    "type" : "type",
    "x_mobile" : 2,
    "width_mobile" : 5,
    "name" : "name",
    "options" : {
      "key" : ""
    },
    "width" : 1,
    "x" : 5,
    "y" : 7,
    "id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "height" : 0
  } ]
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->dashboardsV2Update(id => $id, dashboardv2 => $dashboardv2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DashboardsV2Api->dashboardsV2Update: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DashboardsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DashboardsV2Api(client)
id = id_example # String object instance | The id of the dashboard (default to null)
dashboardv2 =  # Dashboardv2 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # update dashboards_v2
    api_response = apiInstance.dashboards_v2_update(id, dashboardv2, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
dashboardv2 *

Describes a dashboard

Responses


DevicesV2

devicesV2Create

create devices_v2

Creates a new device associated to the user.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices" \
 -d '{
  "soft_deleted" : false,
  "connection_type" : "wifi",
  "serial" : "serial",
  "user_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "fqbn" : "fqbn",
  "name" : "name",
  "wifi_fw_version" : "wifi_fw_version",
  "type" : "mkrwifi1010"
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->devicesV2Create(createDevicesV2Payload => $createDevicesV2Payload, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
createDevicesV2Payload =  # CreateDevicesV2Payload object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # create devices_v2
    api_response = apiInstance.devices_v2_create(createDevicesV2Payload, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
createDevicesV2Payload *

DeviceV2 describes a device.

Responses


devicesV2Delete

delete devices_v2

Removes a device associated to the user


/iot/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}?force=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 force = true; // Boolean | If true, hard delete the device
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.devicesV2Delete(id, force, 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 Boolean force = new Boolean(); // Boolean | If true, hard delete the device
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.devicesV2Delete(id, force, 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
        Boolean force = true; // Boolean | If true, hard delete the device
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.devicesV2Delete(id, force, 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)
Boolean *force = true; // If true, hard delete the device (optional) (default to false)
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// delete devices_v2
[apiInstance devicesV2DeleteWith: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.DevicesV2Api()
var id = id_example; // {String} The id of the device
var opts = {
  'force': true, // {Boolean} If true, hard delete the device
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
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 force = true;  // Boolean | If true, hard delete the device (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // delete devices_v2
                apiInstance.devicesV2Delete(id, force, 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
$force = true; // Boolean | If true, hard delete the device
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $api_instance->devicesV2Delete($id, $force, $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 $force = true; # Boolean | If true, hard delete the device
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    $api_instance->devicesV2Delete(id => $id, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
force = true # Boolean object instance | If true, hard delete the device (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # delete devices_v2
    apiInstance.devices_v2_delete(id, force=force, 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 force = true; // Boolean
    let xOrganization = xOrganization_example; // String

    let mut context = DevicesV2Api::Context::default();
    let result = client.devicesV2Delete(id, force, 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
Organization space identifer (optional)
Query parameters
Name Description
force
Boolean
If true, hard delete the device

Responses


devicesV2GetEvents

getEvents devices_v2

GET device events


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
limit = 56 # Integer object instance | The number of events to select (optional) (default to null)
start = start_example # String object instance | The time at which to start selecting events (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # getEvents devices_v2
    api_response = apiInstance.devices_v2_get_events(id, limit=limit, start=start, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->devicesV2GetProperties(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2GetProperties: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted properties (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # getProperties devices_v2
    api_response = apiInstance.devices_v2_get_properties(id, showDeleted=showDeleted, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Query parameters
Name Description
show_deleted
Boolean
If true, shows the soft deleted properties

Responses


devicesV2GetStatusEvents

GetStatusEvents devices_v2

GET connection status events


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
limit = 56 # Integer object instance | The number of events to select (optional) (default to 30)
start = start_example # String object instance | The time at which to start selecting events (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # GetStatusEvents devices_v2
    api_response = apiInstance.devices_v2_get_status_events(id, limit=limit, start=start, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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&show_deleted=true&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
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted devices
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, showDeleted, 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 Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted devices
final array[String] tags = new array[String](); // array[String] | Filter by tags
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.devicesV2List(acrossUserIds, serial, showDeleted, 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
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted devices
        array[String] tags = ; // array[String] | Filter by tags
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, showDeleted, 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)
Boolean *showDeleted = true; // If true, shows the soft deleted devices (optional) (default to false)
array[String] *tags = ; // Filter by tags (optional) (default to null)
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// list devices_v2
[apiInstance devicesV2ListWith:acrossUserIds
    serial:serial
    showDeleted:showDeleted
    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
  'showDeleted': true, // {Boolean} If true, shows the soft deleted devices
  'tags': , // {array[String]} Filter by tags
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
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 showDeleted = true;  // Boolean | If true, shows the soft deleted devices (optional)  (default to false)
            var tags = new array[String](); // array[String] | Filter by tags (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // list devices_v2
                array[ArduinoDevicev2] result = apiInstance.devicesV2List(acrossUserIds, serial, showDeleted, 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
$showDeleted = true; // Boolean | If true, shows the soft deleted devices
$tags = ; // array[String] | Filter by tags
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $result = $api_instance->devicesV2List($acrossUserIds, $serial, $showDeleted, $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 $showDeleted = true; # Boolean | If true, shows the soft deleted devices
my $tags = []; # array[String] | Filter by tags
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->devicesV2List(acrossUserIds => $acrossUserIds, serial => $serial, showDeleted => $showDeleted, tags => $tags, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
acrossUserIds = true # Boolean object instance | If true, returns all the devices (optional) (default to false)
serial = serial_example # String object instance | Filter by device serial number (optional) (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted devices (optional) (default to false)
tags =  # array[String] object instance | Filter by tags (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # list devices_v2
    api_response = apiInstance.devices_v2_list(acrossUserIds=acrossUserIds, serial=serial, showDeleted=showDeleted, tags=tags, xOrganization=xOrganization)
    print(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 showDeleted = true; // Boolean
    let tags = ; // array[String]
    let xOrganization = xOrganization_example; // String

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

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Query parameters
Name Description
across_user_ids
Boolean
If true, returns all the devices
serial
String
Filter by device serial number
show_deleted
Boolean
If true, shows the soft deleted devices
tags
array[String]
Filter by tags

Responses


devicesV2Show

show devices_v2

Returns the device requested by the user


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->devicesV2Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # show devices_v2
    api_response = apiInstance.devices_v2_show(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


devicesV2Timeseries

timeseries devices_v2

GET device properties values in a range of time


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
pid = pid_example # String object instance | The id of the property (default to null)
limit = 56 # Integer object instance | The number of properties to select (optional) (default to null)
start = start_example # String object instance | The time at which to start selecting properties (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # timeseries devices_v2
    api_response = apiInstance.devices_v2_timeseries(id, pid, limit=limit, start=start, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->devicesV2Update(id => $id, devicev2 => $devicev2, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2Update: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
devicev2 =  # Devicev2 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # update devices_v2
    api_response = apiInstance.devices_v2_update(id, devicev2, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
devicev2 *

DeviceV2 describes a device.

Responses


devicesV2UpdateProperties

updateProperties devices_v2

Update device properties last values


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/properties" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->devicesV2UpdateProperties(id => $id, propertiesValues => $propertiesValues, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling DevicesV2Api->devicesV2UpdateProperties: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2Api(client)
id = id_example # String object instance | The id of the device (default to null)
propertiesValues =  # PropertiesValues object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # updateProperties devices_v2
    apiInstance.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
Organization space identifer (optional)
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.


/iot/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" \
 "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
}'
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2CertsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2CertsApi(client)
id = id_example # String object instance | The id of the device (default to null)
createDevicesV2CertsPayload =  # CreateDevicesV2CertsPayload object instance | 

try:
    # create devices_v2_certs
    api_response = apiInstance.devices_v2_certs_create(id, createDevicesV2CertsPayload)
    print(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


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2CertsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2CertsApi(client)
cid = cid_example # String object instance | The id of the cert (default to null)
id = id_example # String object instance | The id of the device (default to null)

try:
    # delete devices_v2_certs
    apiInstance.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


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2CertsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2CertsApi(client)
id = id_example # String object instance | The id of the device (default to null)

try:
    # list devices_v2_certs
    api_response = apiInstance.devices_v2_certs_list(id)
    print(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


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2CertsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2CertsApi(client)
cid = cid_example # String object instance | The id of the cert (default to null)
id = id_example # String object instance | The id of the device (default to null)

try:
    # show devices_v2_certs
    api_response = apiInstance.devices_v2_certs_show(cid, id)
    print(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.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/certs/{cid}" \
 -d ''
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2CertsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2CertsApi(client)
cid = cid_example # String object instance | The id of the cert (default to null)
id = id_example # String object instance | The id of the device (default to null)
devicev2Cert =  # Devicev2Cert object instance | 

try:
    # update devices_v2_certs
    api_response = apiInstance.devices_v2_certs_update(cid, id, devicev2Cert)
    print(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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/ota" \
 -d ''
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2OtaApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2OtaApi(client)
id = id_example # String object instance | The id of the device (default to null)
devicev2Otabinaryurl =  # Devicev2Otabinaryurl object instance | 

try:
    # send devices_v2_ota
    apiInstance.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


/iot/v2/devices/{id}/ota

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.devicev2.otaupload+json,application/vnd.goa.error+json" \
 -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 {
            ArduinoDevicev2Otaupload result = apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
            System.out.println(result);
        } 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 {
            ArduinoDevicev2Otaupload result = apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
            System.out.println(result);
        } 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: ^(ArduinoDevicev2Otaupload 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.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(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 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
                ArduinoDevicev2Otaupload result = apiInstance.devicesV2OtaUpload(id, otaFile, async, expireInMins);
                Debug.WriteLine(result);
            } 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 {
    $result = $api_instance->devicesV2OtaUpload($id, $otaFile, $async, $expireInMins);
    print_r($result);
} 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 {
    my $result = $api_instance->devicesV2OtaUpload(id => $id, otaFile => $otaFile, async => $async, expireInMins => $expireInMins);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesV2OtaApi->devicesV2OtaUpload: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2OtaApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

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

try:
    # upload devices_v2_ota
    api_response = apiInstance.devices_v2_ota_upload(id, otaFile, async=async, expireInMins=expireInMins)
    print(api_response)
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


devicesV2OtaUrl

url devices_v2_ota

Generate a url for downloading a binary


/iot/v2/devices/{id}/ota/url

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/ota/url" \
 -d ''
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
        Devicev2Otaurlpyalod devicev2Otaurlpyalod = ; // Devicev2Otaurlpyalod | 

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

final api_instance = DefaultApi();

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

try {
    final result = await api_instance.devicesV2OtaUrl(id, devicev2Otaurlpyalod);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->devicesV2OtaUrl: $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
        Devicev2Otaurlpyalod devicev2Otaurlpyalod = ; // Devicev2Otaurlpyalod | 

        try {
            apiInstance.devicesV2OtaUrl(id, devicev2Otaurlpyalod);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesV2OtaApi#devicesV2OtaUrl");
            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)
Devicev2Otaurlpyalod *devicev2Otaurlpyalod = ; // 

// url devices_v2_ota
[apiInstance devicesV2OtaUrlWith:id
    devicev2Otaurlpyalod:devicev2Otaurlpyalod
              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 devicev2Otaurlpyalod = ; // {Devicev2Otaurlpyalod} 
api.devicesV2OtaUrl(id, devicev2Otaurlpyalod).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 devicesV2OtaUrlExample
    {
        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 devicev2Otaurlpyalod = new Devicev2Otaurlpyalod(); // Devicev2Otaurlpyalod | 

            try {
                // url devices_v2_ota
                apiInstance.devicesV2OtaUrl(id, devicev2Otaurlpyalod);
            } catch (Exception e) {
                Debug.Print("Exception when calling DevicesV2OtaApi.devicesV2OtaUrl: " + 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
$devicev2Otaurlpyalod = ; // Devicev2Otaurlpyalod | 

try {
    $api_instance->devicesV2OtaUrl($id, $devicev2Otaurlpyalod);
} catch (Exception $e) {
    echo 'Exception when calling DevicesV2OtaApi->devicesV2OtaUrl: ', $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 $devicev2Otaurlpyalod = WWW::OPenAPIClient::Object::Devicev2Otaurlpyalod->new(); # Devicev2Otaurlpyalod | 

eval {
    $api_instance->devicesV2OtaUrl(id => $id, devicev2Otaurlpyalod => $devicev2Otaurlpyalod);
};
if ($@) {
    warn "Exception when calling DevicesV2OtaApi->devicesV2OtaUrl: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2OtaApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2OtaApi(client)
id = id_example # String object instance | The id of the device (default to null)
devicev2Otaurlpyalod =  # Devicev2Otaurlpyalod object instance | 

try:
    # url devices_v2_ota
    apiInstance.devices_v2_ota_url(id, devicev2Otaurlpyalod)
except ApiException as e:
    print("Exception when calling DevicesV2OtaApi->devicesV2OtaUrl: %s\n" % e)

extern crate DevicesV2OtaApi;

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

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

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

Scopes

Parameters

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

Responses


DevicesV2Pass

devicesV2PassCheck

check devices_v2_pass

Check if the password matches.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass" \
 -d '{
  "password" : "password"
}'
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2PassApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2PassApi(client)
id = id_example # String object instance | The id of the device (default to null)
checkDevicesV2PassPayload =  # CheckDevicesV2PassPayload object instance | 

try:
    # check devices_v2_pass
    apiInstance.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.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2PassApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2PassApi(client)
id = id_example # String object instance | The id of the device (default to null)

try:
    # delete devices_v2_pass
    apiInstance.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.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2PassApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2PassApi(client)
id = id_example # String object instance | The id of the device (default to null)
suggestedPassword = true # Boolean object instance | If true, return a suggested password (optional) (default to false)

try:
    # get devices_v2_pass
    api_response = apiInstance.devices_v2_pass_get(id, suggestedPassword=suggestedPassword)
    print(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.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/pass" \
 -d ''
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2PassApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2PassApi(client)
id = id_example # String object instance | The id of the device (default to null)
devicev2Pass =  # Devicev2Pass object instance | 

try:
    # set devices_v2_pass
    api_response = apiInstance.devices_v2_pass_set(id, devicev2Pass)
    print(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.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2TagsApi(client)
id = id_example # String object instance | The id of the device (default to null)
key = key_example # String object instance | The key of the tag (default to null)

try:
    # delete devices_v2_tags
    apiInstance.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.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2TagsApi(client)
id = id_example # String object instance | The id of the device (default to null)

try:
    # list devices_v2_tags
    api_response = apiInstance.devices_v2_tags_list(id)
    print(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.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/devices/{id}/tags" \
 -d ''
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import DevicesV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = DevicesV2TagsApi(client)
id = id_example # String object instance | The id of the device (default to null)
tag =  # Tag object instance | 

try:
    # upsert devices_v2_tags
    apiInstance.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


/iot/v1/lora-devices/

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.loradevicev1+json" \
 -H "Content-Type: application/json" \
 "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"
}'
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) {
        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
        LoraDevicesV1Api apiInstance = new LoraDevicesV1Api();
        CreateLoraDevicesV1Payload createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        try {
            ArduinoLoradevicev1 result = apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoraDevicesV1Api#loraDevicesV1Create");
            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
LoraDevicesV1Api *apiInstance = [[LoraDevicesV1Api alloc] init];
CreateLoraDevicesV1Payload *createLoraDevicesV1Payload = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (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');
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.LoraDevicesV1Api()
var createLoraDevicesV1Payload = ; // {CreateLoraDevicesV1Payload} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
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()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new LoraDevicesV1Api();
            var createLoraDevicesV1Payload = new CreateLoraDevicesV1Payload(); // CreateLoraDevicesV1Payload | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (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');

// 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\LoraDevicesV1Api();
$createLoraDevicesV1Payload = ; // CreateLoraDevicesV1Payload | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

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;

# 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::LoraDevicesV1Api->new();
my $createLoraDevicesV1Payload = WWW::OPenAPIClient::Object::CreateLoraDevicesV1Payload->new(); # CreateLoraDevicesV1Payload | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->loraDevicesV1Create(createLoraDevicesV1Payload => $createLoraDevicesV1Payload, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoraDevicesV1Api->loraDevicesV1Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import LoraDevicesV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = LoraDevicesV1Api(client)
createLoraDevicesV1Payload =  # CreateLoraDevicesV1Payload object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # create lora_devices_v1
    api_response = apiInstance.lora_devices_v1_create(createLoraDevicesV1Payload, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
createLoraDevicesV1Payload *

Responses


LoraFreqPlanV1

loraFreqPlanV1List

list lora_freq_plan_v1

List the lora frequency plans supported


/iot/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) {
        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
        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();
        }
    }
}
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
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');
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.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()
        {
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // 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');

// 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\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;

# 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::LoraFreqPlanV1Api->new();

eval {
    my $result = $api_instance->loraFreqPlanV1List();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoraFreqPlanV1Api->loraFreqPlanV1List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import LoraFreqPlanV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = LoraFreqPlanV1Api(client)

try:
    # list lora_freq_plan_v1
    api_response = apiInstance.lora_freq_plan_v1_list()
    print(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


NetworkCredentialsV1

networkCredentialsV1Show

show network_credentials_v1

Show required network credentials depending on device type


/iot/v1/network_credentials/{type}

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.credentialsv1+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/network_credentials/{type}?connection=connection_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NetworkCredentialsV1Api;

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

public class NetworkCredentialsV1ApiExample {
    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
        NetworkCredentialsV1Api apiInstance = new NetworkCredentialsV1Api();
        String type = type_example; // String | Device type
        String connection = connection_example; // String | Connection used by the device

        try {
            array[ArduinoCredentialsv1] result = apiInstance.networkCredentialsV1Show(type, connection);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworkCredentialsV1Api#networkCredentialsV1Show");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String type = new String(); // String | Device type
final String connection = new String(); // String | Connection used by the device

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

import org.openapitools.client.api.NetworkCredentialsV1Api;

public class NetworkCredentialsV1ApiExample {
    public static void main(String[] args) {
        NetworkCredentialsV1Api apiInstance = new NetworkCredentialsV1Api();
        String type = type_example; // String | Device type
        String connection = connection_example; // String | Connection used by the device

        try {
            array[ArduinoCredentialsv1] result = apiInstance.networkCredentialsV1Show(type, connection);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworkCredentialsV1Api#networkCredentialsV1Show");
            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
NetworkCredentialsV1Api *apiInstance = [[NetworkCredentialsV1Api alloc] init];
String *type = type_example; // Device type (default to null)
String *connection = connection_example; // Connection used by the device (optional) (default to null)

// show network_credentials_v1
[apiInstance networkCredentialsV1ShowWith:type
    connection:connection
              completionHandler: ^(array[ArduinoCredentialsv1] 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.NetworkCredentialsV1Api()
var type = type_example; // {String} Device type
var opts = {
  'connection': connection_example // {String} Connection used by the device
};
api.networkCredentialsV1Show(type, 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 networkCredentialsV1ShowExample
    {
        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 NetworkCredentialsV1Api();
            var type = type_example;  // String | Device type (default to null)
            var connection = connection_example;  // String | Connection used by the device (optional)  (default to null)

            try {
                // show network_credentials_v1
                array[ArduinoCredentialsv1] result = apiInstance.networkCredentialsV1Show(type, connection);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling NetworkCredentialsV1Api.networkCredentialsV1Show: " + 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\NetworkCredentialsV1Api();
$type = type_example; // String | Device type
$connection = connection_example; // String | Connection used by the device

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

# 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::NetworkCredentialsV1Api->new();
my $type = type_example; # String | Device type
my $connection = connection_example; # String | Connection used by the device

eval {
    my $result = $api_instance->networkCredentialsV1Show(type => $type, connection => $connection);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworkCredentialsV1Api->networkCredentialsV1Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import NetworkCredentialsV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = NetworkCredentialsV1Api(client)
type = type_example # String object instance | Device type (default to null)
connection = connection_example # String object instance | Connection used by the device (optional) (default to null)

try:
    # show network_credentials_v1
    api_response = apiInstance.network_credentials_v1_show(type, connection=connection)
    print(api_response)
except ApiException as e:
    print("Exception when calling NetworkCredentialsV1Api->networkCredentialsV1Show: %s\n" % e)

extern crate NetworkCredentialsV1Api;

pub fn main() {
    let type = type_example; // String
    let connection = connection_example; // String

    let mut context = NetworkCredentialsV1Api::Context::default();
    let result = client.networkCredentialsV1Show(type, connection, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
type*
String
Device type
Required
Query parameters
Name Description
connection
String
Connection used by the device

Responses


networkCredentialsV1ShowByDevice

showByDevice network_credentials_v1

Show available connection types depending on device type


/iot/v1/network_credentials/{type}/connections

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/json,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/network_credentials/{type}/connections"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NetworkCredentialsV1Api;

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

public class NetworkCredentialsV1ApiExample {
    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
        NetworkCredentialsV1Api apiInstance = new NetworkCredentialsV1Api();
        String type = type_example; // String | Device type

        try {
            apiInstance.networkCredentialsV1ShowByDevice(type);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworkCredentialsV1Api#networkCredentialsV1ShowByDevice");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String type = new String(); // String | Device type

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

import org.openapitools.client.api.NetworkCredentialsV1Api;

public class NetworkCredentialsV1ApiExample {
    public static void main(String[] args) {
        NetworkCredentialsV1Api apiInstance = new NetworkCredentialsV1Api();
        String type = type_example; // String | Device type

        try {
            apiInstance.networkCredentialsV1ShowByDevice(type);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworkCredentialsV1Api#networkCredentialsV1ShowByDevice");
            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
NetworkCredentialsV1Api *apiInstance = [[NetworkCredentialsV1Api alloc] init];
String *type = type_example; // Device type (default to null)

// showByDevice network_credentials_v1
[apiInstance networkCredentialsV1ShowByDeviceWith:type
              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.NetworkCredentialsV1Api()
var type = type_example; // {String} Device type
api.networkCredentialsV1ShowByDevice(type).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 networkCredentialsV1ShowByDeviceExample
    {
        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 NetworkCredentialsV1Api();
            var type = type_example;  // String | Device type (default to null)

            try {
                // showByDevice network_credentials_v1
                apiInstance.networkCredentialsV1ShowByDevice(type);
            } catch (Exception e) {
                Debug.Print("Exception when calling NetworkCredentialsV1Api.networkCredentialsV1ShowByDevice: " + 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\NetworkCredentialsV1Api();
$type = type_example; // String | Device type

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

# 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::NetworkCredentialsV1Api->new();
my $type = type_example; # String | Device type

eval {
    $api_instance->networkCredentialsV1ShowByDevice(type => $type);
};
if ($@) {
    warn "Exception when calling NetworkCredentialsV1Api->networkCredentialsV1ShowByDevice: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import NetworkCredentialsV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = NetworkCredentialsV1Api(client)
type = type_example # String object instance | Device type (default to null)

try:
    # showByDevice network_credentials_v1
    apiInstance.network_credentials_v1_show_by_device(type)
except ApiException as e:
    print("Exception when calling NetworkCredentialsV1Api->networkCredentialsV1ShowByDevice: %s\n" % e)

extern crate NetworkCredentialsV1Api;

pub fn main() {
    let type = type_example; // String

    let mut context = NetworkCredentialsV1Api::Context::default();
    let result = client.networkCredentialsV1ShowByDevice(type, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
type*
String
Device type
Required

Responses


PropertiesV2

propertiesV2Create

create properties_v2

Creates a new property associated to a thing


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->propertiesV2Create(id => $id, property => $property, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
property =  # Property object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # create properties_v2
    api_response = apiInstance.properties_v2_create(id, property, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->propertiesV2Delete(id => $id, pid => $pid, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
pid = pid_example # String object instance | The id of the property (default to null)
force = true # Boolean object instance | If true, hard delete the property (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # delete properties_v2
    apiInstance.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
Organization space identifer (optional)
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


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->propertiesV2List(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted properties (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # list properties_v2
    api_response = apiInstance.properties_v2_list(id, showDeleted=showDeleted, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}/publish" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->propertiesV2Publish(id => $id, pid => $pid, propertyValue => $propertyValue, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling PropertiesV2Api->propertiesV2Publish: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
pid = pid_example # String object instance | The id of the property (default to null)
propertyValue =  # PropertyValue object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # publish properties_v2
    apiInstance.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
Organization space identifer (optional)
Body parameters
Name Description
propertyValue *

PropertyValuePayload describes a property value

Responses


propertiesV2Show

show properties_v2

Returns the property requested by the user


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
pid = pid_example # String object instance | The id of the property (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted properties (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # show properties_v2
    api_response = apiInstance.properties_v2_show(id, pid, showDeleted=showDeleted, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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)


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
pid = pid_example # String object instance | ID of a numerical property (default to null)
aggregation = aggregation_example # String object instance | 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 object instance | Whether data's ordering (by time) should be descending (optional) (default to false)
from = from_example # String object instance | 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 object instance | 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 object instance | 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 object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # timeseries properties_v2
    api_response = apiInstance.properties_v2_timeseries(id, pid, aggregation=aggregation, desc=desc, from=from, interval=interval, to=to, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/properties/{pid}" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertiesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertiesV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
pid = pid_example # String object instance | The id of the property (default to null)
property =  # Property object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # update properties_v2
    api_response = apiInstance.properties_v2_update(id, pid, property, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
property *

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

Responses


PropertyTypesV1

propertyTypesV1ListTypes

listTypes property_types_v1

Returns the list of available property types


/iot/v1/property_types

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.propertytype+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/property_types"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PropertyTypesV1Api;

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

public class PropertyTypesV1ApiExample {
    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
        PropertyTypesV1Api apiInstance = new PropertyTypesV1Api();

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

final api_instance = DefaultApi();


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

import org.openapitools.client.api.PropertyTypesV1Api;

public class PropertyTypesV1ApiExample {
    public static void main(String[] args) {
        PropertyTypesV1Api apiInstance = new PropertyTypesV1Api();

        try {
            array[ArduinoPropertytype] result = apiInstance.propertyTypesV1ListTypes();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PropertyTypesV1Api#propertyTypesV1ListTypes");
            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
PropertyTypesV1Api *apiInstance = [[PropertyTypesV1Api alloc] init];

// listTypes property_types_v1
[apiInstance propertyTypesV1ListTypesWithCompletionHandler: 
              ^(array[ArduinoPropertytype] 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.PropertyTypesV1Api()api.propertyTypesV1ListTypes().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 propertyTypesV1ListTypesExample
    {
        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 PropertyTypesV1Api();

            try {
                // listTypes property_types_v1
                array[ArduinoPropertytype] result = apiInstance.propertyTypesV1ListTypes();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PropertyTypesV1Api.propertyTypesV1ListTypes: " + 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\PropertyTypesV1Api();

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

# 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::PropertyTypesV1Api->new();

eval {
    my $result = $api_instance->propertyTypesV1ListTypes();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PropertyTypesV1Api->propertyTypesV1ListTypes: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import PropertyTypesV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = PropertyTypesV1Api(client)

try:
    # listTypes property_types_v1
    api_response = apiInstance.property_types_v1_list_types()
    print(api_response)
except ApiException as e:
    print("Exception when calling PropertyTypesV1Api->propertyTypesV1ListTypes: %s\n" % e)

extern crate PropertyTypesV1Api;

pub fn main() {

    let mut context = PropertyTypesV1Api::Context::default();
    let result = client.propertyTypesV1ListTypes(&context).wait();

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

Scopes

Parameters

Responses


SeriesV2

seriesV2BatchQuery

batch_query series_v2

Returns the batch of time-series aggregated samples


/iot/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" \
 "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"
  } ]
}'
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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1, xOrganization);
            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 | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.seriesV2BatchQuery(batchQueryRequestsMediaV1, xOrganization);
    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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1, xOrganization);
            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 = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// batch_query series_v2
[apiInstance seriesV2BatchQueryWith:batchQueryRequestsMediaV1
    xOrganization:xOrganization
              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} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.seriesV2BatchQuery(batchQueryRequestsMediaV1, 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 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 | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // batch_query series_v2
                ArduinoSeriesBatch result = apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1, xOrganization);
                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 | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $result = $api_instance->seriesV2BatchQuery($batchQueryRequestsMediaV1, $xOrganization);
    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 | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->seriesV2BatchQuery(batchQueryRequestsMediaV1 => $batchQueryRequestsMediaV1, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQuery: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import SeriesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = SeriesV2Api(client)
batchQueryRequestsMediaV1 =  # BatchQueryRequestsMediaV1 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # batch_query series_v2
    api_response = apiInstance.series_v2_batch_query(batchQueryRequestsMediaV1, xOrganization=xOrganization)
    print(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 xOrganization = xOrganization_example; // String

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQuery(batchQueryRequestsMediaV1, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
batchQueryRequestsMediaV1 *

Responses


seriesV2BatchQueryRaw

batch_query_raw series_v2

Returns the batch of time-series raw samples


/iot/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" \
 "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"
  } ]
}'
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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, xOrganization);
            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 | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, xOrganization);
    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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, xOrganization);
            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 = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// batch_query_raw series_v2
[apiInstance seriesV2BatchQueryRawWith:batchQueryRawRequestsMediaV1
    xOrganization:xOrganization
              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} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, 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 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 | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // batch_query_raw series_v2
                ArduinoSeriesRawBatch result = apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, xOrganization);
                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 | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $result = $api_instance->seriesV2BatchQueryRaw($batchQueryRawRequestsMediaV1, $xOrganization);
    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 | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1 => $batchQueryRawRequestsMediaV1, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQueryRaw: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import SeriesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = SeriesV2Api(client)
batchQueryRawRequestsMediaV1 =  # BatchQueryRawRequestsMediaV1 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # batch_query_raw series_v2
    api_response = apiInstance.series_v2_batch_query_raw(batchQueryRawRequestsMediaV1, xOrganization=xOrganization)
    print(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 xOrganization = xOrganization_example; // String

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
batchQueryRawRequestsMediaV1 *

Responses


seriesV2BatchQueryRawLastValue

batch_query_raw_last_value series_v2

Returns the batch of time-series data raw


/iot/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" \
 "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"
  } ]
}'
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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, xOrganization);
            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 | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, xOrganization);
    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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, xOrganization);
            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 = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// batch_query_raw_last_value series_v2
[apiInstance seriesV2BatchQueryRawLastValueWith:batchLastValueRequestsMediaV1
    xOrganization:xOrganization
              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} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, 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 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 | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // batch_query_raw_last_value series_v2
                ArduinoSeriesRawBatchLastvalue result = apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, xOrganization);
                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 | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $result = $api_instance->seriesV2BatchQueryRawLastValue($batchLastValueRequestsMediaV1, $xOrganization);
    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 | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1 => $batchLastValueRequestsMediaV1, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQueryRawLastValue: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import SeriesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = SeriesV2Api(client)
batchLastValueRequestsMediaV1 =  # BatchLastValueRequestsMediaV1 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # batch_query_raw_last_value series_v2
    api_response = apiInstance.series_v2_batch_query_raw_last_value(batchLastValueRequestsMediaV1, xOrganization=xOrganization)
    print(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 xOrganization = xOrganization_example; // String

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
batchLastValueRequestsMediaV1 *

Responses


seriesV2BatchQuerySampling

batch_query_sampling series_v2

Returns a batch of time-series sampled samples. To be used for types that does not support mathematic aggregation. Types supported: strings, complex types.


/iot/v2/series/batch_query_sampling

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.series.batch.sampled+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v2/series/batch_query_sampling" \
 -d '{
  "resp_version" : 1,
  "requests" : [ {
    "q" : "q",
    "series_limit" : 6,
    "from" : "2000-01-23T04:56:07.000+00:00",
    "interval" : 6974,
    "to" : "2000-01-23T04:56:07.000+00:00"
  }, {
    "q" : "q",
    "series_limit" : 6,
    "from" : "2000-01-23T04:56:07.000+00:00",
    "interval" : 6974,
    "to" : "2000-01-23T04:56:07.000+00:00"
  } ]
}'
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();
        BatchQuerySampledRequestsMediaV1 batchQuerySampledRequestsMediaV1 = ; // BatchQuerySampledRequestsMediaV1 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

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

final api_instance = DefaultApi();

final BatchQuerySampledRequestsMediaV1 batchQuerySampledRequestsMediaV1 = new BatchQuerySampledRequestsMediaV1(); // BatchQuerySampledRequestsMediaV1 | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

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

import org.openapitools.client.api.SeriesV2Api;

public class SeriesV2ApiExample {
    public static void main(String[] args) {
        SeriesV2Api apiInstance = new SeriesV2Api();
        BatchQuerySampledRequestsMediaV1 batchQuerySampledRequestsMediaV1 = ; // BatchQuerySampledRequestsMediaV1 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoSeriesBatchSampled result = apiInstance.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SeriesV2Api#seriesV2BatchQuerySampling");
            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];
BatchQuerySampledRequestsMediaV1 *batchQuerySampledRequestsMediaV1 = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// batch_query_sampling series_v2
[apiInstance seriesV2BatchQuerySamplingWith:batchQuerySampledRequestsMediaV1
    xOrganization:xOrganization
              completionHandler: ^(ArduinoSeriesBatchSampled 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 batchQuerySampledRequestsMediaV1 = ; // {BatchQuerySampledRequestsMediaV1} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, 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 seriesV2BatchQuerySamplingExample
    {
        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 batchQuerySampledRequestsMediaV1 = new BatchQuerySampledRequestsMediaV1(); // BatchQuerySampledRequestsMediaV1 | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // batch_query_sampling series_v2
                ArduinoSeriesBatchSampled result = apiInstance.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SeriesV2Api.seriesV2BatchQuerySampling: " + 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();
$batchQuerySampledRequestsMediaV1 = ; // BatchQuerySampledRequestsMediaV1 | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $result = $api_instance->seriesV2BatchQuerySampling($batchQuerySampledRequestsMediaV1, $xOrganization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SeriesV2Api->seriesV2BatchQuerySampling: ', $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 $batchQuerySampledRequestsMediaV1 = WWW::OPenAPIClient::Object::BatchQuerySampledRequestsMediaV1->new(); # BatchQuerySampledRequestsMediaV1 | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1 => $batchQuerySampledRequestsMediaV1, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2BatchQuerySampling: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import SeriesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = SeriesV2Api(client)
batchQuerySampledRequestsMediaV1 =  # BatchQuerySampledRequestsMediaV1 object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # batch_query_sampling series_v2
    api_response = apiInstance.series_v2_batch_query_sampling(batchQuerySampledRequestsMediaV1, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2BatchQuerySampling: %s\n" % e)

extern crate SeriesV2Api;

pub fn main() {
    let batchQuerySampledRequestsMediaV1 = ; // BatchQuerySampledRequestsMediaV1
    let xOrganization = xOrganization_example; // String

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
batchQuerySampledRequestsMediaV1 *

Responses


seriesV2HistoricData

historic_data series_v2

Request sending of historical data of properties by email


/iot/v2/series/historic_data

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "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" ]
}'
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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.seriesV2HistoricData(historicDataRequest, xOrganization);
        } 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 | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

try {
    final result = await api_instance.seriesV2HistoricData(historicDataRequest, xOrganization);
    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 | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            apiInstance.seriesV2HistoricData(historicDataRequest, xOrganization);
        } 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 = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// historic_data series_v2
[apiInstance seriesV2HistoricDataWith:historicDataRequest
    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.SeriesV2Api()
var historicDataRequest = ; // {HistoricDataRequest} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.seriesV2HistoricData(historicDataRequest, 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 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 | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // historic_data series_v2
                apiInstance.seriesV2HistoricData(historicDataRequest, xOrganization);
            } 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 | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

try {
    $api_instance->seriesV2HistoricData($historicDataRequest, $xOrganization);
} 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 | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    $api_instance->seriesV2HistoricData(historicDataRequest => $historicDataRequest, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling SeriesV2Api->seriesV2HistoricData: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import SeriesV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = SeriesV2Api(client)
historicDataRequest =  # HistoricDataRequest object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # historic_data series_v2
    apiInstance.series_v2_historic_data(historicDataRequest, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling SeriesV2Api->seriesV2HistoricData: %s\n" % e)

extern crate SeriesV2Api;

pub fn main() {
    let historicDataRequest = ; // HistoricDataRequest
    let xOrganization = xOrganization_example; // String

    let mut context = SeriesV2Api::Context::default();
    let result = client.seriesV2HistoricData(historicDataRequest, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
historicDataRequest *

Responses


Templates

templatesApply

apply templates

Apply an existing cloud template and generate all the needed resources


/iot/v1/templates

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.template+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/templates" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TemplatesApi;

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

public class TemplatesApiExample {
    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
        TemplatesApi apiInstance = new TemplatesApi();
        Template template = ; // Template | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

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

final api_instance = DefaultApi();

final Template template = new Template(); // Template | 
final String xOrganization = new String(); // String | Organization space identifer (optional)

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

import org.openapitools.client.api.TemplatesApi;

public class TemplatesApiExample {
    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        Template template = ; // Template | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        try {
            ArduinoTemplate result = apiInstance.templatesApply(template, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#templatesApply");
            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
TemplatesApi *apiInstance = [[TemplatesApi alloc] init];
Template *template = ; // 
String *xOrganization = xOrganization_example; // Organization space identifer (optional) (optional) (default to null)

// apply templates
[apiInstance templatesApplyWith:template
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTemplate 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.TemplatesApi()
var template = ; // {Template} 
var opts = {
  'xOrganization': xOrganization_example // {String} Organization space identifer (optional)
};
api.templatesApply(template, 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 templatesApplyExample
    {
        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 TemplatesApi();
            var template = new Template(); // Template | 
            var xOrganization = xOrganization_example;  // String | Organization space identifer (optional) (optional)  (default to null)

            try {
                // apply templates
                ArduinoTemplate result = apiInstance.templatesApply(template, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TemplatesApi.templatesApply: " + 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\TemplatesApi();
$template = ; // Template | 
$xOrganization = xOrganization_example; // String | Organization space identifer (optional)

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

# 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::TemplatesApi->new();
my $template = WWW::OPenAPIClient::Object::Template->new(); # Template | 
my $xOrganization = xOrganization_example; # String | Organization space identifer (optional)

eval {
    my $result = $api_instance->templatesApply(template => $template, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->templatesApply: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TemplatesApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TemplatesApi(client)
template =  # Template object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # apply templates
    api_response = apiInstance.templates_apply(template, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->templatesApply: %s\n" % e)

extern crate TemplatesApi;

pub fn main() {
    let template = ; // Template
    let xOrganization = xOrganization_example; // String

    let mut context = TemplatesApi::Context::default();
    let result = client.templatesApply(template, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Organization space identifer (optional)
Body parameters
Name Description
template *

TemplatePayload describes the needed attribute to apply a template

Responses


ThingsV2

thingsV2Clone

clone things_v2

Clone a given thing


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/clone" \
 -d '{
  "name" : "name",
  "include_tags" : 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
        ThingClone thingClone = ; // ThingClone | 
        String xOrganization = xOrganization_example; // String | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2Clone(id => $id, thingClone => $thingClone, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Clone: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
thingClone =  # ThingClone object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # clone things_v2
    api_response = apiInstance.things_v2_clone(id, thingClone, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things?force=true" \
 -d '{
  "device_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "timezone" : "America/New_York",
  "assistant" : "ALEXA",
  "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"
  } ]
}'
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2Create(thingCreate => $thingCreate, force => $force, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
thingCreate =  # ThingCreate object instance | 
force = true # Boolean object instance | If true, detach device from the other thing, and attach to this thing (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # create things_v2
    api_response = apiInstance.things_v2_create(thingCreate, force=force, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/sketch" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2CreateSketch(id => $id, thingSketch => $thingSketch, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2CreateSketch: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
thingSketch =  # ThingSketch object instance | 
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # createSketch things_v2
    api_response = apiInstance.things_v2_create_sketch(id, thingSketch, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
thingSketch *

ThingSketchPayload describes a sketch of a thing

Responses


thingsV2Delete

delete things_v2

Removes a thing associated to the user


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    $api_instance->thingsV2Delete(id => $id, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
force = true # Boolean object instance | If true, hard delete the thing (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # delete things_v2
    apiInstance.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
Organization space identifer (optional)
Query parameters
Name Description
force
Boolean
If true, hard delete the thing

Responses


thingsV2DeleteSketch

deleteSketch things_v2


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2DeleteSketch(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2DeleteSketch: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # deleteSketch things_v2
    api_response = apiInstance.things_v2_delete_sketch(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


thingsV2List

list things_v2

Returns the list of things associated to the user


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
acrossUserIds = true # Boolean object instance | If true, returns all the things (optional) (default to false)
deviceId = deviceId_example # String object instance | The id of the device you want to filter (optional) (default to null)
ids =  # array[String] object instance | Filter only the desired things (optional) (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted things (optional) (default to false)
showProperties = true # Boolean object instance | If true, returns things with their properties, and last values (optional) (default to false)
tags =  # array[String] object instance | Filter by tags (optional) (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # list things_v2
    api_response = apiInstance.things_v2_list(acrossUserIds=acrossUserIds, deviceId=deviceId, ids=ids, showDeleted=showDeleted, showProperties=showProperties, tags=tags, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2Show(id => $id, showDeleted => $showDeleted, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted thing (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # show things_v2
    api_response = apiInstance.things_v2_show(id, showDeleted=showDeleted, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

eval {
    my $result = $api_instance->thingsV2Template(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ThingsV2Api->thingsV2Template: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # template things_v2
    api_response = apiInstance.things_v2_template(id, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)

Responses


thingsV2Update

update things_v2

Updates a thing associated to the user


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}?force=true" \
 -d ''
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 | Organization space identifer (optional)

        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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
};
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 | Organization space identifer (optional) (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 | Organization space identifer (optional)

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 | Organization space identifer (optional)

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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
thingUpdate =  # ThingUpdate object instance | 
force = true # Boolean object instance | If true, detach device from the other thing, and attach to this thing (optional) (default to false)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)

try:
    # update things_v2
    api_response = apiInstance.things_v2_update(id, thingUpdate, force=force, xOrganization=xOrganization)
    print(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
Organization space identifer (optional)
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


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/sketch/{sketchId}" \
 -d ''
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 | Organization space identifer (optional)
        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 | Organization space identifer (optional)
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 | Organization space identifer (optional)
        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; // Organization space identifer (optional) (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} Organization space identifer (optional)
  '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 | Organization space identifer (optional) (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 | Organization space identifer (optional)
$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 | Organization space identifer (optional)
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2Api(client)
id = id_example # String object instance | The id of the thing (default to null)
sketchId = sketchId_example # String object instance | The id of the sketch (default to null)
xOrganization = xOrganization_example # String object instance | Organization space identifer (optional) (optional) (default to null)
updateSketch =  # UpdateSketch object instance |  (optional)

try:
    # updateSketch things_v2
    api_response = apiInstance.things_v2_update_sketch(id, sketchId, xOrganization=xOrganization, updateSketch=updateSketch)
    print(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
Organization space identifer (optional)
Body parameters
Name Description
updateSketch

Responses


ThingsV2Tags

thingsV2TagsDelete

delete things_v2_tags

Delete a tag associated to the thing given its key.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2TagsApi(client)
id = id_example # String object instance | The id of the thing (default to null)
key = key_example # String object instance | The key of the tag (default to null)

try:
    # delete things_v2_tags
    apiInstance.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.


/iot/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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2TagsApi(client)
id = id_example # String object instance | The id of the thing (default to null)

try:
    # list things_v2_tags
    api_response = apiInstance.things_v2_tags_list(id)
    print(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.


/iot/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" \
 "https://api2.arduino.cc/iot/v2/things/{id}/tags" \
 -d ''
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";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import ThingsV2TagsApi
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = ThingsV2TagsApi(client)
id = id_example # String object instance | The id of the thing (default to null)
tag =  # Tag object instance | 

try:
    # upsert things_v2_tags
    apiInstance.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


TriggersV1

actionsV1Create

create actions_v1

Creates a new action


/iot/v1/actions

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.action+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/actions" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        CreateAction createAction = ; // CreateAction | 
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

final CreateAction createAction = new CreateAction(); // CreateAction | 
final String xOrganization = new String(); // String | 

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        CreateAction createAction = ; // CreateAction | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoAction result = apiInstance.actionsV1Create(createAction, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#actionsV1Create");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
CreateAction *createAction = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create actions_v1
[apiInstance actionsV1CreateWith:createAction
    xOrganization:xOrganization
              completionHandler: ^(ArduinoAction 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.TriggersV1Api()
var createAction = ; // {CreateAction} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.actionsV1Create(createAction, 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 actionsV1CreateExample
    {
        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 TriggersV1Api();
            var createAction = new CreateAction(); // CreateAction | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create actions_v1
                ArduinoAction result = apiInstance.actionsV1Create(createAction, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.actionsV1Create: " + 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\TriggersV1Api();
$createAction = ; // CreateAction | 
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $createAction = WWW::OPenAPIClient::Object::CreateAction->new(); # CreateAction | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->actionsV1Create(createAction => $createAction, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->actionsV1Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
createAction =  # CreateAction object instance | 
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # create actions_v1
    api_response = apiInstance.actions_v1_create(createAction, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->actionsV1Create: %s\n" % e)

extern crate TriggersV1Api;

pub fn main() {
    let createAction = ; // CreateAction
    let xOrganization = xOrganization_example; // String

    let mut context = TriggersV1Api::Context::default();
    let result = client.actionsV1Create(createAction, xOrganization, &context).wait();

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

Scopes

Parameters

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

Responses


actionsV1Delete

delete actions_v1

Removes an action


/iot/v1/actions/{id}

Usage and SDK Samples

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

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the action
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

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

        try {
            apiInstance.actionsV1Delete(id, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#actionsV1Delete");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the action (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// delete actions_v1
[apiInstance actionsV1DeleteWith: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.TriggersV1Api()
var id = id_example; // {String} The id of the action
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.actionsV1Delete(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 actionsV1DeleteExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the action (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // delete actions_v1
                apiInstance.actionsV1Delete(id, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.actionsV1Delete: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the action
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the action
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->actionsV1Delete(id => $id, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->actionsV1Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the action (default to null)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # delete actions_v1
    apiInstance.actions_v1_delete(id, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling TriggersV1Api->actionsV1Delete: %s\n" % e)

extern crate TriggersV1Api;

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

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

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

Scopes

Parameters

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

Responses


actionsV1List

list actions_v1

Returns the list of actions


/iot/v1/actions

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.action+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/actions"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoAction] result = apiInstance.actionsV1List(xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#actionsV1List");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// list actions_v1
[apiInstance actionsV1ListWith:xOrganization
              completionHandler: ^(array[ArduinoAction] 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.TriggersV1Api()
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.actionsV1List(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 actionsV1ListExample
    {
        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 TriggersV1Api();
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // list actions_v1
                array[ArduinoAction] result = apiInstance.actionsV1List(xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.actionsV1List: " + 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\TriggersV1Api();
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->actionsV1List(xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->actionsV1List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # list actions_v1
    api_response = apiInstance.actions_v1_list(xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->actionsV1List: %s\n" % e)

extern crate TriggersV1Api;

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

    let mut context = TriggersV1Api::Context::default();
    let result = client.actionsV1List(xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String

Responses


actionsV1Show

show actions_v1

Returns an action


/iot/v1/actions/{id}

Usage and SDK Samples

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

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the action
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

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

        try {
            ArduinoAction result = apiInstance.actionsV1Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#actionsV1Show");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the action (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// show actions_v1
[apiInstance actionsV1ShowWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoAction 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.TriggersV1Api()
var id = id_example; // {String} The id of the action
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.actionsV1Show(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 actionsV1ShowExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the action (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // show actions_v1
                ArduinoAction result = apiInstance.actionsV1Show(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.actionsV1Show: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the action
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the action
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->actionsV1Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->actionsV1Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the action (default to null)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # show actions_v1
    api_response = apiInstance.actions_v1_show(id, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->actionsV1Show: %s\n" % e)

extern crate TriggersV1Api;

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

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

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

Scopes

Parameters

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

Responses


actionsV1Update

update actions_v1

Updates an action


/iot/v1/actions/{id}

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.action+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/actions/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the action
        UpdateAction updateAction = ; // UpdateAction | 
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the action
final UpdateAction updateAction = new UpdateAction(); // UpdateAction | 
final String xOrganization = new String(); // String | 

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the action
        UpdateAction updateAction = ; // UpdateAction | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoAction result = apiInstance.actionsV1Update(id, updateAction, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#actionsV1Update");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the action (default to null)
UpdateAction *updateAction = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// update actions_v1
[apiInstance actionsV1UpdateWith:id
    updateAction:updateAction
    xOrganization:xOrganization
              completionHandler: ^(ArduinoAction 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.TriggersV1Api()
var id = id_example; // {String} The id of the action
var updateAction = ; // {UpdateAction} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.actionsV1Update(id, updateAction, 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 actionsV1UpdateExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the action (default to null)
            var updateAction = new UpdateAction(); // UpdateAction | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // update actions_v1
                ArduinoAction result = apiInstance.actionsV1Update(id, updateAction, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.actionsV1Update: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the action
$updateAction = ; // UpdateAction | 
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the action
my $updateAction = WWW::OPenAPIClient::Object::UpdateAction->new(); # UpdateAction | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->actionsV1Update(id => $id, updateAction => $updateAction, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->actionsV1Update: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the action (default to null)
updateAction =  # UpdateAction object instance | 
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # update actions_v1
    api_response = apiInstance.actions_v1_update(id, updateAction, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->actionsV1Update: %s\n" % e)

extern crate TriggersV1Api;

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

    let mut context = TriggersV1Api::Context::default();
    let result = client.actionsV1Update(id, updateAction, xOrganization, &context).wait();

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

Scopes

Parameters

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

Responses


triggersV1Create

create triggers_v1

Creates a new trigger


/iot/v1/triggers

Usage and SDK Samples

curl -X PUT \
 \
 -H "Accept: application/vnd.arduino.trigger+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/triggers" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

final Trigger trigger = new Trigger(); // Trigger | 
final String xOrganization = new String(); // String | 

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoTrigger result = apiInstance.triggersV1Create(trigger, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Create");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
Trigger *trigger = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// create triggers_v1
[apiInstance triggersV1CreateWith:trigger
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTrigger 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.TriggersV1Api()
var trigger = ; // {Trigger} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Create(trigger, 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 triggersV1CreateExample
    {
        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 TriggersV1Api();
            var trigger = new Trigger(); // Trigger | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // create triggers_v1
                ArduinoTrigger result = apiInstance.triggersV1Create(trigger, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Create: " + 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\TriggersV1Api();
$trigger = ; // Trigger | 
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $trigger = WWW::OPenAPIClient::Object::Trigger->new(); # Trigger | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1Create(trigger => $trigger, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Create: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
trigger =  # Trigger object instance | 
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # create triggers_v1
    api_response = apiInstance.triggers_v1_create(trigger, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Create: %s\n" % e)

extern crate TriggersV1Api;

pub fn main() {
    let trigger = ; // Trigger
    let xOrganization = xOrganization_example; // String

    let mut context = TriggersV1Api::Context::default();
    let result = client.triggersV1Create(trigger, xOrganization, &context).wait();

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

Scopes

Parameters

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

Responses


triggersV1Delete

delete triggers_v1

Removes a trigger


/iot/v1/triggers/{id}

Usage and SDK Samples

curl -X DELETE \
 \
 -H "Accept: application/vnd.goa.error+json,text/plain" \
 "https://api2.arduino.cc/iot/v1/triggers/{id}?force=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Boolean force = true; // Boolean | If true, hard delete the trigger
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

final String id = new String(); // String | The id of the trigger
final Boolean force = new Boolean(); // Boolean | If true, hard delete the trigger
final String xOrganization = new String(); // String | 

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Boolean force = true; // Boolean | If true, hard delete the trigger
        String xOrganization = xOrganization_example; // String | 

        try {
            apiInstance.triggersV1Delete(id, force, xOrganization);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Delete");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the trigger (default to null)
Boolean *force = true; // If true, hard delete the trigger (optional) (default to false)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// delete triggers_v1
[apiInstance triggersV1DeleteWith: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.TriggersV1Api()
var id = id_example; // {String} The id of the trigger
var opts = {
  'force': true, // {Boolean} If true, hard delete the trigger
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Delete(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 triggersV1DeleteExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the trigger (default to null)
            var force = true;  // Boolean | If true, hard delete the trigger (optional)  (default to false)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // delete triggers_v1
                apiInstance.triggersV1Delete(id, force, xOrganization);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Delete: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the trigger
$force = true; // Boolean | If true, hard delete the trigger
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the trigger
my $force = true; # Boolean | If true, hard delete the trigger
my $xOrganization = xOrganization_example; # String | 

eval {
    $api_instance->triggersV1Delete(id => $id, force => $force, xOrganization => $xOrganization);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Delete: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the trigger (default to null)
force = true # Boolean object instance | If true, hard delete the trigger (optional) (default to false)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # delete triggers_v1
    apiInstance.triggers_v1_delete(id, force=force, xOrganization=xOrganization)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Delete: %s\n" % e)

extern crate TriggersV1Api;

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

    let mut context = TriggersV1Api::Context::default();
    let result = client.triggersV1Delete(id, force, xOrganization, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
id*
String
The id of the trigger
Required
Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
force
Boolean
If true, hard delete the trigger

Responses


triggersV1List

list triggers_v1

Returns the list of triggers


/iot/v1/triggers

Usage and SDK Samples

curl -X GET \
 \
 -H "Accept: application/vnd.arduino.trigger+json; type=collection,application/vnd.goa.error+json" \
 "https://api2.arduino.cc/iot/v1/triggers?device_id=deviceId_example&property_id=propertyId_example&show_deleted=true&source_type=sourceType_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String deviceId = deviceId_example; // String | The id of the device associated with the triggers (mutually exclusive with 'property_id')
        String propertyId = propertyId_example; // String | The id of the property associated with the triggers (mutually exclusive with 'device_id')
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted triggers
        String sourceType = sourceType_example; // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoTrigger] result = apiInstance.triggersV1List(deviceId, propertyId, showDeleted, sourceType, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1List");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String deviceId = new String(); // String | The id of the device associated with the triggers (mutually exclusive with 'property_id')
final String propertyId = new String(); // String | The id of the property associated with the triggers (mutually exclusive with 'device_id')
final Boolean showDeleted = new Boolean(); // Boolean | If true, shows the soft deleted triggers
final String sourceType = new String(); // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
final String xOrganization = new String(); // String | 

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String deviceId = deviceId_example; // String | The id of the device associated with the triggers (mutually exclusive with 'property_id')
        String propertyId = propertyId_example; // String | The id of the property associated with the triggers (mutually exclusive with 'device_id')
        Boolean showDeleted = true; // Boolean | If true, shows the soft deleted triggers
        String sourceType = sourceType_example; // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
        String xOrganization = xOrganization_example; // String | 

        try {
            array[ArduinoTrigger] result = apiInstance.triggersV1List(deviceId, propertyId, showDeleted, sourceType, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1List");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *deviceId = deviceId_example; // The id of the device associated with the triggers (mutually exclusive with 'property_id') (optional) (default to null)
String *propertyId = propertyId_example; // The id of the property associated with the triggers (mutually exclusive with 'device_id') (optional) (default to null)
Boolean *showDeleted = true; // If true, shows the soft deleted triggers (optional) (default to false)
String *sourceType = sourceType_example; // The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE (optional) (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// list triggers_v1
[apiInstance triggersV1ListWith:deviceId
    propertyId:propertyId
    showDeleted:showDeleted
    sourceType:sourceType
    xOrganization:xOrganization
              completionHandler: ^(array[ArduinoTrigger] 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.TriggersV1Api()
var opts = {
  'deviceId': deviceId_example, // {String} The id of the device associated with the triggers (mutually exclusive with 'property_id')
  'propertyId': propertyId_example, // {String} The id of the property associated with the triggers (mutually exclusive with 'device_id')
  'showDeleted': true, // {Boolean} If true, shows the soft deleted triggers
  'sourceType': sourceType_example, // {String} The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1List(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 triggersV1ListExample
    {
        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 TriggersV1Api();
            var deviceId = deviceId_example;  // String | The id of the device associated with the triggers (mutually exclusive with 'property_id') (optional)  (default to null)
            var propertyId = propertyId_example;  // String | The id of the property associated with the triggers (mutually exclusive with 'device_id') (optional)  (default to null)
            var showDeleted = true;  // Boolean | If true, shows the soft deleted triggers (optional)  (default to false)
            var sourceType = sourceType_example;  // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE (optional)  (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // list triggers_v1
                array[ArduinoTrigger] result = apiInstance.triggersV1List(deviceId, propertyId, showDeleted, sourceType, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1List: " + 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\TriggersV1Api();
$deviceId = deviceId_example; // String | The id of the device associated with the triggers (mutually exclusive with 'property_id')
$propertyId = propertyId_example; // String | The id of the property associated with the triggers (mutually exclusive with 'device_id')
$showDeleted = true; // Boolean | If true, shows the soft deleted triggers
$sourceType = sourceType_example; // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $deviceId = deviceId_example; # String | The id of the device associated with the triggers (mutually exclusive with 'property_id')
my $propertyId = propertyId_example; # String | The id of the property associated with the triggers (mutually exclusive with 'device_id')
my $showDeleted = true; # Boolean | If true, shows the soft deleted triggers
my $sourceType = sourceType_example; # String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1List(deviceId => $deviceId, propertyId => $propertyId, showDeleted => $showDeleted, sourceType => $sourceType, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1List: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
deviceId = deviceId_example # String object instance | The id of the device associated with the triggers (mutually exclusive with 'property_id') (optional) (default to null)
propertyId = propertyId_example # String object instance | The id of the property associated with the triggers (mutually exclusive with 'device_id') (optional) (default to null)
showDeleted = true # Boolean object instance | If true, shows the soft deleted triggers (optional) (default to false)
sourceType = sourceType_example # String object instance | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE (optional) (default to null)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # list triggers_v1
    api_response = apiInstance.triggers_v1_list(deviceId=deviceId, propertyId=propertyId, showDeleted=showDeleted, sourceType=sourceType, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1List: %s\n" % e)

extern crate TriggersV1Api;

pub fn main() {
    let deviceId = deviceId_example; // String
    let propertyId = propertyId_example; // String
    let showDeleted = true; // Boolean
    let sourceType = sourceType_example; // String
    let xOrganization = xOrganization_example; // String

    let mut context = TriggersV1Api::Context::default();
    let result = client.triggersV1List(deviceId, propertyId, showDeleted, sourceType, xOrganization, &context).wait();

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

Scopes

Parameters

Header parameters
Name Description
X-Organization
String
Query parameters
Name Description
device_id
String
The id of the device associated with the triggers (mutually exclusive with 'property_id')
property_id
String
The id of the property associated with the triggers (mutually exclusive with 'device_id')
show_deleted
Boolean
If true, shows the soft deleted triggers
source_type
String
The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE

Responses


triggersV1Patch

patch triggers_v1

Patch a trigger


/iot/v1/triggers/{id}

Usage and SDK Samples

curl -X PATCH \
 \
 -H "Accept: application/vnd.arduino.trigger+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/triggers/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoTrigger result = apiInstance.triggersV1Patch(id, trigger, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Patch");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the trigger (default to null)
Trigger *trigger = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// patch triggers_v1
[apiInstance triggersV1PatchWith:id
    trigger:trigger
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTrigger 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.TriggersV1Api()
var id = id_example; // {String} The id of the trigger
var trigger = ; // {Trigger} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Patch(id, trigger, 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 triggersV1PatchExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the trigger (default to null)
            var trigger = new Trigger(); // Trigger | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // patch triggers_v1
                ArduinoTrigger result = apiInstance.triggersV1Patch(id, trigger, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Patch: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the trigger
$trigger = ; // Trigger | 
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the trigger
my $trigger = WWW::OPenAPIClient::Object::Trigger->new(); # Trigger | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1Patch(id => $id, trigger => $trigger, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Patch: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the trigger (default to null)
trigger =  # Trigger object instance | 
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # patch triggers_v1
    api_response = apiInstance.triggers_v1_patch(id, trigger, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Patch: %s\n" % e)

extern crate TriggersV1Api;

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

    let mut context = TriggersV1Api::Context::default();
    let result = client.triggersV1Patch(id, trigger, xOrganization, &context).wait();

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

Scopes

Parameters

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

Responses


triggersV1Show

show triggers_v1

Returns a trigger


/iot/v1/triggers/{id}

Usage and SDK Samples

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

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

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

        try {
            ArduinoTrigger_with_linked_entities result = apiInstance.triggersV1Show(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Show");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the trigger (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// show triggers_v1
[apiInstance triggersV1ShowWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTrigger_with_linked_entities 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.TriggersV1Api()
var id = id_example; // {String} The id of the trigger
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Show(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 triggersV1ShowExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the trigger (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // show triggers_v1
                ArduinoTrigger_with_linked_entities result = apiInstance.triggersV1Show(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Show: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the trigger
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the trigger
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1Show(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Show: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the trigger (default to null)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # show triggers_v1
    api_response = apiInstance.triggers_v1_show(id, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Show: %s\n" % e)

extern crate TriggersV1Api;

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

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

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

Scopes

Parameters

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

Responses


triggersV1Template

template triggers_v1

Extract template from the given trigger


/iot/v1/triggers/{id}/template

Usage and SDK Samples

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

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

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

        try {
            ArduinoTrigger_template result = apiInstance.triggersV1Template(id, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Template");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the trigger (default to null)
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// template triggers_v1
[apiInstance triggersV1TemplateWith:id
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTrigger_template 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.TriggersV1Api()
var id = id_example; // {String} The id of the trigger
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Template(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 triggersV1TemplateExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the trigger (default to null)
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // template triggers_v1
                ArduinoTrigger_template result = apiInstance.triggersV1Template(id, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Template: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the trigger
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the trigger
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1Template(id => $id, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Template: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the trigger (default to null)
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # template triggers_v1
    api_response = apiInstance.triggers_v1_template(id, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Template: %s\n" % e)

extern crate TriggersV1Api;

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

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

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

Scopes

Parameters

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

Responses


triggersV1Update

update triggers_v1

Updates a trigger


/iot/v1/triggers/{id}

Usage and SDK Samples

curl -X POST \
 \
 -H "Accept: application/vnd.arduino.trigger+json,application/vnd.goa.error+json" \
 -H "Content-Type: application/json" \
 "https://api2.arduino.cc/iot/v1/triggers/{id}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TriggersV1Api;

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

public class TriggersV1ApiExample {
    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
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.TriggersV1Api;

public class TriggersV1ApiExample {
    public static void main(String[] args) {
        TriggersV1Api apiInstance = new TriggersV1Api();
        String id = id_example; // String | The id of the trigger
        Trigger trigger = ; // Trigger | 
        String xOrganization = xOrganization_example; // String | 

        try {
            ArduinoTrigger result = apiInstance.triggersV1Update(id, trigger, xOrganization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TriggersV1Api#triggersV1Update");
            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
TriggersV1Api *apiInstance = [[TriggersV1Api alloc] init];
String *id = id_example; // The id of the trigger (default to null)
Trigger *trigger = ; // 
String *xOrganization = xOrganization_example; //  (optional) (default to null)

// update triggers_v1
[apiInstance triggersV1UpdateWith:id
    trigger:trigger
    xOrganization:xOrganization
              completionHandler: ^(ArduinoTrigger 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.TriggersV1Api()
var id = id_example; // {String} The id of the trigger
var trigger = ; // {Trigger} 
var opts = {
  'xOrganization': xOrganization_example // {String} 
};
api.triggersV1Update(id, trigger, 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 triggersV1UpdateExample
    {
        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 TriggersV1Api();
            var id = id_example;  // String | The id of the trigger (default to null)
            var trigger = new Trigger(); // Trigger | 
            var xOrganization = xOrganization_example;  // String |  (optional)  (default to null)

            try {
                // update triggers_v1
                ArduinoTrigger result = apiInstance.triggersV1Update(id, trigger, xOrganization);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TriggersV1Api.triggersV1Update: " + 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\TriggersV1Api();
$id = id_example; // String | The id of the trigger
$trigger = ; // Trigger | 
$xOrganization = xOrganization_example; // String | 

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

# 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::TriggersV1Api->new();
my $id = id_example; # String | The id of the trigger
my $trigger = WWW::OPenAPIClient::Object::Trigger->new(); # Trigger | 
my $xOrganization = xOrganization_example; # String | 

eval {
    my $result = $api_instance->triggersV1Update(id => $id, trigger => $trigger, xOrganization => $xOrganization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TriggersV1Api->triggersV1Update: $@\n";
}
import iot_api_client as iot
from iot_api_client.configuration import Configuration
from iot_api_client.api import TriggersV1Api
from iot_api_client.models import *
from iot_api_client.exceptions import ApiException

client_config = Configuration(host="https://api2.arduino.cc")
client_config.access_token = "JWT_ACCESS_TOKEN" 
client = iot.ApiClient(client_config)

# Create an instance of the API class
apiInstance = TriggersV1Api(client)
id = id_example # String object instance | The id of the trigger (default to null)
trigger =  # Trigger object instance | 
xOrganization = xOrganization_example # String object instance |  (optional) (default to null)

try:
    # update triggers_v1
    api_response = apiInstance.triggers_v1_update(id, trigger, xOrganization=xOrganization)
    print(api_response)
except ApiException as e:
    print("Exception when calling TriggersV1Api->triggersV1Update: %s\n" % e)

extern crate TriggersV1Api;

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

    let mut context = TriggersV1Api::Context::default();
    let result = client.triggersV1Update(id, trigger, xOrganization, &context).wait();

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

Scopes

Parameters

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

Responses