dashboardsV2Clone
clone dashboards_v2
Clone an existing dashboard
/v2/dashboards/{id}/clone
Usage and SDK Samples
curl -X PUT \
\
-H "Accept: application/vnd.arduino.dashboardv2+json,application/vnd.goa.error+json" \
-H "Content-Type: application/json,application/x-www-form-urlencoded" \
"https://api2.arduino.cc/iot/v2/dashboards/{id}/clone" \
-d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DashboardsV2Api;
import java.io.File;
import java.util.*;
public class DashboardsV2ApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
// Create an instance of the API class
DashboardsV2Api apiInstance = new DashboardsV2Api();
String id = id_example; // String | The id of the dashboard
Clone clone = ; // Clone |
String xOrganization = xOrganization_example; // String |
try {
ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Clone");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String id = new String(); // String | The id of the dashboard
final Clone clone = new Clone(); // Clone |
final String xOrganization = new String(); // String |
try {
final result = await api_instance.dashboardsV2Clone(id, clone, xOrganization);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->dashboardsV2Clone: $e\n');
}
import org.openapitools.client.api.DashboardsV2Api;
public class DashboardsV2ApiExample {
public static void main(String[] args) {
DashboardsV2Api apiInstance = new DashboardsV2Api();
String id = id_example; // String | The id of the dashboard
Clone clone = ; // Clone |
String xOrganization = xOrganization_example; // String |
try {
ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsV2Api#dashboardsV2Clone");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
DashboardsV2Api *apiInstance = [[DashboardsV2Api alloc] init];
String *id = id_example; // The id of the dashboard (default to null)
Clone *clone = ; //
String *xOrganization = xOrganization_example; // (optional) (default to null)
// clone dashboards_v2
[apiInstance dashboardsV2CloneWith:id
clone:clone
xOrganization:xOrganization
completionHandler: ^(ArduinoDashboardv2 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ArduinoIotClient = require('@arduino/arduino-iot-client');
var defaultClient = ArduinoIotClient.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new ArduinoIotClient.DashboardsV2Api()
var id = id_example; // {String} The id of the dashboard
var clone = ; // {Clone}
var opts = {
'xOrganization': xOrganization_example // {String}
};
api.dashboardsV2Clone(id, clone, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
using System;
using System.Diagnostics;
using iot.Api;
using iot.Client;
using iot.Model;
namespace Example
{
public class dashboardsV2CloneExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new DashboardsV2Api();
var id = id_example; // String | The id of the dashboard (default to null)
var clone = new Clone(); // Clone |
var xOrganization = xOrganization_example; // String | (optional) (default to null)
try {
// clone dashboards_v2
ArduinoDashboardv2 result = apiInstance.dashboardsV2Clone(id, clone, xOrganization);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DashboardsV2Api.dashboardsV2Clone: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DashboardsV2Api();
$id = id_example; // String | The id of the dashboard
$clone = ; // Clone |
$xOrganization = xOrganization_example; // String |
try {
$result = $api_instance->dashboardsV2Clone($id, $clone, $xOrganization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DashboardsV2Api->dashboardsV2Clone: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DashboardsV2Api;
# Configure OAuth2 access token for authorization: oauth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DashboardsV2Api->new();
my $id = id_example; # String | The id of the dashboard
my $clone = WWW::OPenAPIClient::Object::Clone->new(); # Clone |
my $xOrganization = xOrganization_example; # String |
eval {
my $result = $api_instance->dashboardsV2Clone(id => $id, clone => $clone, xOrganization => $xOrganization);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DashboardsV2Api->dashboardsV2Clone: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.DashboardsV2Api()
id = id_example # String | The id of the dashboard (default to null)
clone = # Clone |
xOrganization = xOrganization_example # String | (optional) (default to null)
try:
# clone dashboards_v2
api_response = api_instance.dashboards_v2_clone(id, clone, xOrganization=xOrganization)
pprint(api_response)
except ApiException as e:
print("Exception when calling DashboardsV2Api->dashboardsV2Clone: %s\n" % e)
extern crate DashboardsV2Api;
pub fn main() {
let id = id_example; // String
let clone = ; // Clone
let xOrganization = xOrganization_example; // String
let mut context = DashboardsV2Api::Context::default();
let result = client.dashboardsV2Clone(id, clone, xOrganization, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
id* |
String
The id of the dashboard
Required
|
Name | Description |
---|---|
X-Organization |
String
|
Name | Description |
---|---|
clone * |