SIM2 API

AvailabilityZones

availabilityZonesGet

Get a list the supported availability zones.

A successful response will return a list with the supported availability zones. Zones will be grouped by Regions.


/availability_zones

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/availability_zones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AvailabilityZonesApi;

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

public class AvailabilityZonesApiExample {

    public static void main(String[] args) {
        
        AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
        try {
            array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AvailabilityZonesApi;

public class AvailabilityZonesApiExample {

    public static void main(String[] args) {
        AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
        try {
            array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
            e.printStackTrace();
        }
    }
}

AvailabilityZonesApi *apiInstance = [[AvailabilityZonesApi alloc] init];

// Get a list the supported availability zones.
[apiInstance availabilityZonesGetWithCompletionHandler: 
              ^(array[AvailabilityZones] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.AvailabilityZonesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.availabilityZonesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class availabilityZonesGetExample
    {
        public void main()
        {

            var apiInstance = new AvailabilityZonesApi();

            try
            {
                // Get a list the supported availability zones.
                array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AvailabilityZonesApi.availabilityZonesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAvailabilityZonesApi();

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

my $api_instance = WWW::SwaggerClient::AvailabilityZonesApi->new();

eval { 
    my $result = $api_instance->availabilityZonesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AvailabilityZonesApi->availabilityZonesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AvailabilityZonesApi()

try: 
    # Get a list the supported availability zones.
    api_response = api_instance.availability_zones_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AvailabilityZonesApi->availabilityZonesGet: %s\n" % e)

Parameters

Responses

Status: 201 - list of the availability zones

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Clusters

clustersClusterIdAllocatePublicIpsNumberOfIpsPut

Allocate public IPs for an existing AWS Cluster.

Allocate Public IPs for an existing AWS Cluster.


/clusters/{cluster_id}/allocate_public_ips/{number_of_ips}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/allocate_public_ips/{number_of_ips}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long numberOfIps = 789; // Long | Number of IPs to allocate.
        try {
            array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdAllocatePublicIpsNumberOfIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long numberOfIps = 789; // Long | Number of IPs to allocate.
        try {
            array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdAllocatePublicIpsNumberOfIpsPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *numberOfIps = 789; // Number of IPs to allocate.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Allocate public IPs for an existing AWS Cluster.
[apiInstance clustersClusterIdAllocatePublicIpsNumberOfIpsPutWith:clusterId
    numberOfIps:numberOfIps
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var numberOfIps = 789; // {{Long}} Number of IPs to allocate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdAllocatePublicIpsNumberOfIpsPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var numberOfIps = 789;  // Long | Number of IPs to allocate.

            try
            {
                // Allocate public IPs for an existing AWS Cluster.
                array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdAllocatePublicIpsNumberOfIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$numberOfIps = 789; // Long | Number of IPs to allocate.

try {
    $result = $api_instance->clustersClusterIdAllocatePublicIpsNumberOfIpsPut($clusterId, $numberOfIps);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $numberOfIps = 789; # Long | Number of IPs to allocate.

eval { 
    my $result = $api_instance->clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId => $clusterId, numberOfIps => $numberOfIps);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
numberOfIps = 789 # Long | Number of IPs to allocate.

try: 
    # Allocate public IPs for an existing AWS Cluster.
    api_response = api_instance.clusters_cluster_id_allocate_public_ips_number_of_ips_put(clusterId, numberOfIps)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
number_of_ips*
Long (int64)
Number of IPs to allocate.
Required

Responses

Status: 200 - Successfully allocated the requested public IPs to the cluster. A list of IPs is returned.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdCoresGet

Get a cluster's cores

A successful response will return a list of cluster's cores.


/clusters/{cluster_id}/cores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdCoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdCoresGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's cores
[apiInstance clustersClusterIdCoresGetWith:clusterId
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdCoresGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdCoresGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's cores
                array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdCoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdCoresGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdCoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's cores
    api_response = api_instance.clusters_cluster_id_cores_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's cores

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDelete

Delete cluster with specific ID

Given a cluster ID, the API will delete it from its DB. If the host is AWS the cluster will be also deleted from AWS. If the cluster is a sunlight hosted cluster it will be disconnected from the SIM. A cluster cannot be deleted if it has ongoing moves (to or from this cluster) or backups. Action can be performed only by users with `admin` role.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Delete cluster with specific ID
[apiInstance clustersClusterIdDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Delete cluster with specific ID
                apiInstance.clustersClusterIdDelete(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdDelete($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdDelete(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Delete cluster with specific ID
    api_instance.clusters_cluster_id_delete(clusterId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 204 - Cluster successfully deleted.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDisksGet

Get a cluster's disks

A successful response will return a list of only initialised cluster's disks.


/clusters/{cluster_id}/disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/disks?include_uninitialized_disks="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Boolean includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Boolean includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Boolean *includeUninitializedDisks = true; // When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's disks
[apiInstance clustersClusterIdDisksGetWith:clusterId
    includeUninitializedDisks:includeUninitializedDisks
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'includeUninitializedDisks': true // {{Boolean}} When this parameter is true, all disks ( initialised and un -initialised ) are returned.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDisksGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var includeUninitializedDisks = true;  // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional) 

            try
            {
                // Get a cluster's disks
                array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.

try {
    $result = $api_instance->clustersClusterIdDisksGet($clusterId, $includeUninitializedDisks);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $includeUninitializedDisks = true; # Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.

eval { 
    my $result = $api_instance->clustersClusterIdDisksGet(clusterId => $clusterId, includeUninitializedDisks => $includeUninitializedDisks);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
includeUninitializedDisks = true # Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional)

try: 
    # Get a cluster's disks
    api_response = api_instance.clusters_cluster_id_disks_get(clusterId, includeUninitializedDisks=includeUninitializedDisks)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
include_uninitialized_disks
Boolean
When this parameter is true, all disks ( initialised and un -initialised ) are returned.

Responses

Status: 200 - Cluster's disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdGet

Get a cluster with specific ID.

A successful response will return a cluster's details with specific ID. Action can be performed only by users with `admin` role.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            Cluster result = apiInstance.clustersClusterIdGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            Cluster result = apiInstance.clustersClusterIdGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster with specific ID.
[apiInstance clustersClusterIdGetWith:clusterId
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster with specific ID.
                Cluster result = apiInstance.clustersClusterIdGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster with specific ID.
    api_response = api_instance.clusters_cluster_id_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster with specific ID.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesGet

Get all available images of a cluster on enabled or disabled state.

A successful response will return all the available images within the specified cluster that are either enabled or disabled, with the use of a filter in the api call after the /images , images?state=enabled or images?state=disabled.


/clusters/{cluster_id}/images

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *state = state_example; // The state of images. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all available images of a cluster on enabled or disabled state.
[apiInstance clustersClusterIdImagesGetWith:clusterId
    state:state
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'state': state_example // {{String}} The state of images.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdImagesGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var state = state_example;  // String | The state of images. (optional) 

            try
            {
                // Get all available images of a cluster on enabled or disabled state.
                array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$state = state_example; // String | The state of images.

try {
    $result = $api_instance->clustersClusterIdImagesGet($clusterId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $state = state_example; # String | The state of images.

eval { 
    my $result = $api_instance->clustersClusterIdImagesGet(clusterId => $clusterId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
state = state_example # String | The state of images. (optional)

try: 
    # Get all available images of a cluster on enabled or disabled state.
    api_response = api_instance.clusters_cluster_id_images_get(clusterId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
state
String
The state of images.

Responses

Status: 200 - A list of images.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdDelete

Delete the image of a cluster with the specified image ID.

A successful response will delete the image within the specified cluster with the specified image ID.


/clusters/{cluster_id}/images/{image_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Delete the image of a cluster with the specified image ID.
[apiInstance clustersClusterIdImagesImageIdDeleteWith:clusterId
    imageId:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdImagesImageIdDelete(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Delete the image of a cluster with the specified image ID.
                apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $api_instance->clustersClusterIdImagesImageIdDelete($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    $api_instance->clustersClusterIdImagesImageIdDelete(clusterId => $clusterId, imageId => $imageId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Delete the image of a cluster with the specified image ID.
    api_instance.clusters_cluster_id_images_image_id_delete(clusterId, imageId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 204 - Successfully deleted the specified image.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdDownloadPut

Download the image of a CLuster with the specified image ID from the Virtupian.

A successful response will download the specified image locally.


/clusters/{cluster_id}/images/{image_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Download the image of a CLuster with the specified image ID from the Virtupian.
[apiInstance clustersClusterIdImagesImageIdDownloadPutWith:clusterId
    imageId:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdDownloadPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Download the image of a CLuster with the specified image ID from the Virtupian.
                apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $api_instance->clustersClusterIdImagesImageIdDownloadPut($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    $api_instance->clustersClusterIdImagesImageIdDownloadPut(clusterId => $clusterId, imageId => $imageId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Download the image of a CLuster with the specified image ID from the Virtupian.
    api_instance.clusters_cluster_id_images_image_id_download_put(clusterId, imageId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 202 - Status accepted. The image will be downloaded.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdGet

Get the image with the specified image id of the specified cluster..

A successful response will return the image within the specified cluster.


/clusters/{cluster_id}/images/{image_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get the image with the specified image id of the specified cluster..
[apiInstance clustersClusterIdImagesImageIdGetWith:clusterId
    imageId:imageId
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdImagesImageIdGet(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Get the image with the specified image id of the specified cluster..
                array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $result = $api_instance->clustersClusterIdImagesImageIdGet($clusterId, $imageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    my $result = $api_instance->clustersClusterIdImagesImageIdGet(clusterId => $clusterId, imageId => $imageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Get the image with the specified image id of the specified cluster..
    api_response = api_instance.clusters_cluster_id_images_image_id_get(clusterId, imageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 200 - The image with the specified id.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdLocationPut

Change the specified cluster's location.

A successful response will change the cluster's location.


/clusters/{cluster_id}/location

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/location"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            ClusterLocation result = apiInstance.clustersClusterIdLocationPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdLocationPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            ClusterLocation result = apiInstance.clustersClusterIdLocationPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdLocationPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Change the specified cluster's location.
[apiInstance clustersClusterIdLocationPutWith:clusterId
              completionHandler: ^(ClusterLocation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdLocationPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdLocationPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Change the specified cluster's location.
                ClusterLocation result = apiInstance.clustersClusterIdLocationPut(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdLocationPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdLocationPut(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdLocationPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Change the specified cluster's location.
    api_response = api_instance.clusters_cluster_id_location_put(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdLocationPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's location fields succesfull changed.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesGet

Get a cluster's nodes

A successful response will return a list of cluster's nodes.


/clusters/{cluster_id}/nodes

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's nodes
[apiInstance clustersClusterIdNodesGetWith:clusterId
              completionHandler: ^(array[Node] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's nodes
                array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's nodes
    api_response = api_instance.clusters_cluster_id_nodes_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's nodes

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut

Initialise an unconfigured disk.

A successful response will return Initialised disk infos.


/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks/{disk_id}/initialise

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks/{disk_id}/initialise"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.
Long *diskId = 789; // The disk id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Initialise an unconfigured disk.
[apiInstance clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePutWith:clusterId
    nodeId:nodeId
    diskId:diskId
              completionHandler: ^(Disk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.
var diskId = 789; // {{Long}} The disk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.
            var diskId = 789;  // Long | The disk id.

            try
            {
                // Initialise an unconfigured disk.
                Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.
$diskId = 789; // Long | The disk id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut($clusterId, $nodeId, $diskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.
my $diskId = 789; # Long | The disk id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId => $clusterId, nodeId => $nodeId, diskId => $diskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.
diskId = 789 # Long | The disk id.

try: 
    # Initialise an unconfigured disk.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_unconfigured_disks_disk_id_initialise_put(clusterId, nodeId, diskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required
disk_id*
Long (int64)
The disk id.
Required

Responses

Status: 200 - Initialised disk information.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdUnconfiguredDisksGet

Get a nodes' unconfigured disks.

A successful response will return a list of node's unconfigured disks.


/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a nodes' unconfigured disks.
[apiInstance clustersClusterIdNodesNodeIdUnconfiguredDisksGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdUnconfiguredDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.

            try
            {
                // Get a nodes' unconfigured disks.
                array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesNodeIdUnconfiguredDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksGet($clusterId, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId => $clusterId, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.

try: 
    # Get a nodes' unconfigured disks.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_unconfigured_disks_get(clusterId, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required

Responses

Status: 200 - Node's unconfigured disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdPcidevsGet

Get all the PCI devs of a cluster.


/clusters/{cluster_id}/pcidevs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/pcidevs?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
        try {
            array[PCIDev] result = apiInstance.clustersClusterIdPcidevsGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
        try {
            array[PCIDev] result = apiInstance.clustersClusterIdPcidevsGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *state = state_example; // Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all the PCI devs of a cluster.
[apiInstance clustersClusterIdPcidevsGetWith:clusterId
    state:state
              completionHandler: ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'state': state_example // {{String}} Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdPcidevsGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdPcidevsGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var state = state_example;  // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional) 

            try
            {
                // Get all the PCI devs of a cluster.
                array[PCIDev] result = apiInstance.clustersClusterIdPcidevsGet(clusterId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdPcidevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

try {
    $result = $api_instance->clustersClusterIdPcidevsGet($clusterId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdPcidevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $state = state_example; # String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

eval { 
    my $result = $api_instance->clustersClusterIdPcidevsGet(clusterId => $clusterId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdPcidevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
state = state_example # String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional)

try: 
    # Get all the PCI devs of a cluster.
    api_response = api_instance.clusters_cluster_id_pcidevs_get(clusterId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdPcidevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
state
String
Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

Responses

Status: 200 - A list of PCI devices.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdPltdevsGet

Get all the Platform devices of a resource group.


/clusters/{cluster_id}/pltdevs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/pltdevs?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.
        try {
            array[PLTDev] result = apiInstance.clustersClusterIdPltdevsGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.
        try {
            array[PLTDev] result = apiInstance.clustersClusterIdPltdevsGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *state = state_example; // Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all the Platform devices of a resource group.
[apiInstance clustersClusterIdPltdevsGetWith:clusterId
    state:state
              completionHandler: ^(array[PLTDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'state': state_example // {{String}} Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdPltdevsGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdPltdevsGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var state = state_example;  // String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty. (optional) 

            try
            {
                // Get all the Platform devices of a resource group.
                array[PLTDev] result = apiInstance.clustersClusterIdPltdevsGet(clusterId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdPltdevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.

try {
    $result = $api_instance->clustersClusterIdPltdevsGet($clusterId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdPltdevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $state = state_example; # String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.

eval { 
    my $result = $api_instance->clustersClusterIdPltdevsGet(clusterId => $clusterId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdPltdevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
state = state_example # String | Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty. (optional)

try: 
    # Get all the Platform devices of a resource group.
    api_response = api_instance.clusters_cluster_id_pltdevs_get(clusterId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdPltdevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
state
String
Filter PCI devs based on their state. Accepted parameters are 'reserved' , 'available' and empty.

Responses

Status: 200 - A list of Platform devices.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdReleasePublicIpsPut

Release all allocated public IPs for an existing AWS Cluster.

Release all allocated public IPs for an existing AWS Cluster.


/clusters/{cluster_id}/release_public_ips

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/release_public_ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdReleasePublicIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdReleasePublicIpsPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Release all allocated public IPs for an existing AWS Cluster.
[apiInstance clustersClusterIdReleasePublicIpsPutWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdReleasePublicIpsPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdReleasePublicIpsPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Release all allocated public IPs for an existing AWS Cluster.
                apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdReleasePublicIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdReleasePublicIpsPut($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdReleasePublicIpsPut(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Release all allocated public IPs for an existing AWS Cluster.
    api_instance.clusters_cluster_id_release_public_ips_put(clusterId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Successfully released public IPs from the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdResourceGroupsGet

Get resource groups of a cluster.

A successful response will return a list of the resource groups of the specified cluster.


/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get resource groups of a cluster.
[apiInstance clustersClusterIdResourceGroupsGetWith:clusterId
              completionHandler: ^(array[ResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get resource groups of a cluster.
                array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdResourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get resource groups of a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of resource groups.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdResourceGroupsResourceGroupIdGet

Get a resource group of a cluster.

A successful response will return the specified resource group of the specified cluster.


/clusters/{cluster_id}/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *resourceGroupId = 789; // The resource group id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a resource group of a cluster.
[apiInstance clustersClusterIdResourceGroupsResourceGroupIdGetWith:clusterId
    resourceGroupId:resourceGroupId
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsResourceGroupIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get a resource group of a cluster.
                ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdResourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$resourceGroupId = 789; // Long | The resource group id.

try {
    $result = $api_instance->clustersClusterIdResourceGroupsResourceGroupIdGet($clusterId, $resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId => $clusterId, resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get a resource group of a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_resource_group_id_get(clusterId, resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - The resource group of the cluster.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdUnconfiguredDisksGet

Get a cluster's unconfigured disks

A successful response will return a list of cluster's unconfigured disks.


/clusters/{cluster_id}/unconfigured_disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/unconfigured_disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's unconfigured disks
[apiInstance clustersClusterIdUnconfiguredDisksGetWith:clusterId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdUnconfiguredDisksGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdUnconfiguredDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's unconfigured disks
                array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdUnconfiguredDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdUnconfiguredDisksGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdUnconfiguredDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's unconfigured disks
    api_response = api_instance.clusters_cluster_id_unconfigured_disks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdUnconfiguredDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's unconfigured disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersCreatePost

Create A new AWS hosted cluster.

Create an new AWS cluster. Connect to the newly created cluster.


/clusters/create

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        CreateCluster body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

        try {
            Cluster result = apiInstance.clustersCreatePost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersCreatePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        CreateCluster body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

        try {
            Cluster result = apiInstance.clustersCreatePost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersCreatePost");
            e.printStackTrace();
        }
    }
}
CreateCluster *body = ; // The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Create A new AWS hosted cluster.
[apiInstance clustersCreatePostWith:body
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var opts = { 
  'body':  // {{CreateCluster}} The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersCreatePost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersCreatePostExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var body = new CreateCluster(); // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional) 

            try
            {
                // Create A new AWS hosted cluster.
                Cluster result = apiInstance.clustersCreatePost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersCreatePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)


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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $body = WWW::SwaggerClient::Object::CreateCluster->new(); # CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)


eval { 
    my $result = $api_instance->clustersCreatePost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersCreatePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
body =  # CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional)

try: 
    # Create A new AWS hosted cluster.
    api_response = api_instance.clusters_create_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersCreatePost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster creation.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersGet

Get all available clusters.

A successful response will return a list with all the available clusters. Action can be performed only by users with `admin` role.


/clusters

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        try {
            array[Cluster] result = apiInstance.clustersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        try {
            array[Cluster] result = apiInstance.clustersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersGet");
            e.printStackTrace();
        }
    }
}

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all available clusters.
[apiInstance clustersGetWithCompletionHandler: 
              ^(array[Cluster] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();

            try
            {
                // Get all available clusters.
                array[Cluster] result = apiInstance.clustersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();

eval { 
    my $result = $api_instance->clustersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()

try: 
    # Get all available clusters.
    api_response = api_instance.clusters_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of clusters.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersHostInfoGet

Get Cluster's host info (ip and port).

A successful response will return an available random cluster port between 7000 and 8000 and the SIMs IP. Action can be performed only by users with `admin` role.


/clusters/host_info

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/host_info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        try {
            ClusterHostInfo result = apiInstance.clustersHostInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersHostInfoGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        try {
            ClusterHostInfo result = apiInstance.clustersHostInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersHostInfoGet");
            e.printStackTrace();
        }
    }
}

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get Cluster's host info (ip and port).
[apiInstance clustersHostInfoGetWithCompletionHandler: 
              ^(ClusterHostInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersHostInfoGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersHostInfoGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();

            try
            {
                // Get Cluster's host info (ip and port).
                ClusterHostInfo result = apiInstance.clustersHostInfoGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersHostInfoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();

eval { 
    my $result = $api_instance->clustersHostInfoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersHostInfoGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()

try: 
    # Get Cluster's host info (ip and port).
    api_response = api_instance.clusters_host_info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersHostInfoGet: %s\n" % e)

Parameters

Responses

Status: 200 - An available random port and SIM's IP.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersPost

Create connection with an existing Cluster.

Connect with an existing cluster. It is advised to use GET `/clusters/host_info` in order to retrieve an available port and the SIM's public IP address. Action can be performed only by users with `admin` role.


/clusters

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

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

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        AddCluster body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

        try {
            Cluster result = apiInstance.clustersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        AddCluster body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

        try {
            Cluster result = apiInstance.clustersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersPost");
            e.printStackTrace();
        }
    }
}
AddCluster *body = ; // The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Create connection with an existing Cluster.
[apiInstance clustersPostWith:body
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var opts = { 
  'body':  // {{AddCluster}} The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersPostExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var body = new AddCluster(); // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional) 

            try
            {
                // Create connection with an existing Cluster.
                Cluster result = apiInstance.clustersPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)


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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $body = WWW::SwaggerClient::Object::AddCluster->new(); # AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)


eval { 
    my $result = $api_instance->clustersPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
body =  # AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional)

try: 
    # Create connection with an existing Cluster.
    api_response = api_instance.clusters_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster addition.

Status: 400 - Cluster could not be created.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Datastores

clustersClusterIdDatastoresDatastoreIdDelete

Delete a datastore from a cluster.

The endpoint deletes a datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *datastoreId = 789; // The datastore id.

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Delete a datastore from a cluster.
[apiInstance clustersClusterIdDatastoresDatastoreIdDeleteWith:clusterId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresDatastoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Delete a datastore from a cluster.
                apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->clustersClusterIdDatastoresDatastoreIdDelete($clusterId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->clustersClusterIdDatastoresDatastoreIdDelete(clusterId => $clusterId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Delete a datastore from a cluster.
    api_instance.clusters_cluster_id_datastores_datastore_id_delete(clusterId, datastoreId)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore deleted successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDatastoresDatastoreIdDisksGet

Get the disks of a specific datastore.


/clusters/{cluster_id}/datastores/{datastore_id}/disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/datastores/{datastore_id}/disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *datastoreId = 789; // The datastore id.

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Get the disks of a specific datastore.
[apiInstance clustersClusterIdDatastoresDatastoreIdDisksGetWith:clusterId
    datastoreId:datastoreId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresDatastoreIdDisksGetExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Get the disks of a specific datastore.
                array[Disk] result = apiInstance.clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->clustersClusterIdDatastoresDatastoreIdDisksGet($clusterId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId => $clusterId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Get the disks of a specific datastore.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_disks_get(clusterId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 200 - A list of datastore's disks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDatastoresDatastoreIdGet

Get a datastore of a cluster.

The endpoint gets the datastore based on the ID and the cluster ID.


/clusters/{cluster_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdGet(clusterId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdGet(clusterId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *datastoreId = 789; // The datastore id.

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Get a datastore of a cluster.
[apiInstance clustersClusterIdDatastoresDatastoreIdGetWith:clusterId
    datastoreId:datastoreId
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresDatastoreIdGet(clusterId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresDatastoreIdGetExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Get a datastore of a cluster.
                Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdGet(clusterId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->clustersClusterIdDatastoresDatastoreIdGet($clusterId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->clustersClusterIdDatastoresDatastoreIdGet(clusterId => $clusterId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Get a datastore of a cluster.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_get(clusterId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 200 - Datastore retrieved successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDatastoresDatastoreIdPut

Edit a datastore.

The endpoint edits a datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        EditDatastore body = ; // EditDatastore | The datastore to edit.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdPut(clusterId, datastoreId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        EditDatastore body = ; // EditDatastore | The datastore to edit.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdPut(clusterId, datastoreId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *datastoreId = 789; // The datastore id.
EditDatastore *body = ; // The datastore to edit. (optional)

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Edit a datastore.
[apiInstance clustersClusterIdDatastoresDatastoreIdPutWith:clusterId
    datastoreId:datastoreId
    body:body
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.
var opts = { 
  'body':  // {{EditDatastore}} The datastore to edit.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresDatastoreIdPut(clusterIddatastoreId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresDatastoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.
            var body = new EditDatastore(); // EditDatastore | The datastore to edit. (optional) 

            try
            {
                // Edit a datastore.
                Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdPut(clusterId, datastoreId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$datastoreId = 789; // Long | The datastore id.
$body = ; // EditDatastore | The datastore to edit.

try {
    $result = $api_instance->clustersClusterIdDatastoresDatastoreIdPut($clusterId, $datastoreId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $datastoreId = 789; # Long | The datastore id.
my $body = WWW::SwaggerClient::Object::EditDatastore->new(); # EditDatastore | The datastore to edit.

eval { 
    my $result = $api_instance->clustersClusterIdDatastoresDatastoreIdPut(clusterId => $clusterId, datastoreId => $datastoreId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
datastoreId = 789 # Long | The datastore id.
body =  # EditDatastore | The datastore to edit. (optional)

try: 
    # Edit a datastore.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_put(clusterId, datastoreId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
datastore_id*
Long (int64)
The datastore id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Datastore edited successfully.

Status: 204 - Datastore edited successfully but deleted. In case no disks are provided datastore will be deleted.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDatastoresGet

Get a list of the cluster's datastores


/clusters/{cluster_id}/datastores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/datastores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Datastore] result = apiInstance.clustersClusterIdDatastoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Datastore] result = apiInstance.clustersClusterIdDatastoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Get a list of the cluster's datastores
[apiInstance clustersClusterIdDatastoresGetWith:clusterId
              completionHandler: ^(array[Datastore] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresGetExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a list of the cluster's datastores
                array[Datastore] result = apiInstance.clustersClusterIdDatastoresGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdDatastoresGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a list of the cluster's datastores
    api_response = api_instance.clusters_cluster_id_datastores_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - List of datastores.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDatastoresPost

Create new datastore in a cluster.

The endpoint creates a new datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/datastores

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/datastores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        NewDatastore body = ; // NewDatastore | The datastore to create.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        NewDatastore body = ; // NewDatastore | The datastore to create.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewDatastore *body = ; // The datastore to create. (optional)

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Create new datastore in a cluster.
[apiInstance clustersClusterIdDatastoresPostWith:clusterId
    body:body
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewDatastore}} The datastore to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresPostExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewDatastore(); // NewDatastore | The datastore to create. (optional) 

            try
            {
                // Create new datastore in a cluster.
                Datastore result = apiInstance.clustersClusterIdDatastoresPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewDatastore | The datastore to create.

try {
    $result = $api_instance->clustersClusterIdDatastoresPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewDatastore->new(); # NewDatastore | The datastore to create.

eval { 
    my $result = $api_instance->clustersClusterIdDatastoresPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
body =  # NewDatastore | The datastore to create. (optional)

try: 
    # Create new datastore in a cluster.
    api_response = api_instance.clusters_cluster_id_datastores_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Datastore created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

DateAndTime

dateAndTimeGet

Retrieves the date and time of the system.

A successful response will fetch the date and time of the SIM vm.


/date_and_time

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"/api/date_and_time"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            DateAndTime result = apiInstance.dateAndTimeGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            DateAndTime result = apiInstance.dateAndTimeGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeGet");
            e.printStackTrace();
        }
    }
}

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Retrieves the date and time of the system.
[apiInstance dateAndTimeGetWithCompletionHandler: 
              ^(DateAndTime output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dateAndTimeGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeGetExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();

            try
            {
                // Retrieves the date and time of the system.
                DateAndTime result = apiInstance.dateAndTimeGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();

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

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();

eval { 
    my $result = $api_instance->dateAndTimeGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()

try: 
    # Retrieves the date and time of the system.
    api_response = api_instance.date_and_time_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeGet: %s\n" % e)

Parameters

Responses

Status: 200 - The date and time in json form.


dateAndTimeNtpServerDisablePut

Disable NTPD service

NTP server stops to run on SIM VM. It become disable so it will not keep running after VM restart.


/date_and_time/ntp_server/disable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/date_and_time/ntp_server/disable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            apiInstance.dateAndTimeNtpServerDisablePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServerDisablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            apiInstance.dateAndTimeNtpServerDisablePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServerDisablePut");
            e.printStackTrace();
        }
    }
}

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Disable NTPD service
[apiInstance dateAndTimeNtpServerDisablePutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.dateAndTimeNtpServerDisablePut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeNtpServerDisablePutExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();

            try
            {
                // Disable NTPD service
                apiInstance.dateAndTimeNtpServerDisablePut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeNtpServerDisablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();

try {
    $api_instance->dateAndTimeNtpServerDisablePut();
} catch (Exception $e) {
    echo 'Exception when calling DateAndTimeApi->dateAndTimeNtpServerDisablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DateAndTimeApi;

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();

eval { 
    $api_instance->dateAndTimeNtpServerDisablePut();
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeNtpServerDisablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()

try: 
    # Disable NTPD service
    api_instance.date_and_time_ntp_server_disable_put()
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeNtpServerDisablePut: %s\n" % e)

Parameters

Responses

Status: 200 - Successfully disable ntpd service.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dateAndTimeNtpServerEnablePut

Enable NTPD service

NTP server starts to run on SIM VM. It become enable so it will keep running even after VM restart. The NTP server will run on the public IP of the SIM VM


/date_and_time/ntp_server/enable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/date_and_time/ntp_server/enable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            apiInstance.dateAndTimeNtpServerEnablePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServerEnablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            apiInstance.dateAndTimeNtpServerEnablePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServerEnablePut");
            e.printStackTrace();
        }
    }
}

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Enable NTPD service
[apiInstance dateAndTimeNtpServerEnablePutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.dateAndTimeNtpServerEnablePut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeNtpServerEnablePutExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();

            try
            {
                // Enable NTPD service
                apiInstance.dateAndTimeNtpServerEnablePut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeNtpServerEnablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();

try {
    $api_instance->dateAndTimeNtpServerEnablePut();
} catch (Exception $e) {
    echo 'Exception when calling DateAndTimeApi->dateAndTimeNtpServerEnablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DateAndTimeApi;

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();

eval { 
    $api_instance->dateAndTimeNtpServerEnablePut();
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeNtpServerEnablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()

try: 
    # Enable NTPD service
    api_instance.date_and_time_ntp_server_enable_put()
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeNtpServerEnablePut: %s\n" % e)

Parameters

Responses

Status: 200 - Successfully enable ntpd service.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dateAndTimeNtpServersGet

Retrieve the configure ntp servers of the system.

A successful response will fetch all the ntp servers that are set of the SIM vm.


/date_and_time/ntp_servers

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/date_and_time/ntp_servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            NTP_servers result = apiInstance.dateAndTimeNtpServersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            NTP_servers result = apiInstance.dateAndTimeNtpServersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServersGet");
            e.printStackTrace();
        }
    }
}

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Retrieve the configure ntp servers of the system.
[apiInstance dateAndTimeNtpServersGetWithCompletionHandler: 
              ^(NTP_servers output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dateAndTimeNtpServersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeNtpServersGetExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();

            try
            {
                // Retrieve the configure ntp servers of the system.
                NTP_servers result = apiInstance.dateAndTimeNtpServersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeNtpServersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();

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

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();

eval { 
    my $result = $api_instance->dateAndTimeNtpServersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeNtpServersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()

try: 
    # Retrieve the configure ntp servers of the system.
    api_response = api_instance.date_and_time_ntp_servers_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeNtpServersGet: %s\n" % e)

Parameters

Responses

Status: 200 - The ntp servers of the system.

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dateAndTimeNtpServersPut

Set a new pool of ntp servers.

A successful response will set a new pool of ntp servers. NTP service will be restarted.


/date_and_time/ntp_servers

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/date_and_time/ntp_servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        array[String] body = ; // array[String] | The selected NTP servers will be added in ntp service config file.
        try {
            apiInstance.dateAndTimeNtpServersPut(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServersPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        array[String] body = ; // array[String] | The selected NTP servers will be added in ntp service config file.
        try {
            apiInstance.dateAndTimeNtpServersPut(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeNtpServersPut");
            e.printStackTrace();
        }
    }
}
array[String] *body = ; // The selected NTP servers will be added in ntp service config file. (optional)

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Set a new pool of ntp servers.
[apiInstance dateAndTimeNtpServersPutWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var opts = { 
  'body':  // {{array[String]}} The selected NTP servers will be added in ntp service config file.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.dateAndTimeNtpServersPut(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeNtpServersPutExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();
            var body = new array[String](); // array[String] | The selected NTP servers will be added in ntp service config file. (optional) 

            try
            {
                // Set a new pool of ntp servers.
                apiInstance.dateAndTimeNtpServersPut(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeNtpServersPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();
$body = ; // array[String] | The selected NTP servers will be added in ntp service config file.

try {
    $api_instance->dateAndTimeNtpServersPut($body);
} catch (Exception $e) {
    echo 'Exception when calling DateAndTimeApi->dateAndTimeNtpServersPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DateAndTimeApi;

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | The selected NTP servers will be added in ntp service config file.

eval { 
    $api_instance->dateAndTimeNtpServersPut(body => $body);
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeNtpServersPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()
body =  # array[String] | The selected NTP servers will be added in ntp service config file. (optional)

try: 
    # Set a new pool of ntp servers.
    api_instance.date_and_time_ntp_servers_put(body=body)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeNtpServersPut: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The date and time in json form.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dateAndTimeTimezonesGet

Retrieves the available timezones of the system.

A successful response will fetch all the available timezones of the SIM vm.


/date_and_time/timezones

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/date_and_time/timezones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            AvailableTimezones result = apiInstance.dateAndTimeTimezonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        try {
            AvailableTimezones result = apiInstance.dateAndTimeTimezonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesGet");
            e.printStackTrace();
        }
    }
}

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Retrieves the available timezones of the system.
[apiInstance dateAndTimeTimezonesGetWithCompletionHandler: 
              ^(AvailableTimezones output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dateAndTimeTimezonesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeTimezonesGetExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();

            try
            {
                // Retrieves the available timezones of the system.
                AvailableTimezones result = apiInstance.dateAndTimeTimezonesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeTimezonesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();

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

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();

eval { 
    my $result = $api_instance->dateAndTimeTimezonesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeTimezonesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()

try: 
    # Retrieves the available timezones of the system.
    api_response = api_instance.date_and_time_timezones_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeTimezonesGet: %s\n" % e)

Parameters

Responses

Status: 200 - The available timezones of the system.

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dateAndTimeTimezonesPut

Set the timezone of the system.

A successful response will set the timezones of the SIM vm.


/date_and_time/timezones

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/date_and_time/timezones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        SelectTimeZone body = ; // SelectTimeZone | The selected timezone will be set in the system.
        try {
            apiInstance.dateAndTimeTimezonesPut(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        SelectTimeZone body = ; // SelectTimeZone | The selected timezone will be set in the system.
        try {
            apiInstance.dateAndTimeTimezonesPut(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesPut");
            e.printStackTrace();
        }
    }
}
SelectTimeZone *body = ; // The selected timezone will be set in the system. (optional)

DateAndTimeApi *apiInstance = [[DateAndTimeApi alloc] init];

// Set the timezone of the system.
[apiInstance dateAndTimeTimezonesPutWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DateAndTimeApi()
var opts = { 
  'body':  // {{SelectTimeZone}} The selected timezone will be set in the system.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.dateAndTimeTimezonesPut(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dateAndTimeTimezonesPutExample
    {
        public void main()
        {

            var apiInstance = new DateAndTimeApi();
            var body = new SelectTimeZone(); // SelectTimeZone | The selected timezone will be set in the system. (optional) 

            try
            {
                // Set the timezone of the system.
                apiInstance.dateAndTimeTimezonesPut(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeTimezonesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDateAndTimeApi();
$body = ; // SelectTimeZone | The selected timezone will be set in the system.

try {
    $api_instance->dateAndTimeTimezonesPut($body);
} catch (Exception $e) {
    echo 'Exception when calling DateAndTimeApi->dateAndTimeTimezonesPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DateAndTimeApi;

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();
my $body = WWW::SwaggerClient::Object::SelectTimeZone->new(); # SelectTimeZone | The selected timezone will be set in the system.

eval { 
    $api_instance->dateAndTimeTimezonesPut(body => $body);
};
if ($@) {
    warn "Exception when calling DateAndTimeApi->dateAndTimeTimezonesPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()
body =  # SelectTimeZone | The selected timezone will be set in the system. (optional)

try: 
    # Set the timezone of the system.
    api_instance.date_and_time_timezones_put(body=body)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeTimezonesPut: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The date and time in json form.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

DbBackups

dbBackupsBackupNamePut

Restore SIM's DB from an existing backup

A successful response will return 204 and provide instructions on how to restore the DB from the specified backup. Action can be performed only by users with `admin` role.


/db_backups/{backup_name}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/db_backups/{backup_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

    public static void main(String[] args) {
        
        DbBackupsApi apiInstance = new DbBackupsApi();
        String backupName = backupName_example; // String | The backup's name.
        try {
            DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupsApi;

public class DbBackupsApiExample {

    public static void main(String[] args) {
        DbBackupsApi apiInstance = new DbBackupsApi();
        String backupName = backupName_example; // String | The backup's name.
        try {
            DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
String *backupName = backupName_example; // The backup's name.

DbBackupsApi *apiInstance = [[DbBackupsApi alloc] init];

// Restore SIM's DB from an existing backup
[apiInstance dbBackupsBackupNamePutWith:backupName
              completionHandler: ^(DBRestoreUsage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DbBackupsApi()
var backupName = backupName_example; // {{String}} The backup's name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dbBackupsBackupNamePut(backupName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dbBackupsBackupNamePutExample
    {
        public void main()
        {

            var apiInstance = new DbBackupsApi();
            var backupName = backupName_example;  // String | The backup's name.

            try
            {
                // Restore SIM's DB from an existing backup
                DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsBackupNamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDbBackupsApi();
$backupName = backupName_example; // String | The backup's name.

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

my $api_instance = WWW::SwaggerClient::DbBackupsApi->new();
my $backupName = backupName_example; # String | The backup's name.

eval { 
    my $result = $api_instance->dbBackupsBackupNamePut(backupName => $backupName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DbBackupsApi->dbBackupsBackupNamePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DbBackupsApi()
backupName = backupName_example # String | The backup's name.

try: 
    # Restore SIM's DB from an existing backup
    api_response = api_instance.db_backups_backup_name_put(backupName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsBackupNamePut: %s\n" % e)

Parameters

Path parameters
Name Description
backup_name*
String
The backup's name.
Required

Responses

Status: 202 - DB Restore can be initiated with the manual procedure described in the response.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dbBackupsGet

Get a list of available backups of the SIM DB

A successful response will return a list of available SIM's DB backups. Action can be performed only by users with `admin` role.


/db_backups

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

    public static void main(String[] args) {
        
        DbBackupsApi apiInstance = new DbBackupsApi();
        try {
            array[DBBackup] result = apiInstance.dbBackupsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupsApi;

public class DbBackupsApiExample {

    public static void main(String[] args) {
        DbBackupsApi apiInstance = new DbBackupsApi();
        try {
            array[DBBackup] result = apiInstance.dbBackupsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsGet");
            e.printStackTrace();
        }
    }
}

DbBackupsApi *apiInstance = [[DbBackupsApi alloc] init];

// Get a list of available backups of the SIM DB
[apiInstance dbBackupsGetWithCompletionHandler: 
              ^(array[DBBackup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DbBackupsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dbBackupsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dbBackupsGetExample
    {
        public void main()
        {

            var apiInstance = new DbBackupsApi();

            try
            {
                // Get a list of available backups of the SIM DB
                array[DBBackup] result = apiInstance.dbBackupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDbBackupsApi();

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

my $api_instance = WWW::SwaggerClient::DbBackupsApi->new();

eval { 
    my $result = $api_instance->dbBackupsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DbBackupsApi->dbBackupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DbBackupsApi()

try: 
    # Get a list of available backups of the SIM DB
    api_response = api_instance.db_backups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available SIM's DB backups

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

dbBackupsPost

Create a new backup of the SIM DB

A successful response will make a SIM's DB backup. A backup is copied to AWS S3 is SIM is deployed on AWS. Action can be performed only by users with `admin` role.


/db_backups

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

    public static void main(String[] args) {
        
        DbBackupsApi apiInstance = new DbBackupsApi();
        try {
            apiInstance.dbBackupsPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupsApi;

public class DbBackupsApiExample {

    public static void main(String[] args) {
        DbBackupsApi apiInstance = new DbBackupsApi();
        try {
            apiInstance.dbBackupsPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsPost");
            e.printStackTrace();
        }
    }
}

DbBackupsApi *apiInstance = [[DbBackupsApi alloc] init];

// Create a new backup of the SIM DB
[apiInstance dbBackupsPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DbBackupsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.dbBackupsPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dbBackupsPostExample
    {
        public void main()
        {

            var apiInstance = new DbBackupsApi();

            try
            {
                // Create a new backup of the SIM DB
                apiInstance.dbBackupsPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDbBackupsApi();

try {
    $api_instance->dbBackupsPost();
} catch (Exception $e) {
    echo 'Exception when calling DbBackupsApi->dbBackupsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DbBackupsApi;

my $api_instance = WWW::SwaggerClient::DbBackupsApi->new();

eval { 
    $api_instance->dbBackupsPost();
};
if ($@) {
    warn "Exception when calling DbBackupsApi->dbBackupsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DbBackupsApi()

try: 
    # Create a new backup of the SIM DB
    api_instance.db_backups_post()
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsPost: %s\n" % e)

Parameters

Responses

Status: 200 - Backup created successfully

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

DhcpSubnets

clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete

Delete a DHCP Subnet from a cluster.

The endpoint deletes a datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/dhcp_subnets/{dhcp_subnet_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/dhcp_subnets/{dhcp_subnet_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long dhcpSubnetId = 789; // Long | The dhcp subnet id.
        try {
            apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete(clusterId, dhcpSubnetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long dhcpSubnetId = 789; // Long | The dhcp subnet id.
        try {
            apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete(clusterId, dhcpSubnetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *dhcpSubnetId = 789; // The dhcp subnet id.

DhcpSubnetsApi *apiInstance = [[DhcpSubnetsApi alloc] init];

// Delete a DHCP Subnet from a cluster.
[apiInstance clustersClusterIdDhcpSubnetsDhcpSubnetIdDeleteWith:clusterId
    dhcpSubnetId:dhcpSubnetId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DhcpSubnetsApi()
var clusterId = 789; // {{Long}} The cluster id.
var dhcpSubnetId = 789; // {{Long}} The dhcp subnet id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete(clusterId, dhcpSubnetId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDhcpSubnetsDhcpSubnetIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new DhcpSubnetsApi();
            var clusterId = 789;  // Long | The cluster id.
            var dhcpSubnetId = 789;  // Long | The dhcp subnet id.

            try
            {
                // Delete a DHCP Subnet from a cluster.
                apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete(clusterId, dhcpSubnetId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDhcpSubnetsApi();
$clusterId = 789; // Long | The cluster id.
$dhcpSubnetId = 789; // Long | The dhcp subnet id.

try {
    $api_instance->clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete($clusterId, $dhcpSubnetId);
} catch (Exception $e) {
    echo 'Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DhcpSubnetsApi;

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $dhcpSubnetId = 789; # Long | The dhcp subnet id.

eval { 
    $api_instance->clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete(clusterId => $clusterId, dhcpSubnetId => $dhcpSubnetId);
};
if ($@) {
    warn "Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
clusterId = 789 # Long | The cluster id.
dhcpSubnetId = 789 # Long | The dhcp subnet id.

try: 
    # Delete a DHCP Subnet from a cluster.
    api_instance.clusters_cluster_id_dhcp_subnets_dhcp_subnet_id_delete(clusterId, dhcpSubnetId)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
dhcp_subnet_id*
Long (int64)
The dhcp subnet id.
Required

Responses

Status: 204 - DHCP Subnet deleted succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDhcpSubnetsDhcpSubnetIdGet

Get a DHCP Subnet of a cluster.

The endpoint gets the DHCP Subnet based on the ID and the cluster ID.


/clusters/{cluster_id}/dhcp_subnets/{dhcp_subnet_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/dhcp_subnets/{dhcp_subnet_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long dhcpSubnetId = 789; // Long | The dhcp subnet id.
        try {
            DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdGet(clusterId, dhcpSubnetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsDhcpSubnetIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long dhcpSubnetId = 789; // Long | The dhcp subnet id.
        try {
            DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdGet(clusterId, dhcpSubnetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsDhcpSubnetIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *dhcpSubnetId = 789; // The dhcp subnet id.

DhcpSubnetsApi *apiInstance = [[DhcpSubnetsApi alloc] init];

// Get a DHCP Subnet of a cluster.
[apiInstance clustersClusterIdDhcpSubnetsDhcpSubnetIdGetWith:clusterId
    dhcpSubnetId:dhcpSubnetId
              completionHandler: ^(DhcpSubnet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DhcpSubnetsApi()
var clusterId = 789; // {{Long}} The cluster id.
var dhcpSubnetId = 789; // {{Long}} The dhcp subnet id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDhcpSubnetsDhcpSubnetIdGet(clusterId, dhcpSubnetId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDhcpSubnetsDhcpSubnetIdGetExample
    {
        public void main()
        {

            var apiInstance = new DhcpSubnetsApi();
            var clusterId = 789;  // Long | The cluster id.
            var dhcpSubnetId = 789;  // Long | The dhcp subnet id.

            try
            {
                // Get a DHCP Subnet of a cluster.
                DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsDhcpSubnetIdGet(clusterId, dhcpSubnetId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.clustersClusterIdDhcpSubnetsDhcpSubnetIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDhcpSubnetsApi();
$clusterId = 789; // Long | The cluster id.
$dhcpSubnetId = 789; // Long | The dhcp subnet id.

try {
    $result = $api_instance->clustersClusterIdDhcpSubnetsDhcpSubnetIdGet($clusterId, $dhcpSubnetId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DhcpSubnetsApi;

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $dhcpSubnetId = 789; # Long | The dhcp subnet id.

eval { 
    my $result = $api_instance->clustersClusterIdDhcpSubnetsDhcpSubnetIdGet(clusterId => $clusterId, dhcpSubnetId => $dhcpSubnetId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
clusterId = 789 # Long | The cluster id.
dhcpSubnetId = 789 # Long | The dhcp subnet id.

try: 
    # Get a DHCP Subnet of a cluster.
    api_response = api_instance.clusters_cluster_id_dhcp_subnets_dhcp_subnet_id_get(clusterId, dhcpSubnetId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsDhcpSubnetIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
dhcp_subnet_id*
Long (int64)
The dhcp subnet id.
Required

Responses

Status: 200 - DHCP Subnet retrieved succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDhcpSubnetsGet

Get the list the cluster's DHCP Subnets


/clusters/{cluster_id}/dhcp_subnets

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/dhcp_subnets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[DhcpSubnet] result = apiInstance.clustersClusterIdDhcpSubnetsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[DhcpSubnet] result = apiInstance.clustersClusterIdDhcpSubnetsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

DhcpSubnetsApi *apiInstance = [[DhcpSubnetsApi alloc] init];

// Get the list the cluster's DHCP Subnets
[apiInstance clustersClusterIdDhcpSubnetsGetWith:clusterId
              completionHandler: ^(array[DhcpSubnet] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DhcpSubnetsApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDhcpSubnetsGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDhcpSubnetsGetExample
    {
        public void main()
        {

            var apiInstance = new DhcpSubnetsApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get the list the cluster's DHCP Subnets
                array[DhcpSubnet] result = apiInstance.clustersClusterIdDhcpSubnetsGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.clustersClusterIdDhcpSubnetsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDhcpSubnetsApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdDhcpSubnetsGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get the list the cluster's DHCP Subnets
    api_response = api_instance.clusters_cluster_id_dhcp_subnets_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - List of DHCP Subnets.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDhcpSubnetsPost

Create new DHCP Subnet in a cluster.

The endpoint creates a new DHCP Subnet. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/dhcp_subnets

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/dhcp_subnets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewDhcpSubnet body = ; // NewDhcpSubnet | The DHCP Subnet to create.
        try {
            DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewDhcpSubnet body = ; // NewDhcpSubnet | The DHCP Subnet to create.
        try {
            DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#clustersClusterIdDhcpSubnetsPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewDhcpSubnet *body = ; // The DHCP Subnet to create. (optional)

DhcpSubnetsApi *apiInstance = [[DhcpSubnetsApi alloc] init];

// Create new DHCP Subnet in a cluster.
[apiInstance clustersClusterIdDhcpSubnetsPostWith:clusterId
    body:body
              completionHandler: ^(DhcpSubnet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DhcpSubnetsApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewDhcpSubnet}} The DHCP Subnet to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDhcpSubnetsPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDhcpSubnetsPostExample
    {
        public void main()
        {

            var apiInstance = new DhcpSubnetsApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewDhcpSubnet(); // NewDhcpSubnet | The DHCP Subnet to create. (optional) 

            try
            {
                // Create new DHCP Subnet in a cluster.
                DhcpSubnet result = apiInstance.clustersClusterIdDhcpSubnetsPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.clustersClusterIdDhcpSubnetsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDhcpSubnetsApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewDhcpSubnet | The DHCP Subnet to create.

try {
    $result = $api_instance->clustersClusterIdDhcpSubnetsPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DhcpSubnetsApi;

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewDhcpSubnet->new(); # NewDhcpSubnet | The DHCP Subnet to create.

eval { 
    my $result = $api_instance->clustersClusterIdDhcpSubnetsPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
clusterId = 789 # Long | The cluster id.
body =  # NewDhcpSubnet | The DHCP Subnet to create. (optional)

try: 
    # Create new DHCP Subnet in a cluster.
    api_response = api_instance.clusters_cluster_id_dhcp_subnets_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->clustersClusterIdDhcpSubnetsPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - DHCP Subnet created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Disks

clustersClusterIdDisksDiskIdInitializedGet

Get an initialized disk details.

A successful response will return the disk details.


/clusters/{cluster_id}/disks/{disk_id}/initialized

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/disks/{disk_id}/initialized"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DisksApi;

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

public class DisksApiExample {

    public static void main(String[] args) {
        
        DisksApi apiInstance = new DisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdDisksDiskIdInitializedGet(clusterId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#clustersClusterIdDisksDiskIdInitializedGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DisksApi;

public class DisksApiExample {

    public static void main(String[] args) {
        DisksApi apiInstance = new DisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdDisksDiskIdInitializedGet(clusterId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#clustersClusterIdDisksDiskIdInitializedGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *diskId = 789; // The disk id.

DisksApi *apiInstance = [[DisksApi alloc] init];

// Get an initialized disk details.
[apiInstance clustersClusterIdDisksDiskIdInitializedGetWith:clusterId
    diskId:diskId
              completionHandler: ^(Disk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var diskId = 789; // {{Long}} The disk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDisksDiskIdInitializedGet(clusterId, diskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDisksDiskIdInitializedGetExample
    {
        public void main()
        {

            var apiInstance = new DisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var diskId = 789;  // Long | The disk id.

            try
            {
                // Get an initialized disk details.
                Disk result = apiInstance.clustersClusterIdDisksDiskIdInitializedGet(clusterId, diskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DisksApi.clustersClusterIdDisksDiskIdInitializedGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDisksApi();
$clusterId = 789; // Long | The cluster id.
$diskId = 789; // Long | The disk id.

try {
    $result = $api_instance->clustersClusterIdDisksDiskIdInitializedGet($clusterId, $diskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DisksApi->clustersClusterIdDisksDiskIdInitializedGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DisksApi;

my $api_instance = WWW::SwaggerClient::DisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $diskId = 789; # Long | The disk id.

eval { 
    my $result = $api_instance->clustersClusterIdDisksDiskIdInitializedGet(clusterId => $clusterId, diskId => $diskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DisksApi->clustersClusterIdDisksDiskIdInitializedGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DisksApi()
clusterId = 789 # Long | The cluster id.
diskId = 789 # Long | The disk id.

try: 
    # Get an initialized disk details.
    api_response = api_instance.clusters_cluster_id_disks_disk_id_initialized_get(clusterId, diskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DisksApi->clustersClusterIdDisksDiskIdInitializedGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
disk_id*
Long (int64)
The disk id.
Required

Responses

Status: 200 - The initialized disk's information.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Domain

domainDelete

Remove an existing secure domain access of SIM UI and API

Remove the secure domain access of SIM UI through https. Action can be performed only by users with `admin` role.


/domain

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/domain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DomainApi;

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

public class DomainApiExample {

    public static void main(String[] args) {
        
        DomainApi apiInstance = new DomainApi();
        RemoveDomain body = ; // RemoveDomain | The domain info (domain name)
        try {
            apiInstance.domainDelete(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DomainApi;

public class DomainApiExample {

    public static void main(String[] args) {
        DomainApi apiInstance = new DomainApi();
        RemoveDomain body = ; // RemoveDomain | The domain info (domain name)
        try {
            apiInstance.domainDelete(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainDelete");
            e.printStackTrace();
        }
    }
}
RemoveDomain *body = ; // The domain info (domain name) (optional)

DomainApi *apiInstance = [[DomainApi alloc] init];

// Remove an existing secure domain access of SIM UI and API
[apiInstance domainDeleteWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DomainApi()
var opts = { 
  'body':  // {{RemoveDomain}} The domain info (domain name)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainDelete(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class domainDeleteExample
    {
        public void main()
        {

            var apiInstance = new DomainApi();
            var body = new RemoveDomain(); // RemoveDomain | The domain info (domain name) (optional) 

            try
            {
                // Remove an existing secure domain access of SIM UI and API
                apiInstance.domainDelete(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDomainApi();
$body = ; // RemoveDomain | The domain info (domain name)

try {
    $api_instance->domainDelete($body);
} catch (Exception $e) {
    echo 'Exception when calling DomainApi->domainDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DomainApi;

my $api_instance = WWW::SwaggerClient::DomainApi->new();
my $body = WWW::SwaggerClient::Object::RemoveDomain->new(); # RemoveDomain | The domain info (domain name)

eval { 
    $api_instance->domainDelete(body => $body);
};
if ($@) {
    warn "Exception when calling DomainApi->domainDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DomainApi()
body =  # RemoveDomain | The domain info (domain name) (optional)

try: 
    # Remove an existing secure domain access of SIM UI and API
    api_instance.domain_delete(body=body)
except ApiException as e:
    print("Exception when calling DomainApi->domainDelete: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 202 - Request accepted. Secure domain will be removed soon.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

domainPost

Create a secure domain access of SIM UI and API through https

Create a secure domain access of SIM UI and API through https. Email is required in order to inform in case of SSL renew error. Action can be performed only by users with `admin` role.


/domain

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/domain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DomainApi;

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

public class DomainApiExample {

    public static void main(String[] args) {
        
        DomainApi apiInstance = new DomainApi();
        CreateDomain body = ; // CreateDomain | The domain info (domain name and email)
        try {
            apiInstance.domainPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DomainApi;

public class DomainApiExample {

    public static void main(String[] args) {
        DomainApi apiInstance = new DomainApi();
        CreateDomain body = ; // CreateDomain | The domain info (domain name and email)
        try {
            apiInstance.domainPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainPost");
            e.printStackTrace();
        }
    }
}
CreateDomain *body = ; // The domain info (domain name and email) (optional)

DomainApi *apiInstance = [[DomainApi alloc] init];

// Create a secure domain access of SIM UI and API through https
[apiInstance domainPostWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DomainApi()
var opts = { 
  'body':  // {{CreateDomain}} The domain info (domain name and email)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class domainPostExample
    {
        public void main()
        {

            var apiInstance = new DomainApi();
            var body = new CreateDomain(); // CreateDomain | The domain info (domain name and email) (optional) 

            try
            {
                // Create a secure domain access of SIM UI and API through https
                apiInstance.domainPost(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDomainApi();
$body = ; // CreateDomain | The domain info (domain name and email)

try {
    $api_instance->domainPost($body);
} catch (Exception $e) {
    echo 'Exception when calling DomainApi->domainPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DomainApi;

my $api_instance = WWW::SwaggerClient::DomainApi->new();
my $body = WWW::SwaggerClient::Object::CreateDomain->new(); # CreateDomain | The domain info (domain name and email)

eval { 
    $api_instance->domainPost(body => $body);
};
if ($@) {
    warn "Exception when calling DomainApi->domainPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DomainApi()
body =  # CreateDomain | The domain info (domain name and email) (optional)

try: 
    # Create a secure domain access of SIM UI and API through https
    api_instance.domain_post(body=body)
except ApiException as e:
    print("Exception when calling DomainApi->domainPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 202 - Request accepted. Domain will be secured in a couple of minutes.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Flavors

clustersClusterIdFlavorsFlavorIdDelete

Delete the specified flavor.

A successful response will delete the flavor of the cluster. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/flavors/{flavor_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/flavors/{flavor_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long flavorId = 789; // Long | The flavor id.
        try {
            apiInstance.clustersClusterIdFlavorsFlavorIdDelete(clusterId, flavorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsFlavorIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        Long flavorId = 789; // Long | The flavor id.
        try {
            apiInstance.clustersClusterIdFlavorsFlavorIdDelete(clusterId, flavorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsFlavorIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *flavorId = 789; // The flavor id.

FlavorsApi *apiInstance = [[FlavorsApi alloc] init];

// Delete the specified flavor.
[apiInstance clustersClusterIdFlavorsFlavorIdDeleteWith:clusterId
    flavorId:flavorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.FlavorsApi()
var clusterId = 789; // {{Long}} The cluster id.
var flavorId = 789; // {{Long}} The flavor id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdFlavorsFlavorIdDelete(clusterId, flavorId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdFlavorsFlavorIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new FlavorsApi();
            var clusterId = 789;  // Long | The cluster id.
            var flavorId = 789;  // Long | The flavor id.

            try
            {
                // Delete the specified flavor.
                apiInstance.clustersClusterIdFlavorsFlavorIdDelete(clusterId, flavorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.clustersClusterIdFlavorsFlavorIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlavorsApi();
$clusterId = 789; // Long | The cluster id.
$flavorId = 789; // Long | The flavor id.

try {
    $api_instance->clustersClusterIdFlavorsFlavorIdDelete($clusterId, $flavorId);
} catch (Exception $e) {
    echo 'Exception when calling FlavorsApi->clustersClusterIdFlavorsFlavorIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlavorsApi;

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $flavorId = 789; # Long | The flavor id.

eval { 
    $api_instance->clustersClusterIdFlavorsFlavorIdDelete(clusterId => $clusterId, flavorId => $flavorId);
};
if ($@) {
    warn "Exception when calling FlavorsApi->clustersClusterIdFlavorsFlavorIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
clusterId = 789 # Long | The cluster id.
flavorId = 789 # Long | The flavor id.

try: 
    # Delete the specified flavor.
    api_instance.clusters_cluster_id_flavors_flavor_id_delete(clusterId, flavorId)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsFlavorIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
flavor_id*
Long (int64)
The flavor id.
Required

Responses

Status: 204 - Flavor successfully deleted from the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdFlavorsGet

Get the cluster's flavors.

A successful response will return the cluster's flavors


/clusters/{cluster_id}/flavors

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/flavors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Flavor] result = apiInstance.clustersClusterIdFlavorsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Flavor] result = apiInstance.clustersClusterIdFlavorsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

FlavorsApi *apiInstance = [[FlavorsApi alloc] init];

// Get the cluster's flavors.
[apiInstance clustersClusterIdFlavorsGetWith:clusterId
              completionHandler: ^(array[Flavor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.FlavorsApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdFlavorsGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdFlavorsGetExample
    {
        public void main()
        {

            var apiInstance = new FlavorsApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get the cluster's flavors.
                array[Flavor] result = apiInstance.clustersClusterIdFlavorsGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.clustersClusterIdFlavorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlavorsApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdFlavorsGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlavorsApi->clustersClusterIdFlavorsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get the cluster's flavors.
    api_response = api_instance.clusters_cluster_id_flavors_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - List of flavors.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdFlavorsPost

Add a new flavor to a cluster.

A successful response will add a new flavor to the cluster. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/flavors

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/flavors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        FlavorOpts body = ; // FlavorOpts | The flavor to create
        try {
            Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        FlavorOpts body = ; // FlavorOpts | The flavor to create
        try {
            Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
FlavorOpts *body = ; // The flavor to create (optional)

FlavorsApi *apiInstance = [[FlavorsApi alloc] init];

// Add a new flavor to a cluster.
[apiInstance clustersClusterIdFlavorsPostWith:clusterId
    body:body
              completionHandler: ^(Flavor output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.FlavorsApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{FlavorOpts}} The flavor to create
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdFlavorsPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdFlavorsPostExample
    {
        public void main()
        {

            var apiInstance = new FlavorsApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new FlavorOpts(); // FlavorOpts | The flavor to create (optional) 

            try
            {
                // Add a new flavor to a cluster.
                Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.clustersClusterIdFlavorsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlavorsApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // FlavorOpts | The flavor to create

try {
    $result = $api_instance->clustersClusterIdFlavorsPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FlavorsApi->clustersClusterIdFlavorsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FlavorsApi;

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::FlavorOpts->new(); # FlavorOpts | The flavor to create

eval { 
    my $result = $api_instance->clustersClusterIdFlavorsPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlavorsApi->clustersClusterIdFlavorsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
clusterId = 789 # Long | The cluster id.
body =  # FlavorOpts | The flavor to create (optional)

try: 
    # Add a new flavor to a cluster.
    api_response = api_instance.clusters_cluster_id_flavors_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Flavor successfully added to the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Instances

clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut

Refresh DHCP server IPs for a cluster's Instances.

Refresh DHCP server IPs for a cluster's Instances.


/clusters/{cluster_id}/instances/refresh_external_dhcp_server_ips

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/instances/refresh_external_dhcp_server_ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            InstanceInterface result = apiInstance.clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            InstanceInterface result = apiInstance.clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Refresh DHCP server IPs for a cluster's Instances.
[apiInstance clustersClusterIdInstancesRefreshExternalDhcpServerIpsPutWith:clusterId
              completionHandler: ^(InstanceInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdInstancesRefreshExternalDhcpServerIpsPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Refresh DHCP server IPs for a cluster's Instances.
                InstanceInterface result = apiInstance.clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Refresh DHCP server IPs for a cluster's Instances.
    api_response = api_instance.clusters_cluster_id_instances_refresh_external_dhcp_server_ips_put(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->clustersClusterIdInstancesRefreshExternalDhcpServerIpsPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 202 - Successfully refresh DHCP server IPs for a cluster's Instances.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

insatncesInstanceIdPltdevsPltdevIdDelete

Remove a Platform device from an instance.


/insatnces/{instance_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/insatnces/{instance_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdDelete(instanceId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#insatncesInstanceIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdDelete(instanceId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#insatncesInstanceIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
Long *pltdevId = 789; // The platform dev id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Remove a Platform device from an instance.
[apiInstance insatncesInstanceIdPltdevsPltdevIdDeleteWith:instanceId
    pltdevId:pltdevId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var pltdevId = 789; // {{Long}} The platform dev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.insatncesInstanceIdPltdevsPltdevIdDelete(instanceId, pltdevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class insatncesInstanceIdPltdevsPltdevIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var pltdevId = 789;  // Long | The platform dev id.

            try
            {
                // Remove a Platform device from an instance.
                Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdDelete(instanceId, pltdevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.insatncesInstanceIdPltdevsPltdevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$pltdevId = 789; // Long | The platform dev id.

try {
    $result = $api_instance->insatncesInstanceIdPltdevsPltdevIdDelete($instanceId, $pltdevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $pltdevId = 789; # Long | The platform dev id.

eval { 
    my $result = $api_instance->insatncesInstanceIdPltdevsPltdevIdDelete(instanceId => $instanceId, pltdevId => $pltdevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
pltdevId = 789 # Long | The platform dev id.

try: 
    # Remove a Platform device from an instance.
    api_response = api_instance.insatnces_instance_id_pltdevs_pltdev_id_delete(instanceId, pltdevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
pltdev_id*
Long (int64)
The platform dev id.
Required

Responses

Status: 200 - Platform device removed successfully from the instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

insatncesInstanceIdPltdevsPltdevIdPut

Add a platform device to an instance.


/insatnces/{instance_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/insatnces/{instance_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdPut(instanceId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#insatncesInstanceIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdPut(instanceId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#insatncesInstanceIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
Long *pltdevId = 789; // The platform dev id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Add a platform device to an instance.
[apiInstance insatncesInstanceIdPltdevsPltdevIdPutWith:instanceId
    pltdevId:pltdevId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var pltdevId = 789; // {{Long}} The platform dev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.insatncesInstanceIdPltdevsPltdevIdPut(instanceId, pltdevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class insatncesInstanceIdPltdevsPltdevIdPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var pltdevId = 789;  // Long | The platform dev id.

            try
            {
                // Add a platform device to an instance.
                Instance result = apiInstance.insatncesInstanceIdPltdevsPltdevIdPut(instanceId, pltdevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.insatncesInstanceIdPltdevsPltdevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$pltdevId = 789; // Long | The platform dev id.

try {
    $result = $api_instance->insatncesInstanceIdPltdevsPltdevIdPut($instanceId, $pltdevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $pltdevId = 789; # Long | The platform dev id.

eval { 
    my $result = $api_instance->insatncesInstanceIdPltdevsPltdevIdPut(instanceId => $instanceId, pltdevId => $pltdevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
pltdevId = 789 # Long | The platform dev id.

try: 
    # Add a platform device to an instance.
    api_response = api_instance.insatnces_instance_id_pltdevs_pltdev_id_put(instanceId, pltdevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->insatncesInstanceIdPltdevsPltdevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
pltdev_id*
Long (int64)
The platform dev id.
Required

Responses

Status: 200 - Platform device added successfully to the instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesGet

Get all available instances.

A successful response will return all the available instances that current role has access to. In case of provided one or more cluster_id parameters result will be filtered based on the given parameter. In case cluster_id is invalid or not found it will be ignored. Parameter can be given as `?cluster_id=3&cluster_id=5`


/instances

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances?cluster_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        array[Integer] clusterId = ; // array[Integer] | One or more cluster IDs to filter instances from.
        try {
            array[Instance] result = apiInstance.instancesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        array[Integer] clusterId = ; // array[Integer] | One or more cluster IDs to filter instances from.
        try {
            array[Instance] result = apiInstance.instancesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesGet");
            e.printStackTrace();
        }
    }
}
array[Integer] *clusterId = ; // One or more cluster IDs to filter instances from. (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get all available instances.
[apiInstance instancesGetWith:clusterId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var opts = { 
  'clusterId':  // {{array[Integer]}} One or more cluster IDs to filter instances from.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var clusterId = new array[Integer](); // array[Integer] | One or more cluster IDs to filter instances from. (optional) 

            try
            {
                // Get all available instances.
                array[Instance] result = apiInstance.instancesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$clusterId = ; // array[Integer] | One or more cluster IDs to filter instances from.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $clusterId = []; # array[Integer] | One or more cluster IDs to filter instances from.

eval { 
    my $result = $api_instance->instancesGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
clusterId =  # array[Integer] | One or more cluster IDs to filter instances from. (optional)

try: 
    # Get all available instances.
    api_response = api_instance.instances_get(clusterId=clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesGet: %s\n" % e)

Parameters

Query parameters
Name Description
cluster_id
array[Integer]
One or more cluster IDs to filter instances from.

Responses

Status: 200 - A list of instances.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be one of: stop|start|restart|destroy|factory_reset.


/instances/{instance_id}/{action}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/{action}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
String *action = action_example; // The action to apply.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Apply action to specific instance.
[apiInstance instancesInstanceIdActionPutWith:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var action = action_example; // {{String}} The action to apply.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdActionPut(instanceId, action, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdActionPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var action = action_example;  // String | The action to apply.

            try
            {
                // Apply action to specific instance.
                Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$action = action_example; // String | The action to apply.

try {
    $result = $api_instance->instancesInstanceIdActionPut($instanceId, $action);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdActionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $action = action_example; # String | The action to apply.

eval { 
    my $result = $api_instance->instancesInstanceIdActionPut(instanceId => $instanceId, action => $action);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdActionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
action = action_example # String | The action to apply.

try: 
    # Apply action to specific instance.
    api_response = api_instance.instances_instance_id_action_put(instanceId, action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
action*
String
The action to apply.
Required

Responses

Status: 200 - Successfully applied action to the instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdCreateBackupPut

Initiate a backup creation for the specified instance.

Initiate a backup creation for the specified instance. Only available for SIM hosted in AWS. Process will fail if Instance is in Moving or another Backup for the same instance is in progress. It will also fail if there are more than `max_parallel_backups_per_cluster` backups running on the same cluster.


/instances/{instance_id}/create_backup

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/create_backup"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCreateBackupPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCreateBackupPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Initiate a backup creation for the specified instance.
[apiInstance instancesInstanceIdCreateBackupPutWith:instanceId
              completionHandler: ^(Template output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdCreateBackupPut(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdCreateBackupPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Initiate a backup creation for the specified instance.
                Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCreateBackupPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdCreateBackupPut(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdCreateBackupPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Initiate a backup creation for the specified instance.
    api_response = api_instance.instances_instance_id_create_backup_put(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCreateBackupPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 202 - The templates details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 501 - An unexpected error occurred.

{"code":501,"message":"Operation cannot proceed as it is not implemented or supported."}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

instancesInstanceIdCredentialsGet

Get the credentials of the specified instance.

A successful response will return the credentials to login to the specified instance.


/instances/{instance_id}/credentials

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/credentials"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[InstanceCredentials] result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[InstanceCredentials] result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get the credentials of the specified instance.
[apiInstance instancesInstanceIdCredentialsGetWith:instanceId
              completionHandler: ^(array[InstanceCredentials] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdCredentialsGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdCredentialsGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get the credentials of the specified instance.
                array[InstanceCredentials] result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCredentialsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdCredentialsGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdCredentialsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get the credentials of the specified instance.
    api_response = api_instance.instances_instance_id_credentials_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCredentialsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - The credentials to connect to to the instance.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdDelete

Delete a specified instance.

A successful response will delete the specified instance.


/instances/{instance_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.instancesInstanceIdDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.instancesInstanceIdDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Delete a specified instance.
[apiInstance instancesInstanceIdDeleteWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdDelete(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Delete a specified instance.
                apiInstance.instancesInstanceIdDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

try {
    $api_instance->instancesInstanceIdDelete($instanceId);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->instancesInstanceIdDelete(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Delete a specified instance.
    api_instance.instances_instance_id_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Successfully deleted the instance.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdGet

Get a specific instance's details.

A successful response will return the specified instance's details.


/instances/{instance_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get a specific instance's details.
[apiInstance instancesInstanceIdGetWith:instanceId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get a specific instance's details.
                Instance result = apiInstance.instancesInstanceIdGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get a specific instance's details.
    api_response = api_instance.instances_instance_id_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Get an instance details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdInstancesDisassociateIpPublicIpPut

Disassociate a public IP from associated the Network Interface.

Disassociate an allocated public IP from the associated Network interface.


/instances/{instance_id}/instances/disassociate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/instances/disassociate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
String *publicIp = publicIp_example; // The public IP to associate.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Disassociate a public IP from associated the Network Interface.
[apiInstance instancesInstanceIdInstancesDisassociateIpPublicIpPutWith:instanceId
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var publicIp = publicIp_example; // {{String}} The public IP to associate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdInstancesDisassociateIpPublicIpPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Disassociate a public IP from associated the Network Interface.
                apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInstancesDisassociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$publicIp = publicIp_example; // String | The public IP to associate.

try {
    $api_instance->instancesInstanceIdInstancesDisassociateIpPublicIpPut($instanceId, $publicIp);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdInstancesDisassociateIpPublicIpPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId => $instanceId, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdInstancesDisassociateIpPublicIpPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Disassociate a public IP from associated the Network Interface.
    api_instance.instances_instance_id_instances_disassociate_ip_public_ip_put(instanceId, publicIp)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInstancesDisassociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP Disassociate successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut

Associate a private IP to an allocated public IP.

Associate the Network interface with the specified private IP to an allocated public IP.


/instances/{instance_id}/instances/{private_ip}/associate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/instances/{private_ip}/associate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
String *privateIp = privateIp_example; // The instance's private IP to associate to.
String *publicIp = publicIp_example; // The public IP to associate.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Associate a private IP to an allocated public IP.
[apiInstance instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPutWith:instanceId
    privateIp:privateIp
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var privateIp = privateIp_example; // {{String}} The instance's private IP to associate to.
var publicIp = publicIp_example; // {{String}} The public IP to associate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var privateIp = privateIp_example;  // String | The instance's private IP to associate to.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Associate a private IP to an allocated public IP.
                apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$privateIp = privateIp_example; // String | The instance's private IP to associate to.
$publicIp = publicIp_example; // String | The public IP to associate.

try {
    $api_instance->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut($instanceId, $privateIp, $publicIp);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $privateIp = privateIp_example; # String | The instance's private IP to associate to.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId => $instanceId, privateIp => $privateIp, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
privateIp = privateIp_example # String | The instance's private IP to associate to.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Associate a private IP to an allocated public IP.
    api_instance.instances_instance_id_instances_private_ip_associate_ip_public_ip_put(instanceId, privateIp, publicIp)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
private_ip*
String
The instance's private IP to associate to.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP associated to private IP successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdInterfacesInterfaceIdDelete

Detach a network interface from an Instance.

Detach a specific network interface from an existing instance.


/instances/{instance_id}/interfaces/{interface_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/interfaces/{interface_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long interfaceId = 789; // Long | The instance interface id.
        try {
            apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long interfaceId = 789; // Long | The instance interface id.
        try {
            apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
Long *interfaceId = 789; // The instance interface id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Detach a network interface from an Instance.
[apiInstance instancesInstanceIdInterfacesInterfaceIdDeleteWith:instanceId
    interfaceId:interfaceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var interfaceId = 789; // {{Long}} The instance interface id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdInterfacesInterfaceIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var interfaceId = 789;  // Long | The instance interface id.

            try
            {
                // Detach a network interface from an Instance.
                apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesInterfaceIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$interfaceId = 789; // Long | The instance interface id.

try {
    $api_instance->instancesInstanceIdInterfacesInterfaceIdDelete($instanceId, $interfaceId);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $interfaceId = 789; # Long | The instance interface id.

eval { 
    $api_instance->instancesInstanceIdInterfacesInterfaceIdDelete(instanceId => $instanceId, interfaceId => $interfaceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
interfaceId = 789 # Long | The instance interface id.

try: 
    # Detach a network interface from an Instance.
    api_instance.instances_instance_id_interfaces_interface_id_delete(instanceId, interfaceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
interface_id*
Long (int64)
The instance interface id.
Required

Responses

Status: 204 - Successfully detached network interface from instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdInterfacesInterfaceIdPost

Attach a network to an Instance.

Attach a specific network to an existing instance.


/instances/{instance_id}/interfaces/{interface_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/interfaces/{interface_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long interfaceId = 789; // Long | The instance interface id.
        try {
            InstanceInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPost(instanceId, interfaceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Long interfaceId = 789; // Long | The instance interface id.
        try {
            InstanceInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPost(instanceId, interfaceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdPost");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
Long *interfaceId = 789; // The instance interface id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Attach a network to an Instance.
[apiInstance instancesInstanceIdInterfacesInterfaceIdPostWith:instanceId
    interfaceId:interfaceId
              completionHandler: ^(InstanceInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var interfaceId = 789; // {{Long}} The instance interface id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdInterfacesInterfaceIdPost(instanceId, interfaceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdInterfacesInterfaceIdPostExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var interfaceId = 789;  // Long | The instance interface id.

            try
            {
                // Attach a network to an Instance.
                InstanceInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPost(instanceId, interfaceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesInterfaceIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$interfaceId = 789; // Long | The instance interface id.

try {
    $result = $api_instance->instancesInstanceIdInterfacesInterfaceIdPost($instanceId, $interfaceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $interfaceId = 789; # Long | The instance interface id.

eval { 
    my $result = $api_instance->instancesInstanceIdInterfacesInterfaceIdPost(instanceId => $instanceId, interfaceId => $interfaceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
interfaceId = 789 # Long | The instance interface id.

try: 
    # Attach a network to an Instance.
    api_response = api_instance.instances_instance_id_interfaces_interface_id_post(instanceId, interfaceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
interface_id*
Long (int64)
The instance interface id.
Required

Responses

Status: 200 - Successfully attached network to instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdMigrateNexvisorsPut

Get valid nodes for a specific instance migration.

Retrieve all the feasible nodes for an instance to migrate to.


/instances/{instance_id}/migrate/nexvisors

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/migrate/nexvisors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[GetInstanceMigrateNexvisors] result = apiInstance.instancesInstanceIdMigrateNexvisorsPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigrateNexvisorsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[GetInstanceMigrateNexvisors] result = apiInstance.instancesInstanceIdMigrateNexvisorsPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigrateNexvisorsPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get valid nodes for a specific instance migration.
[apiInstance instancesInstanceIdMigrateNexvisorsPutWith:instanceId
              completionHandler: ^(array[GetInstanceMigrateNexvisors] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdMigrateNexvisorsPut(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdMigrateNexvisorsPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get valid nodes for a specific instance migration.
                array[GetInstanceMigrateNexvisors] result = apiInstance.instancesInstanceIdMigrateNexvisorsPut(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMigrateNexvisorsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdMigrateNexvisorsPut(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdMigrateNexvisorsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get valid nodes for a specific instance migration.
    api_response = api_instance.instances_instance_id_migrate_nexvisors_put(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMigrateNexvisorsPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - A list of nodes with details

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdMigratePut

Migrate a specific instance.

Migrate a specific instance to another nexvisor node.


/instances/{instance_id}/migrate

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/migrate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        MigrateInstance body = ; // MigrateInstance | The parameters of instance migrate
        try {
            apiInstance.instancesInstanceIdMigratePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigratePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        MigrateInstance body = ; // MigrateInstance | The parameters of instance migrate
        try {
            apiInstance.instancesInstanceIdMigratePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigratePut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
MigrateInstance *body = ; // The parameters of instance migrate (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Migrate a specific instance.
[apiInstance instancesInstanceIdMigratePutWith:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{MigrateInstance}} The parameters of instance migrate
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdMigratePut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdMigratePutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new MigrateInstance(); // MigrateInstance | The parameters of instance migrate (optional) 

            try
            {
                // Migrate a specific instance.
                apiInstance.instancesInstanceIdMigratePut(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMigratePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // MigrateInstance | The parameters of instance migrate

try {
    $api_instance->instancesInstanceIdMigratePut($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdMigratePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::MigrateInstance->new(); # MigrateInstance | The parameters of instance migrate

eval { 
    $api_instance->instancesInstanceIdMigratePut(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdMigratePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # MigrateInstance | The parameters of instance migrate (optional)

try: 
    # Migrate a specific instance.
    api_instance.instances_instance_id_migrate_put(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMigratePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - Successfully accepted the migrate action to instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdMovePut

Move the specified instance to another Cluster.

Initiate a backup move for the specified instance. The move is specified by the new cluster, the new resource group, the new datastore and networks. Instance should be in ACTIVE or SHUTOFF status. The response includes the information of the instance's move.


/instances/{instance_id}/move

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/move"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            MoveInstance result = apiInstance.instancesInstanceIdMovePut(instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            MoveInstance result = apiInstance.instancesInstanceIdMovePut(instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
MoveInstance *body = ; // The parameters of instance move (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Move the specified instance to another Cluster.
[apiInstance instancesInstanceIdMovePutWith:instanceId
    body:body
              completionHandler: ^(MoveInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{MoveInstance}} The parameters of instance move
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdMovePut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdMovePutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new MoveInstance(); // MoveInstance | The parameters of instance move (optional) 

            try
            {
                // Move the specified instance to another Cluster.
                MoveInstance result = apiInstance.instancesInstanceIdMovePut(instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMovePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // MoveInstance | The parameters of instance move

try {
    $result = $api_instance->instancesInstanceIdMovePut($instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdMovePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::MoveInstance->new(); # MoveInstance | The parameters of instance move

eval { 
    my $result = $api_instance->instancesInstanceIdMovePut(instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdMovePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # MoveInstance | The parameters of instance move (optional)

try: 
    # Move the specified instance to another Cluster.
    api_response = api_instance.instances_instance_id_move_put(instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMovePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - A move of the instance initiated and the details of the move.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 501 - An unexpected error occurred.

{"code":501,"message":"Operation cannot proceed as it is not implemented or supported."}

instancesInstanceIdPcidevsDelete

Detach PCIDevice from Instance

Detach instance's PCI device.


/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Instance] result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Instance] result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Detach PCIDevice from Instance
[apiInstance instancesInstanceIdPcidevsDeleteWith:instanceId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdPcidevsDelete(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdPcidevsDeleteExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Detach PCIDevice from Instance
                array[Instance] result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPcidevsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdPcidevsDelete(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdPcidevsDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Detach PCIDevice from Instance
    api_response = api_instance.instances_instance_id_pcidevs_delete(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPcidevsDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Successfully detached pci dev of instance

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdPcidevsPost

Attach the pcidevs to the specified instance.

A successful response will return the user data of the specified instance.


/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Instance] result = apiInstance.instancesInstanceIdPcidevsPost(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Instance] result = apiInstance.instancesInstanceIdPcidevsPost(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Attach the pcidevs to the specified instance.
[apiInstance instancesInstanceIdPcidevsPostWith:instanceId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdPcidevsPost(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdPcidevsPostExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Attach the pcidevs to the specified instance.
                array[Instance] result = apiInstance.instancesInstanceIdPcidevsPost(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPcidevsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdPcidevsPost(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdPcidevsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Attach the pcidevs to the specified instance.
    api_response = api_instance.instances_instance_id_pcidevs_post(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPcidevsPost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Get instance details.

Status: 400 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdRenamePut

Rename a specific instance.

Rename a specific instance.


/instances/{instance_id}/rename

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/rename"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.instancesInstanceIdRenamePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.instancesInstanceIdRenamePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
RenameInstance *body = ; // The parameters of instance rename (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Rename a specific instance.
[apiInstance instancesInstanceIdRenamePutWith:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{RenameInstance}} The parameters of instance rename
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdRenamePut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdRenamePutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new RenameInstance(); // RenameInstance | The parameters of instance rename (optional) 

            try
            {
                // Rename a specific instance.
                apiInstance.instancesInstanceIdRenamePut(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdRenamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // RenameInstance | The parameters of instance rename

try {
    $api_instance->instancesInstanceIdRenamePut($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdRenamePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::RenameInstance->new(); # RenameInstance | The parameters of instance rename

eval { 
    $api_instance->instancesInstanceIdRenamePut(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdRenamePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # RenameInstance | The parameters of instance rename (optional)

try: 
    # Rename a specific instance.
    api_instance.instances_instance_id_rename_put(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdRenamePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - Successfully applied rename action to instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdResizeDatastoresGet

Get the available datastores for instance resize

Retrieves the available datastores for instance resize. Different datastores are returned for extra disk 1 and extra disk 2 based on the provided attributes.


/instances/{instance_id}/resize/datastores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/resize/datastores?flavor_id=&vcpus=&memory_mb=&root_disk_gb=&extra_disk_1_gb=&extra_disk_2_gb="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Integer flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
        Integer vcpus = 56; // Integer | The new cores of the instance.
        Integer memoryMb = 56; // Integer | The new memory of the instance.
        Integer rootDiskGb = 56; // Integer | The root disk size of the instance.
        Integer extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
        Integer extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).
        try {
            InstanceResizeDatastores result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        Integer flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
        Integer vcpus = 56; // Integer | The new cores of the instance.
        Integer memoryMb = 56; // Integer | The new memory of the instance.
        Integer rootDiskGb = 56; // Integer | The root disk size of the instance.
        Integer extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
        Integer extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).
        try {
            InstanceResizeDatastores result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
Integer *flavorId = 56; // The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query. (optional)
Integer *vcpus = 56; // The new cores of the instance. (optional)
Integer *memoryMb = 56; // The new memory of the instance. (optional)
Integer *rootDiskGb = 56; // The root disk size of the instance. (optional)
Integer *extraDisk1Gb = 56; // The extra disk 1 size of the instance (optional). (optional)
Integer *extraDisk2Gb = 56; // The extra disk 2 size of the instance (optional). (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get the available datastores for instance resize
[apiInstance instancesInstanceIdResizeDatastoresGetWith:instanceId
    flavorId:flavorId
    vcpus:vcpus
    memoryMb:memoryMb
    rootDiskGb:rootDiskGb
    extraDisk1Gb:extraDisk1Gb
    extraDisk2Gb:extraDisk2Gb
              completionHandler: ^(InstanceResizeDatastores output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'flavorId': 56, // {{Integer}} The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
  'vcpus': 56, // {{Integer}} The new cores of the instance.
  'memoryMb': 56, // {{Integer}} The new memory of the instance.
  'rootDiskGb': 56, // {{Integer}} The root disk size of the instance.
  'extraDisk1Gb': 56, // {{Integer}} The extra disk 1 size of the instance (optional).
  'extraDisk2Gb': 56 // {{Integer}} The extra disk 2 size of the instance (optional).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdResizeDatastoresGet(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdResizeDatastoresGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var flavorId = 56;  // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query. (optional) 
            var vcpus = 56;  // Integer | The new cores of the instance. (optional) 
            var memoryMb = 56;  // Integer | The new memory of the instance. (optional) 
            var rootDiskGb = 56;  // Integer | The root disk size of the instance. (optional) 
            var extraDisk1Gb = 56;  // Integer | The extra disk 1 size of the instance (optional). (optional) 
            var extraDisk2Gb = 56;  // Integer | The extra disk 2 size of the instance (optional). (optional) 

            try
            {
                // Get the available datastores for instance resize
                InstanceResizeDatastores result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizeDatastoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
$vcpus = 56; // Integer | The new cores of the instance.
$memoryMb = 56; // Integer | The new memory of the instance.
$rootDiskGb = 56; // Integer | The root disk size of the instance.
$extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
$extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).

try {
    $result = $api_instance->instancesInstanceIdResizeDatastoresGet($instanceId, $flavorId, $vcpus, $memoryMb, $rootDiskGb, $extraDisk1Gb, $extraDisk2Gb);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $flavorId = 56; # Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
my $vcpus = 56; # Integer | The new cores of the instance.
my $memoryMb = 56; # Integer | The new memory of the instance.
my $rootDiskGb = 56; # Integer | The root disk size of the instance.
my $extraDisk1Gb = 56; # Integer | The extra disk 1 size of the instance (optional).
my $extraDisk2Gb = 56; # Integer | The extra disk 2 size of the instance (optional).

eval { 
    my $result = $api_instance->instancesInstanceIdResizeDatastoresGet(instanceId => $instanceId, flavorId => $flavorId, vcpus => $vcpus, memoryMb => $memoryMb, rootDiskGb => $rootDiskGb, extraDisk1Gb => $extraDisk1Gb, extraDisk2Gb => $extraDisk2Gb);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
flavorId = 56 # Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query. (optional)
vcpus = 56 # Integer | The new cores of the instance. (optional)
memoryMb = 56 # Integer | The new memory of the instance. (optional)
rootDiskGb = 56 # Integer | The root disk size of the instance. (optional)
extraDisk1Gb = 56 # Integer | The extra disk 1 size of the instance (optional). (optional)
extraDisk2Gb = 56 # Integer | The extra disk 2 size of the instance (optional). (optional)

try: 
    # Get the available datastores for instance resize
    api_response = api_instance.instances_instance_id_resize_datastores_get(instanceId, flavorId=flavorId, vcpus=vcpus, memoryMb=memoryMb, rootDiskGb=rootDiskGb, extraDisk1Gb=extraDisk1Gb, extraDisk2Gb=extraDisk2Gb)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Query parameters
Name Description
flavor_id
Integer
The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
vcpus
Integer
The new cores of the instance.
memory_mb
Integer
The new memory of the instance.
root_disk_gb
Integer
The root disk size of the instance.
extra_disk_1_gb
Integer
The extra disk 1 size of the instance (optional).
extra_disk_2_gb
Integer
The extra disk 2 size of the instance (optional).

Responses

Status: 200 - The available datastores for resize.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdResizeFlavorsGet

Get the available flavors for instance resize

Retrieves the available flavors for instance resize.


/instances/{instance_id}/resize/flavors

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/resize/flavors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeFlavorsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeFlavorsGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get the available flavors for instance resize
[apiInstance instancesInstanceIdResizeFlavorsGetWith:instanceId
              completionHandler: ^(array[Flavor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdResizeFlavorsGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdResizeFlavorsGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get the available flavors for instance resize
                array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizeFlavorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdResizeFlavorsGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdResizeFlavorsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get the available flavors for instance resize
    api_response = api_instance.instances_instance_id_resize_flavors_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizeFlavorsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - The available flavors for resize.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdResizePut

Resize the specified instance.

Initiates a resize operation at the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/instances/{instance_id}/resize

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/resize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.instancesInstanceIdResizePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.instancesInstanceIdResizePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
ResizeInstance *body = ; // The parameters of instance resize (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Resize the specified instance.
[apiInstance instancesInstanceIdResizePutWith:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{ResizeInstance}} The parameters of instance resize
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdResizePut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdResizePutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new ResizeInstance(); // ResizeInstance | The parameters of instance resize (optional) 

            try
            {
                // Resize the specified instance.
                apiInstance.instancesInstanceIdResizePut(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // ResizeInstance | The parameters of instance resize

try {
    $api_instance->instancesInstanceIdResizePut($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdResizePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::ResizeInstance->new(); # ResizeInstance | The parameters of instance resize

eval { 
    $api_instance->instancesInstanceIdResizePut(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdResizePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # ResizeInstance | The parameters of instance resize (optional)

try: 
    # Resize the specified instance.
    api_instance.instances_instance_id_resize_put(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - The resize initiated successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdUserDataGet

Get the user data of the specified instance.

A successful response will return the user data of the specified instance.


/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            CloudInitOpts result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            CloudInitOpts result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Get the user data of the specified instance.
[apiInstance instancesInstanceIdUserDataGetWith:instanceId
              completionHandler: ^(CloudInitOpts output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdUserDataGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdUserDataGetExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get the user data of the specified instance.
                CloudInitOpts result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdUserDataGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdUserDataGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdUserDataGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get the user data of the specified instance.
    api_response = api_instance.instances_instance_id_user_data_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdUserDataGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Instance's user data details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdUserDataPut

Update/edit instance's user data.

Instance's user data are updated for virtupian and SIM DB.


/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        CloudInitOpts body = ; // CloudInitOpts | Instance's user data
        try {
            apiInstance.instancesInstanceIdUserDataPut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        CloudInitOpts body = ; // CloudInitOpts | Instance's user data
        try {
            apiInstance.instancesInstanceIdUserDataPut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
CloudInitOpts *body = ; // Instance's user data (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Update/edit instance's user data.
[apiInstance instancesInstanceIdUserDataPutWith:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{CloudInitOpts}} Instance's user data
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdUserDataPut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdUserDataPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new CloudInitOpts(); // CloudInitOpts | Instance's user data (optional) 

            try
            {
                // Update/edit instance's user data.
                apiInstance.instancesInstanceIdUserDataPut(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdUserDataPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // CloudInitOpts | Instance's user data

try {
    $api_instance->instancesInstanceIdUserDataPut($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdUserDataPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::CloudInitOpts->new(); # CloudInitOpts | Instance's user data

eval { 
    $api_instance->instancesInstanceIdUserDataPut(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdUserDataPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # CloudInitOpts | Instance's user data (optional)

try: 
    # Update/edit instance's user data.
    api_instance.instances_instance_id_user_data_put(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdUserDataPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Update was successful.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdVncDelete

Stop an instance's VNC

Stop an instance's VNC by concealing from Cluster.


/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.instancesInstanceIdVncDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.instancesInstanceIdVncDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Stop an instance's VNC
[apiInstance instancesInstanceIdVncDeleteWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdVncDelete(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdVncDeleteExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Stop an instance's VNC
                apiInstance.instancesInstanceIdVncDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

try {
    $api_instance->instancesInstanceIdVncDelete($instanceId);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdVncDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->instancesInstanceIdVncDelete(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdVncDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Stop an instance's VNC
    api_instance.instances_instance_id_vnc_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 204 - Successfully stopped instance's VNC

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdVncPost

Start an instance's VNC

Start an instance's VNC by exposing access from Cluster. Instance should be in ACTIVE status. The VNC can be accessed through the websocket at '/ws/instances/{instance_id}/vnc'.


/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.instancesInstanceIdVncPost(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.instancesInstanceIdVncPost(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
VNCOpts *body = ; // The expose instance's VNC parameters (optional)

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Start an instance's VNC
[apiInstance instancesInstanceIdVncPostWith:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{VNCOpts}} The expose instance's VNC parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdVncPost(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdVncPostExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new VNCOpts(); // VNCOpts | The expose instance's VNC parameters (optional) 

            try
            {
                // Start an instance's VNC
                apiInstance.instancesInstanceIdVncPost(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // VNCOpts | The expose instance's VNC parameters

try {
    $api_instance->instancesInstanceIdVncPost($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdVncPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::VNCOpts->new(); # VNCOpts | The expose instance's VNC parameters

eval { 
    $api_instance->instancesInstanceIdVncPost(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdVncPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 789 # Long | The instance id.
body =  # VNCOpts | The expose instance's VNC parameters (optional)

try: 
    # Start an instance's VNC
    api_instance.instances_instance_id_vnc_post(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncPost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Successfully initiated instance VNC

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesRefreshExternalDhcpServerIpsPut

Refresh DHCP server IPs for all sim's Instances.

Refresh DHCP server IPs for all sim's Instances.


/instances/refresh_external_dhcp_server_ips

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/refresh_external_dhcp_server_ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        try {
            InstanceInterface result = apiInstance.instancesRefreshExternalDhcpServerIpsPut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesRefreshExternalDhcpServerIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        try {
            InstanceInterface result = apiInstance.instancesRefreshExternalDhcpServerIpsPut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesRefreshExternalDhcpServerIpsPut");
            e.printStackTrace();
        }
    }
}

InstancesApi *apiInstance = [[InstancesApi alloc] init];

// Refresh DHCP server IPs for all sim's Instances.
[apiInstance instancesRefreshExternalDhcpServerIpsPutWithCompletionHandler: 
              ^(InstanceInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesRefreshExternalDhcpServerIpsPut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesRefreshExternalDhcpServerIpsPutExample
    {
        public void main()
        {

            var apiInstance = new InstancesApi();

            try
            {
                // Refresh DHCP server IPs for all sim's Instances.
                InstanceInterface result = apiInstance.instancesRefreshExternalDhcpServerIpsPut();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesRefreshExternalDhcpServerIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();

eval { 
    my $result = $api_instance->instancesRefreshExternalDhcpServerIpsPut();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesRefreshExternalDhcpServerIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()

try: 
    # Refresh DHCP server IPs for all sim's Instances.
    api_response = api_instance.instances_refresh_external_dhcp_server_ips_put()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesRefreshExternalDhcpServerIpsPut: %s\n" % e)

Parameters

Responses

Status: 202 - Successfully refresh DHCP server IPs for a cluster's Instances.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

License

clustersClusterIdLicenseDelete

Delete the latest active license of a cluster.

A successful response will delete the cluster's license.


/clusters/{cluster_id}/license

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseApi;

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

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdLicenseDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicenseDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdLicenseDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicenseDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

LicenseApi *apiInstance = [[LicenseApi alloc] init];

// Delete the latest active license of a cluster.
[apiInstance clustersClusterIdLicenseDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdLicenseDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdLicenseDeleteExample
    {
        public void main()
        {

            var apiInstance = new LicenseApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Delete the latest active license of a cluster.
                apiInstance.clustersClusterIdLicenseDelete(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicenseDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLicenseApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdLicenseDelete($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling LicenseApi->clustersClusterIdLicenseDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseApi;

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdLicenseDelete(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling LicenseApi->clustersClusterIdLicenseDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LicenseApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Delete the latest active license of a cluster.
    api_instance.clusters_cluster_id_license_delete(clusterId)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicenseDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The license of the cluster removed.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdLicenseGet

Get the latest active license of a cluster.

A successful response will return the cluster's license information. In case of no license an empty response will be given


/clusters/{cluster_id}/license

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseApi;

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

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            ClusterLicense result = apiInstance.clustersClusterIdLicenseGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicenseGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            ClusterLicense result = apiInstance.clustersClusterIdLicenseGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicenseGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

LicenseApi *apiInstance = [[LicenseApi alloc] init];

// Get the latest active license of a cluster.
[apiInstance clustersClusterIdLicenseGetWith:clusterId
              completionHandler: ^(ClusterLicense output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdLicenseGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdLicenseGetExample
    {
        public void main()
        {

            var apiInstance = new LicenseApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get the latest active license of a cluster.
                ClusterLicense result = apiInstance.clustersClusterIdLicenseGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicenseGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLicenseApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdLicenseGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LicenseApi->clustersClusterIdLicenseGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LicenseApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get the latest active license of a cluster.
    api_response = api_instance.clusters_cluster_id_license_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicenseGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The license of the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdLicensePost

Add a new license to a cluster.

A successful response will add a new license to the cluster.


/clusters/{cluster_id}/license

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseApi;

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

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        LicenseOpts body = ; // LicenseOpts | The license information encoded in pem format.
        try {
            apiInstance.clustersClusterIdLicensePost(clusterId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicensePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        LicenseOpts body = ; // LicenseOpts | The license information encoded in pem format.
        try {
            apiInstance.clustersClusterIdLicensePost(clusterId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicensePost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
LicenseOpts *body = ; // The license information encoded in pem format. (optional)

LicenseApi *apiInstance = [[LicenseApi alloc] init];

// Add a new license to a cluster.
[apiInstance clustersClusterIdLicensePostWith:clusterId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{LicenseOpts}} The license information encoded in pem format.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdLicensePost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdLicensePostExample
    {
        public void main()
        {

            var apiInstance = new LicenseApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new LicenseOpts(); // LicenseOpts | The license information encoded in pem format. (optional) 

            try
            {
                // Add a new license to a cluster.
                apiInstance.clustersClusterIdLicensePost(clusterId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicensePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLicenseApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // LicenseOpts | The license information encoded in pem format.

try {
    $api_instance->clustersClusterIdLicensePost($clusterId, $body);
} catch (Exception $e) {
    echo 'Exception when calling LicenseApi->clustersClusterIdLicensePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseApi;

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::LicenseOpts->new(); # LicenseOpts | The license information encoded in pem format.

eval { 
    $api_instance->clustersClusterIdLicensePost(clusterId => $clusterId, body => $body);
};
if ($@) {
    warn "Exception when calling LicenseApi->clustersClusterIdLicensePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LicenseApi()
clusterId = 789 # Long | The cluster id.
body =  # LicenseOpts | The license information encoded in pem format. (optional)

try: 
    # Add a new license to a cluster.
    api_instance.clusters_cluster_id_license_post(clusterId, body=body)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicensePost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - License successfully added to the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Login

loginPost

Authenticate a user to get a cookie and a JWT

Authenticate a user to get a cookie and a JWT. If username or password is not correct a 422 will be returned.


/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        Credentials body = ; // Credentials | The credentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        Credentials body = ; // Credentials | The credentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginPost");
            e.printStackTrace();
        }
    }
}
Credentials *body = ; // The credentials to authenticate the user. (optional)

LoginApi *apiInstance = [[LoginApi alloc] init];

// Authenticate a user to get a cookie and a JWT
[apiInstance loginPostWith:body
              completionHandler: ^(AuthenticatedUser output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LoginApi()
var opts = { 
  'body':  // {{Credentials}} The credentials to authenticate the user.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.loginPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loginPostExample
    {
        public void main()
        {

            var apiInstance = new LoginApi();
            var body = new Credentials(); // Credentials | The credentials to authenticate the user. (optional) 

            try
            {
                // Authenticate a user to get a cookie and a JWT
                AuthenticatedUser result = apiInstance.loginPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.loginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();
$body = ; // Credentials | The credentials to authenticate the user.

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $body = WWW::SwaggerClient::Object::Credentials->new(); # Credentials | The credentials to authenticate the user.

eval { 
    my $result = $api_instance->loginPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoginApi->loginPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LoginApi()
body =  # Credentials | The credentials to authenticate the user. (optional)

try: 
    # Authenticate a user to get a cookie and a JWT
    api_response = api_instance.login_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->loginPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - User authorized successfully. Use the token for all further api calls.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

logoutPost

Logout the user by removing the user's cookie.


/logout

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        try {
            apiInstance.logoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#logoutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        try {
            apiInstance.logoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#logoutPost");
            e.printStackTrace();
        }
    }
}

LoginApi *apiInstance = [[LoginApi alloc] init];

// Logout the user by removing the user's cookie.
[apiInstance logoutPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LoginApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.logoutPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logoutPostExample
    {
        public void main()
        {

            var apiInstance = new LoginApi();

            try
            {
                // Logout the user by removing the user's cookie.
                apiInstance.logoutPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.logoutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();

try {
    $api_instance->logoutPost();
} catch (Exception $e) {
    echo 'Exception when calling LoginApi->logoutPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoginApi;

my $api_instance = WWW::SwaggerClient::LoginApi->new();

eval { 
    $api_instance->logoutPost();
};
if ($@) {
    warn "Exception when calling LoginApi->logoutPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LoginApi()

try: 
    # Logout the user by removing the user's cookie.
    api_instance.logout_post()
except ApiException as e:
    print("Exception when calling LoginApi->logoutPost: %s\n" % e)

Parameters

Responses

Status: 200 - The user successfully logout.

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Maintenance

maintenanceDelete

Change SIM's mode back to normal mode.

Change SIM to normal mode. A HTTP OK (200) will be returned in case of successful change. A 503 will be returned otherwise.


/maintenance

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/maintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MaintenanceApi;

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

public class MaintenanceApiExample {

    public static void main(String[] args) {
        
        MaintenanceApi apiInstance = new MaintenanceApi();
        try {
            'String' result = apiInstance.maintenanceDelete();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MaintenanceApi#maintenanceDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MaintenanceApi;

public class MaintenanceApiExample {

    public static void main(String[] args) {
        MaintenanceApi apiInstance = new MaintenanceApi();
        try {
            'String' result = apiInstance.maintenanceDelete();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MaintenanceApi#maintenanceDelete");
            e.printStackTrace();
        }
    }
}

MaintenanceApi *apiInstance = [[MaintenanceApi alloc] init];

// Change SIM's mode back to normal mode.
[apiInstance maintenanceDeleteWithCompletionHandler: 
              ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.MaintenanceApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.maintenanceDelete(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class maintenanceDeleteExample
    {
        public void main()
        {

            var apiInstance = new MaintenanceApi();

            try
            {
                // Change SIM's mode back to normal mode.
                'String' result = apiInstance.maintenanceDelete();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MaintenanceApi.maintenanceDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMaintenanceApi();

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

my $api_instance = WWW::SwaggerClient::MaintenanceApi->new();

eval { 
    my $result = $api_instance->maintenanceDelete();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MaintenanceApi->maintenanceDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MaintenanceApi()

try: 
    # Change SIM's mode back to normal mode.
    api_response = api_instance.maintenance_delete()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MaintenanceApi->maintenanceDelete: %s\n" % e)

Parameters

Responses

Status: 200 - A string indicating SIM's mode.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

maintenancePut

Change SIM's mode to maintenance mode.

Change SIM to maintenance mode in order to be able to upgrade the SIM to a newer version. A HTTP OK (200) will be returned in case of successful change. A 503 will be returned otherwise.


/maintenance

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/maintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MaintenanceApi;

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

public class MaintenanceApiExample {

    public static void main(String[] args) {
        
        MaintenanceApi apiInstance = new MaintenanceApi();
        try {
            'String' result = apiInstance.maintenancePut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MaintenanceApi#maintenancePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MaintenanceApi;

public class MaintenanceApiExample {

    public static void main(String[] args) {
        MaintenanceApi apiInstance = new MaintenanceApi();
        try {
            'String' result = apiInstance.maintenancePut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MaintenanceApi#maintenancePut");
            e.printStackTrace();
        }
    }
}

MaintenanceApi *apiInstance = [[MaintenanceApi alloc] init];

// Change SIM's mode to maintenance mode.
[apiInstance maintenancePutWithCompletionHandler: 
              ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.MaintenanceApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.maintenancePut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class maintenancePutExample
    {
        public void main()
        {

            var apiInstance = new MaintenanceApi();

            try
            {
                // Change SIM's mode to maintenance mode.
                'String' result = apiInstance.maintenancePut();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MaintenanceApi.maintenancePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMaintenanceApi();

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

my $api_instance = WWW::SwaggerClient::MaintenanceApi->new();

eval { 
    my $result = $api_instance->maintenancePut();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MaintenanceApi->maintenancePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MaintenanceApi()

try: 
    # Change SIM's mode to maintenance mode.
    api_response = api_instance.maintenance_put()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MaintenanceApi->maintenancePut: %s\n" % e)

Parameters

Responses

Status: 200 - A string indicating SIM's mode.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

MapKeys

getMapKeysGet

Get a map keys for cluster location.

A successful response will return map keys for cluster's location.


/get_map_keys

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/get_map_keys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MapKeysApi;

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

public class MapKeysApiExample {

    public static void main(String[] args) {
        
        MapKeysApi apiInstance = new MapKeysApi();
        try {
            MapKeys result = apiInstance.getMapKeysGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MapKeysApi#getMapKeysGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MapKeysApi;

public class MapKeysApiExample {

    public static void main(String[] args) {
        MapKeysApi apiInstance = new MapKeysApi();
        try {
            MapKeys result = apiInstance.getMapKeysGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MapKeysApi#getMapKeysGet");
            e.printStackTrace();
        }
    }
}

MapKeysApi *apiInstance = [[MapKeysApi alloc] init];

// Get a map keys for cluster location.
[apiInstance getMapKeysGetWithCompletionHandler: 
              ^(MapKeys output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.MapKeysApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMapKeysGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMapKeysGetExample
    {
        public void main()
        {

            var apiInstance = new MapKeysApi();

            try
            {
                // Get a map keys for cluster location.
                MapKeys result = apiInstance.getMapKeysGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MapKeysApi.getMapKeysGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMapKeysApi();

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

my $api_instance = WWW::SwaggerClient::MapKeysApi->new();

eval { 
    my $result = $api_instance->getMapKeysGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MapKeysApi->getMapKeysGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MapKeysApi()

try: 
    # Get a map keys for cluster location.
    api_response = api_instance.get_map_keys_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MapKeysApi->getMapKeysGet: %s\n" % e)

Parameters

Responses

Status: 200 - The map keys.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Networks

clustersClusterIdNetworksGet

Get all the networks of a cluster.


/clusters/{cluster_id}/networks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Network] result = apiInstance.clustersClusterIdNetworksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Network] result = apiInstance.clustersClusterIdNetworksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Get all the networks of a cluster.
[apiInstance clustersClusterIdNetworksGetWith:clusterId
              completionHandler: ^(array[Network] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksGetExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get all the networks of a cluster.
                array[Network] result = apiInstance.clustersClusterIdNetworksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get all the networks of a cluster.
    api_response = api_instance.clusters_cluster_id_networks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of networks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdDelete

Delete a network of a cluster.

The endpoint deletes a network. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.clustersClusterIdNetworksNetworkIdDelete(clusterId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.clustersClusterIdNetworksNetworkIdDelete(clusterId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Delete a network of a cluster.
[apiInstance clustersClusterIdNetworksNetworkIdDeleteWith:clusterId
    networkId:networkId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdNetworksNetworkIdDelete(clusterId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Delete a network of a cluster.
                apiInstance.clustersClusterIdNetworksNetworkIdDelete(clusterId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.

try {
    $api_instance->clustersClusterIdNetworksNetworkIdDelete($clusterId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.

eval { 
    $api_instance->clustersClusterIdNetworksNetworkIdDelete(clusterId => $clusterId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.

try: 
    # Delete a network of a cluster.
    api_instance.clusters_cluster_id_networks_network_id_delete(clusterId, networkId)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 204 - Network deleted successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdGet

Get a network of a cluster.

The endpoint gets the network based on the ID and the cluster ID.


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Get a network of a cluster.
[apiInstance clustersClusterIdNetworksNetworkIdGetWith:clusterId
    networkId:networkId
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdGet(clusterId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdGetExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get a network of a cluster.
                Network result = apiInstance.clustersClusterIdNetworksNetworkIdGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->clustersClusterIdNetworksNetworkIdGet($clusterId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdGet(clusterId => $clusterId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.

try: 
    # Get a network of a cluster.
    api_response = api_instance.clusters_cluster_id_networks_network_id_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - Network retrieved successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdIpsGet

Get the list of free and taken IPs of the network based on the ID.


/clusters/{cluster_id}/networks/{network_id}/ips

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks/{network_id}/ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            NetworkIPs result = apiInstance.clustersClusterIdNetworksNetworkIdIpsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            NetworkIPs result = apiInstance.clustersClusterIdNetworksNetworkIdIpsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdIpsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Get the list of free and taken IPs of the network based on the ID.
[apiInstance clustersClusterIdNetworksNetworkIdIpsGetWith:clusterId
    networkId:networkId
              completionHandler: ^(NetworkIPs output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdIpsGet(clusterId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdIpsGetExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get the list of free and taken IPs of the network based on the ID.
                NetworkIPs result = apiInstance.clustersClusterIdNetworksNetworkIdIpsGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->clustersClusterIdNetworksNetworkIdIpsGet($clusterId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdIpsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdIpsGet(clusterId => $clusterId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdIpsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.

try: 
    # Get the list of free and taken IPs of the network based on the ID.
    api_response = api_instance.clusters_cluster_id_networks_network_id_ips_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdIpsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - Network IPs.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdPut

Edit a network.

The endpoint edits a network. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        NewNetwork body = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        NewNetwork body = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.
NewNetwork *body = ; // The network to edit. (optional)

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Edit a network.
[apiInstance clustersClusterIdNetworksNetworkIdPutWith:clusterId
    networkId:networkId
    body:body
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.
var opts = { 
  'body':  // {{NewNetwork}} The network to edit.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdPut(clusterIdnetworkId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdPutExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.
            var body = new NewNetwork(); // NewNetwork | The network to edit. (optional) 

            try
            {
                // Edit a network.
                Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.
$body = ; // NewNetwork | The network to edit.

try {
    $result = $api_instance->clustersClusterIdNetworksNetworkIdPut($clusterId, $networkId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.
my $body = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to edit.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdPut(clusterId => $clusterId, networkId => $networkId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.
body =  # NewNetwork | The network to edit. (optional)

try: 
    # Edit a network.
    api_response = api_instance.clusters_cluster_id_networks_network_id_put(clusterId, networkId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Network edited successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdVifsGet

Get the virtual network interfaces (VIFs) of a specific network.


/clusters/{cluster_id}/networks/{network_id}/vifs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks/{network_id}/vifs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Get the virtual network interfaces (VIFs) of a specific network.
[apiInstance clustersClusterIdNetworksNetworkIdVifsGetWith:clusterId
    networkId:networkId
              completionHandler: ^(array[VirtualNetworkInterface] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdVifsGetExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get the virtual network interfaces (VIFs) of a specific network.
                array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdVifsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->clustersClusterIdNetworksNetworkIdVifsGet($clusterId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdVifsGet(clusterId => $clusterId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.

try: 
    # Get the virtual network interfaces (VIFs) of a specific network.
    api_response = api_instance.clusters_cluster_id_networks_network_id_vifs_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - A list of networks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksPost

Create new network in a cluster.

The endpoint creates a new network. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/networks

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        NewNetwork body = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        NewNetwork body = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewNetwork *body = ; // The network to create. (optional)

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Create new network in a cluster.
[apiInstance clustersClusterIdNetworksPostWith:clusterId
    body:body
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewNetwork}} The network to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksPostExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewNetwork(); // NewNetwork | The network to create. (optional) 

            try
            {
                // Create new network in a cluster.
                Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewNetwork | The network to create.

try {
    $result = $api_instance->clustersClusterIdNetworksPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to create.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
clusterId = 789 # Long | The cluster id.
body =  # NewNetwork | The network to create. (optional)

try: 
    # Create new network in a cluster.
    api_response = api_instance.clusters_cluster_id_networks_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Network created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Nodes

clustersClusterIdNodesNodeIdActionPut

Do a node action .

A successful response do the specified action on the specified node.


/clusters/{cluster_id}/nodes/{node_id}/action

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/nodes/{node_id}/action"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        NodeActionOpts body = ; // NodeActionOpts | The node action to perform.
        try {
            apiInstance.clustersClusterIdNodesNodeIdActionPut(clusterId, nodeId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        NodeActionOpts body = ; // NodeActionOpts | The node action to perform.
        try {
            apiInstance.clustersClusterIdNodesNodeIdActionPut(clusterId, nodeId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdActionPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.
NodeActionOpts *body = ; // The node action to perform. (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Do a node action .
[apiInstance clustersClusterIdNodesNodeIdActionPutWith:clusterId
    nodeId:nodeId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.
var opts = { 
  'body':  // {{NodeActionOpts}} The node action to perform.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdNodesNodeIdActionPut(clusterIdnodeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdActionPutExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.
            var body = new NodeActionOpts(); // NodeActionOpts | The node action to perform. (optional) 

            try
            {
                // Do a node action .
                apiInstance.clustersClusterIdNodesNodeIdActionPut(clusterId, nodeId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.
$body = ; // NodeActionOpts | The node action to perform.

try {
    $api_instance->clustersClusterIdNodesNodeIdActionPut($clusterId, $nodeId, $body);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdActionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.
my $body = WWW::SwaggerClient::Object::NodeActionOpts->new(); # NodeActionOpts | The node action to perform.

eval { 
    $api_instance->clustersClusterIdNodesNodeIdActionPut(clusterId => $clusterId, nodeId => $nodeId, body => $body);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdActionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.
body =  # NodeActionOpts | The node action to perform. (optional)

try: 
    # Do a node action .
    api_instance.clusters_cluster_id_nodes_node_id_action_put(clusterId, nodeId, body=body)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - Successful node action.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdDelete

Delete the specified node.

Delete the specified node corresponding to the given id.


/clusters/{cluster_id}/nodes/{node_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}?force="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        String force = force_example; // String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.
        try {
            apiInstance.clustersClusterIdNodesNodeIdDelete(clusterId, nodeId, force);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        String force = force_example; // String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.
        try {
            apiInstance.clustersClusterIdNodesNodeIdDelete(clusterId, nodeId, force);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.
String *force = force_example; // The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores. (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Delete the specified node.
[apiInstance clustersClusterIdNodesNodeIdDeleteWith:clusterId
    nodeId:nodeId
    force:force
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.
var opts = { 
  'force': force_example // {{String}} The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdNodesNodeIdDelete(clusterId, nodeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.
            var force = force_example;  // String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores. (optional) 

            try
            {
                // Delete the specified node.
                apiInstance.clustersClusterIdNodesNodeIdDelete(clusterId, nodeId, force);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.
$force = force_example; // String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.

try {
    $api_instance->clustersClusterIdNodesNodeIdDelete($clusterId, $nodeId, $force);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.
my $force = force_example; # String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.

eval { 
    $api_instance->clustersClusterIdNodesNodeIdDelete(clusterId => $clusterId, nodeId => $nodeId, force => $force);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.
force = force_example # String | The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores. (optional)

try: 
    # Delete the specified node.
    api_instance.clusters_cluster_id_nodes_node_id_delete(clusterId, nodeId, force=force)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required
Query parameters
Name Description
force
String
The “force” flag, is an optional parameter used to check if the user agrees to remove the replication of the Datastores.

Responses

Status: 204 - Request for Node Removal is accepted and currently processing.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdGet

Get a cluster's node with specified id.

A successful response will return the node.


/clusters/{cluster_id}/nodes/{node_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            Node result = apiInstance.clustersClusterIdNodesNodeIdGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            Node result = apiInstance.clustersClusterIdNodesNodeIdGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get a cluster's node with specified id.
[apiInstance clustersClusterIdNodesNodeIdGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(Node output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdGetExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.

            try
            {
                // Get a cluster's node with specified id.
                Node result = apiInstance.clustersClusterIdNodesNodeIdGet(clusterId, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdGet($clusterId, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdGet(clusterId => $clusterId, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.

try: 
    # Get a cluster's node with specified id.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_get(clusterId, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required

Responses

Status: 200 - Get the cluster's node details.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdInstancesGet

Get a node's instances that have at least one of the parameters (Node/FT_Node) on the specific node.

A successful response will return all the instances that the specified node has resources on them.


/clusters/{cluster_id}/nodes/{node_id}/instances

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[Instance] result = apiInstance.clustersClusterIdNodesNodeIdInstancesGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[Instance] result = apiInstance.clustersClusterIdNodesNodeIdInstancesGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdInstancesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get a node's instances that have at least one of the parameters (Node/FT_Node) on the specific node.
[apiInstance clustersClusterIdNodesNodeIdInstancesGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdInstancesGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdInstancesGetExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.

            try
            {
                // Get a node's instances that have at least one of the parameters (Node/FT_Node) on the specific node.
                array[Instance] result = apiInstance.clustersClusterIdNodesNodeIdInstancesGet(clusterId, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdInstancesGet($clusterId, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdInstancesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdInstancesGet(clusterId => $clusterId, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdInstancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.

try: 
    # Get a node's instances that have at least one of the parameters (Node/FT_Node) on the specific node.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_instances_get(clusterId, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdInstancesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required

Responses

Status: 200 - The instances of the node.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdResourceGroupsGet

Get a node's RG's that this node has at least one core on it.

A successful response will return all the resource groups that the specified node has resources on them.


/clusters/{cluster_id}/nodes/{node_id}/resource_groups

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdNodesNodeIdResourceGroupsGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdNodesNodeIdResourceGroupsGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get a node's RG's that this node has at least one core on it.
[apiInstance clustersClusterIdNodesNodeIdResourceGroupsGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(array[ResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdResourceGroupsGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdResourceGroupsGetExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.

            try
            {
                // Get a node's RG's that this node has at least one core on it.
                array[ResourceGroup] result = apiInstance.clustersClusterIdNodesNodeIdResourceGroupsGet(clusterId, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdResourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdResourceGroupsGet($clusterId, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdResourceGroupsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdResourceGroupsGet(clusterId => $clusterId, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdResourceGroupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.

try: 
    # Get a node's RG's that this node has at least one core on it.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_resource_groups_get(clusterId, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdResourceGroupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required

Responses

Status: 200 - The RG's of the node.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdValidateDeletionGet

Get a validation if node removal is possible.

A successful response will return a list of cluster's nodes.


/clusters/{cluster_id}/nodes/{node_id}/validate_deletion

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/validate_deletion"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            apiInstance.clustersClusterIdNodesNodeIdValidateDeletionGet(clusterId, nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdValidateDeletionGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long nodeId = 789; // Long | The node id.
        try {
            apiInstance.clustersClusterIdNodesNodeIdValidateDeletionGet(clusterId, nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#clustersClusterIdNodesNodeIdValidateDeletionGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *nodeId = 789; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get a validation if node removal is possible.
[apiInstance clustersClusterIdNodesNodeIdValidateDeletionGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NodesApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = 789; // {{Long}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdNodesNodeIdValidateDeletionGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdValidateDeletionGetExample
    {
        public void main()
        {

            var apiInstance = new NodesApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = 789;  // Long | The node id.

            try
            {
                // Get a validation if node removal is possible.
                apiInstance.clustersClusterIdNodesNodeIdValidateDeletionGet(clusterId, nodeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.clustersClusterIdNodesNodeIdValidateDeletionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodesApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = 789; // Long | The node id.

try {
    $api_instance->clustersClusterIdNodesNodeIdValidateDeletionGet($clusterId, $nodeId);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->clustersClusterIdNodesNodeIdValidateDeletionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = 789; # Long | The node id.

eval { 
    $api_instance->clustersClusterIdNodesNodeIdValidateDeletionGet(clusterId => $clusterId, nodeId => $nodeId);
};
if ($@) {
    warn "Exception when calling NodesApi->clustersClusterIdNodesNodeIdValidateDeletionGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
clusterId = 789 # Long | The cluster id.
nodeId = 789 # Long | The node id.

try: 
    # Get a validation if node removal is possible.
    api_instance.clusters_cluster_id_nodes_node_id_validate_deletion_get(clusterId, nodeId)
except ApiException as e:
    print("Exception when calling NodesApi->clustersClusterIdNodesNodeIdValidateDeletionGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
Long (int64)
The node id.
Required

Responses

Status: 200 - Successful, Node removal is possible.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Permissions

permissionsGet

Get a list of permissions.

A successful response will return a list of the available permissions. A permission is a connection between a role and the allowed resource group. Action can be performed only by users with `admin` role.


/permissions

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/permissions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        
        PermissionsApi apiInstance = new PermissionsApi();
        try {
            array[Permission] result = apiInstance.permissionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PermissionsApi;

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        try {
            array[Permission] result = apiInstance.permissionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsGet");
            e.printStackTrace();
        }
    }
}

PermissionsApi *apiInstance = [[PermissionsApi alloc] init];

// Get a list of permissions.
[apiInstance permissionsGetWithCompletionHandler: 
              ^(array[Permission] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.permissionsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class permissionsGetExample
    {
        public void main()
        {

            var apiInstance = new PermissionsApi();

            try
            {
                // Get a list of permissions.
                array[Permission] result = apiInstance.permissionsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPermissionsApi();

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

my $api_instance = WWW::SwaggerClient::PermissionsApi->new();

eval { 
    my $result = $api_instance->permissionsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PermissionsApi()

try: 
    # Get a list of permissions.
    api_response = api_instance.permissions_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsGet: %s\n" % e)

Parameters

Responses

Status: 200 - List of available permissions

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

permissionsResourceGroupsResourceGroupIdGet

Get a list of permissions for a specific resource group.

A successful response will return a list of the available roles permitted to operate on the specified resource group.


/permissions/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/permissions/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        
        PermissionsApi apiInstance = new PermissionsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Permission] result = apiInstance.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PermissionsApi;

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Permission] result = apiInstance.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

PermissionsApi *apiInstance = [[PermissionsApi alloc] init];

// Get a list of permissions for a specific resource group.
[apiInstance permissionsResourceGroupsResourceGroupIdGetWith:resourceGroupId
              completionHandler: ^(array[Permission] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class permissionsResourceGroupsResourceGroupIdGetExample
    {
        public void main()
        {

            var apiInstance = new PermissionsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get a list of permissions for a specific resource group.
                array[Permission] result = apiInstance.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPermissionsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::PermissionsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->permissionsResourceGroupsResourceGroupIdGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PermissionsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get a list of permissions for a specific resource group.
    api_response = api_instance.permissions_resource_groups_resource_group_id_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - List of available permissions of resource group

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete

Revoke a role access from a resource group

Revoke a given role to the specified resource group Action can be performed only by users with `admin` role.


/permissions/resource_groups/{resource_group_id}/roles/{role_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/permissions/resource_groups/{resource_group_id}/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PermissionsApi;

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *resourceGroupId = 789; // The resource group id.

PermissionsApi *apiInstance = [[PermissionsApi alloc] init];

// Revoke a role access from a resource group
[apiInstance permissionsResourceGroupsResourceGroupIdRolesRoleIdDeleteWith:roleId
    resourceGroupId:resourceGroupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var roleId = 789; // {{Long}} The role id.
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class permissionsResourceGroupsResourceGroupIdRolesRoleIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new PermissionsApi();
            var roleId = 789;  // Long | The role id.
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Revoke a role access from a resource group
                apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPermissionsApi();
$roleId = 789; // Long | The role id.
$resourceGroupId = 789; // Long | The resource group id.

try {
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete($roleId, $resourceGroupId);
} catch (Exception $e) {
    echo 'Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PermissionsApi;

my $api_instance = WWW::SwaggerClient::PermissionsApi->new();
my $roleId = 789; # Long | The role id.
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId => $roleId, resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PermissionsApi()
roleId = 789 # Long | The role id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Revoke a role access from a resource group
    api_instance.permissions_resource_groups_resource_group_id_roles_role_id_delete(roleId, resourceGroupId)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 204 - Successfully role revokement.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

permissionsResourceGroupsResourceGroupIdRolesRoleIdPost

Assign a resource group to a specific role

Assign a given role to the specified resource group Action can be performed only by users with `admin` role.


/permissions/resource_groups/{resource_group_id}/roles/{role_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/permissions/resource_groups/{resource_group_id}/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PermissionsApi;

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdPost");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *resourceGroupId = 789; // The resource group id.

PermissionsApi *apiInstance = [[PermissionsApi alloc] init];

// Assign a resource group to a specific role
[apiInstance permissionsResourceGroupsResourceGroupIdRolesRoleIdPostWith:roleId
    resourceGroupId:resourceGroupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var roleId = 789; // {{Long}} The role id.
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class permissionsResourceGroupsResourceGroupIdRolesRoleIdPostExample
    {
        public void main()
        {

            var apiInstance = new PermissionsApi();
            var roleId = 789;  // Long | The role id.
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Assign a resource group to a specific role
                apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPermissionsApi();
$roleId = 789; // Long | The role id.
$resourceGroupId = 789; // Long | The resource group id.

try {
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost($roleId, $resourceGroupId);
} catch (Exception $e) {
    echo 'Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PermissionsApi;

my $api_instance = WWW::SwaggerClient::PermissionsApi->new();
my $roleId = 789; # Long | The role id.
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId => $roleId, resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PermissionsApi()
roleId = 789 # Long | The role id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Assign a resource group to a specific role
    api_instance.permissions_resource_groups_resource_group_id_roles_role_id_post(roleId, resourceGroupId)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - Successfully role assignment.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Providers

clustersClusterIdProvidersProviderIdAssignPut

Assign a provider to a cluster.

A successful response will assign the given provider to the given cluster. Only providers of mode GENERAL_STORAGE_PROVIDER can be assigned to clusters with no assigned provider.


/clusters/{cluster_id}/providers/{provider_id}/assign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/providers/{provider_id}/assign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.clustersClusterIdProvidersProviderIdAssignPut(clusterId, providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#clustersClusterIdProvidersProviderIdAssignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.clustersClusterIdProvidersProviderIdAssignPut(clusterId, providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#clustersClusterIdProvidersProviderIdAssignPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *providerId = 789; // The provider's id.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Assign a provider to a cluster.
[apiInstance clustersClusterIdProvidersProviderIdAssignPutWith:clusterId
    providerId:providerId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var clusterId = 789; // {{Long}} The cluster id.
var providerId = 789; // {{Long}} The provider's id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdProvidersProviderIdAssignPut(clusterId, providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdProvidersProviderIdAssignPutExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var clusterId = 789;  // Long | The cluster id.
            var providerId = 789;  // Long | The provider's id.

            try
            {
                // Assign a provider to a cluster.
                apiInstance.clustersClusterIdProvidersProviderIdAssignPut(clusterId, providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.clustersClusterIdProvidersProviderIdAssignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$clusterId = 789; // Long | The cluster id.
$providerId = 789; // Long | The provider's id.

try {
    $api_instance->clustersClusterIdProvidersProviderIdAssignPut($clusterId, $providerId);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdAssignPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $providerId = 789; # Long | The provider's id.

eval { 
    $api_instance->clustersClusterIdProvidersProviderIdAssignPut(clusterId => $clusterId, providerId => $providerId);
};
if ($@) {
    warn "Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdAssignPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
clusterId = 789 # Long | The cluster id.
providerId = 789 # Long | The provider's id.

try: 
    # Assign a provider to a cluster.
    api_instance.clusters_cluster_id_providers_provider_id_assign_put(clusterId, providerId)
except ApiException as e:
    print("Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdAssignPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
provider_id*
Long (int64)
The provider's id.
Required

Responses

Status: 204 - Successfully assigned provider to cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdProvidersProviderIdDeassignPut

Deassign a provider to a cluster.

A successful response will deassign the given provider to the given cluster. Only clusters with no assigned-attached provider can be deassigned.


/clusters/{cluster_id}/providers/{provider_id}/deassign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/providers/{provider_id}/deassign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.clustersClusterIdProvidersProviderIdDeassignPut(clusterId, providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#clustersClusterIdProvidersProviderIdDeassignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.clustersClusterIdProvidersProviderIdDeassignPut(clusterId, providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#clustersClusterIdProvidersProviderIdDeassignPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *providerId = 789; // The provider's id.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Deassign a provider to a cluster.
[apiInstance clustersClusterIdProvidersProviderIdDeassignPutWith:clusterId
    providerId:providerId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var clusterId = 789; // {{Long}} The cluster id.
var providerId = 789; // {{Long}} The provider's id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdProvidersProviderIdDeassignPut(clusterId, providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdProvidersProviderIdDeassignPutExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var clusterId = 789;  // Long | The cluster id.
            var providerId = 789;  // Long | The provider's id.

            try
            {
                // Deassign a provider to a cluster.
                apiInstance.clustersClusterIdProvidersProviderIdDeassignPut(clusterId, providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.clustersClusterIdProvidersProviderIdDeassignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$clusterId = 789; // Long | The cluster id.
$providerId = 789; // Long | The provider's id.

try {
    $api_instance->clustersClusterIdProvidersProviderIdDeassignPut($clusterId, $providerId);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdDeassignPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $providerId = 789; # Long | The provider's id.

eval { 
    $api_instance->clustersClusterIdProvidersProviderIdDeassignPut(clusterId => $clusterId, providerId => $providerId);
};
if ($@) {
    warn "Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdDeassignPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
clusterId = 789 # Long | The cluster id.
providerId = 789 # Long | The provider's id.

try: 
    # Deassign a provider to a cluster.
    api_instance.clusters_cluster_id_providers_provider_id_deassign_put(clusterId, providerId)
except ApiException as e:
    print("Exception when calling ProvidersApi->clustersClusterIdProvidersProviderIdDeassignPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
provider_id*
Long (int64)
The provider's id.
Required

Responses

Status: 204 - Successfully deassigned provider from cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersGet

Get a list of the available providers.

A successful response will return a list of the available providers. Results can be filtered using the `mode` and `type` of the providers.


/providers

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers?mode=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        String mode = mode_example; // String | The mode of providers.
        String type = type_example; // String | The type of providers.
        try {
            array[Provider] result = apiInstance.providersGet(mode, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        String mode = mode_example; // String | The mode of providers.
        String type = type_example; // String | The type of providers.
        try {
            array[Provider] result = apiInstance.providersGet(mode, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersGet");
            e.printStackTrace();
        }
    }
}
String *mode = mode_example; // The mode of providers. (optional)
String *type = type_example; // The type of providers. (optional)

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Get a list of the available providers.
[apiInstance providersGetWith:mode
    type:type
              completionHandler: ^(array[Provider] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var opts = { 
  'mode': mode_example, // {{String}} The mode of providers.
  'type': type_example // {{String}} The type of providers.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersGetExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var mode = mode_example;  // String | The mode of providers. (optional) 
            var type = type_example;  // String | The type of providers. (optional) 

            try
            {
                // Get a list of the available providers.
                array[Provider] result = apiInstance.providersGet(mode, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$mode = mode_example; // String | The mode of providers.
$type = type_example; // String | The type of providers.

try {
    $result = $api_instance->providersGet($mode, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->providersGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $mode = mode_example; # String | The mode of providers.
my $type = type_example; # String | The type of providers.

eval { 
    my $result = $api_instance->providersGet(mode => $mode, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
mode = mode_example # String | The mode of providers. (optional)
type = type_example # String | The type of providers. (optional)

try: 
    # Get a list of the available providers.
    api_response = api_instance.providers_get(mode=mode, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersGet: %s\n" % e)

Parameters

Query parameters
Name Description
mode
String
The mode of providers.
type
String
The type of providers.

Responses

Status: 200 - The providers' details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersModesAvailabilityGet

Get provider's availability per mode.

A successful response will return the availability of providers per mode.


/providers/modes_availability

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers/modes_availability"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        try {
            ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersModesAvailabilityGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        try {
            ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersModesAvailabilityGet");
            e.printStackTrace();
        }
    }
}

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Get provider's availability per mode.
[apiInstance providersModesAvailabilityGetWithCompletionHandler: 
              ^(ProvidersModeAvailability output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersModesAvailabilityGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersModesAvailabilityGetExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();

            try
            {
                // Get provider's availability per mode.
                ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersModesAvailabilityGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();

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

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();

eval { 
    my $result = $api_instance->providersModesAvailabilityGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersModesAvailabilityGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()

try: 
    # Get provider's availability per mode.
    api_response = api_instance.providers_modes_availability_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersModesAvailabilityGet: %s\n" % e)

Parameters

Responses

Status: 200 - The providers' availability.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersPost

Create a new provider.

A successful response will create a new provider. Field `region` and is required for `S3` providers. Fields `access_key_id` and `secret_access_key` are required for S3 and EC2 providers. Fields `nfs_server_ip` and `nfs_server_path` are required for NFS providers.


/providers

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/providers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        try {
            array[Provider] result = apiInstance.providersPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        try {
            array[Provider] result = apiInstance.providersPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersPost");
            e.printStackTrace();
        }
    }
}

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Create a new provider.
[apiInstance providersPostWithCompletionHandler: 
              ^(array[Provider] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersPostExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();

            try
            {
                // Create a new provider.
                array[Provider] result = apiInstance.providersPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();

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

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();

eval { 
    my $result = $api_instance->providersPost();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()

try: 
    # Create a new provider.
    api_response = api_instance.providers_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersPost: %s\n" % e)

Parameters

Responses

Status: 201 - The created provider.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersProviderIdDelete

Delete a provider.

A successful response will delete the requested provider.


/providers/{provider_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/providers/{provider_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.providersProviderIdDelete(providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        try {
            apiInstance.providersProviderIdDelete(providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdDelete");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's id.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Delete a provider.
[apiInstance providersProviderIdDeleteWith:providerId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var providerId = 789; // {{Long}} The provider's id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.providersProviderIdDelete(providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersProviderIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var providerId = 789;  // Long | The provider's id.

            try
            {
                // Delete a provider.
                apiInstance.providersProviderIdDelete(providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersProviderIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$providerId = 789; // Long | The provider's id.

try {
    $api_instance->providersProviderIdDelete($providerId);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->providersProviderIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $providerId = 789; # Long | The provider's id.

eval { 
    $api_instance->providersProviderIdDelete(providerId => $providerId);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersProviderIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
providerId = 789 # Long | The provider's id.

try: 
    # Delete a provider.
    api_instance.providers_provider_id_delete(providerId)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersProviderIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
provider_id*
Long (int64)
The provider's id.
Required

Responses

Status: 204 - Provider deleted successfully

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersProviderIdGet

Get a provider.

A successful response will return the requested provider.


/providers/{provider_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers/{provider_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        try {
            Provider result = apiInstance.providersProviderIdGet(providerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        try {
            Provider result = apiInstance.providersProviderIdGet(providerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdGet");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's id.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Get a provider.
[apiInstance providersProviderIdGetWith:providerId
              completionHandler: ^(Provider output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var providerId = 789; // {{Long}} The provider's id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersProviderIdGet(providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersProviderIdGetExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var providerId = 789;  // Long | The provider's id.

            try
            {
                // Get a provider.
                Provider result = apiInstance.providersProviderIdGet(providerId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersProviderIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$providerId = 789; // Long | The provider's id.

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

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $providerId = 789; # Long | The provider's id.

eval { 
    my $result = $api_instance->providersProviderIdGet(providerId => $providerId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersProviderIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
providerId = 789 # Long | The provider's id.

try: 
    # Get a provider.
    api_response = api_instance.providers_provider_id_get(providerId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersProviderIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider_id*
Long (int64)
The provider's id.
Required

Responses

Status: 200 - The provider's details.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet

Get a list of the supported instance types of the provider for the specified region and availability zone.

A successful response will return a list of the supported instance types of the provider. Provider should be an existing execution provider.


/providers/{provider_id}/region/{region}/availability_zone/{zone}/instance_types

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers/{provider_id}/region/{region}/availability_zone/{zone}/instance_types"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

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

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        String region = region_example; // String | The region's name.
        String zone = zone_example; // String | The availability zone's name.
        try {
            array['String'] result = apiInstance.providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet(providerId, region, zone);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        String region = region_example; // String | The region's name.
        String zone = zone_example; // String | The availability zone's name.
        try {
            array['String'] result = apiInstance.providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet(providerId, region, zone);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's id.
String *region = region_example; // The region's name.
String *zone = zone_example; // The availability zone's name.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Get a list of the supported instance types of the provider for the specified region and 
availability zone.

[apiInstance providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGetWith:providerId
    region:region
    zone:zone
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var providerId = 789; // {{Long}} The provider's id.
var region = region_example; // {{String}} The region's name.
var zone = zone_example; // {{String}} The availability zone's name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet(providerId, region, zone, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGetExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var providerId = 789;  // Long | The provider's id.
            var region = region_example;  // String | The region's name.
            var zone = zone_example;  // String | The availability zone's name.

            try
            {
                // Get a list of the supported instance types of the provider for the specified region and 
availability zone.

                array['String'] result = apiInstance.providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet(providerId, region, zone);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$providerId = 789; // Long | The provider's id.
$region = region_example; // String | The region's name.
$zone = zone_example; // String | The availability zone's name.

try {
    $result = $api_instance->providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet($providerId, $region, $zone);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $providerId = 789; # Long | The provider's id.
my $region = region_example; # String | The region's name.
my $zone = zone_example; # String | The availability zone's name.

eval { 
    my $result = $api_instance->providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet(providerId => $providerId, region => $region, zone => $zone);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProvidersApi()
providerId = 789 # Long | The provider's id.
region = region_example # String | The region's name.
zone = zone_example # String | The availability zone's name.

try: 
    # Get a list of the supported instance types of the provider for the specified region and 
availability zone.

    api_response = api_instance.providers_provider_id_region_region_availability_zone_zone_instance_types_get(providerId, region, zone)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersProviderIdRegionRegionAvailabilityZoneZoneInstanceTypesGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider_id*
Long (int64)
The provider's id.
Required
region*
String
The region's name.
Required
zone*
String
The availability zone's name.
Required

Responses

Status: 200 - list of the instance types

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Recipes

clustersValidateCreationPost

Validate multiple new AWS cluster.

AWS resources are limited. Calling this endpoint, multiple new AWS cluster can be validate if they fit even before there creation.


/clusters/validate_creation

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/validate_creation"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        MultipleAWSCreationParams body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.
        try {
            ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#clustersValidateCreationPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        MultipleAWSCreationParams body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.
        try {
            ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#clustersValidateCreationPost");
            e.printStackTrace();
        }
    }
}
MultipleAWSCreationParams *body = ; // New cluster(s')'s parameters. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Validate multiple new AWS cluster.
[apiInstance clustersValidateCreationPostWith:body
              completionHandler: ^(ValidateClusterCreation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var opts = { 
  'body':  // {{MultipleAWSCreationParams}} New cluster(s')'s parameters.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersValidateCreationPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersValidateCreationPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var body = new MultipleAWSCreationParams(); // MultipleAWSCreationParams | New cluster(s')'s parameters. (optional) 

            try
            {
                // Validate multiple new AWS cluster.
                ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.clustersValidateCreationPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $body = WWW::SwaggerClient::Object::MultipleAWSCreationParams->new(); # MultipleAWSCreationParams | New cluster(s')'s parameters.

eval { 
    my $result = $api_instance->clustersValidateCreationPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->clustersValidateCreationPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
body =  # MultipleAWSCreationParams | New cluster(s')'s parameters. (optional)

try: 
    # Validate multiple new AWS cluster.
    api_response = api_instance.clusters_validate_creation_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->clustersValidateCreationPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster creation.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesExecutionStatusGet

Get status SIM's services for Ansible-playbook execution.

Check and return the status of Docker and alpine-ansible image. If something is missing, an error will be returned.


/recipes/execution_status

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/execution_status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        try {
            apiInstance.recipesExecutionStatusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesExecutionStatusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        try {
            apiInstance.recipesExecutionStatusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesExecutionStatusGet");
            e.printStackTrace();
        }
    }
}

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get status SIM's services for Ansible-playbook execution.
[apiInstance recipesExecutionStatusGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesExecutionStatusGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesExecutionStatusGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();

            try
            {
                // Get status SIM's services for Ansible-playbook execution.
                apiInstance.recipesExecutionStatusGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesExecutionStatusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();

try {
    $api_instance->recipesExecutionStatusGet();
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesExecutionStatusGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();

eval { 
    $api_instance->recipesExecutionStatusGet();
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesExecutionStatusGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()

try: 
    # Get status SIM's services for Ansible-playbook execution.
    api_instance.recipes_execution_status_get()
except ApiException as e:
    print("Exception when calling RecipesApi->recipesExecutionStatusGet: %s\n" % e)

Parameters

Responses

Status: 200 - Docker and alpine-ansible image are correctly installed.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesInstalledGet

Get all installed recipe template's.

A successful response will return a list with the installed recipe recipe templates.


/recipes/installed

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        try {
            array[Recipe] result = apiInstance.recipesInstalledGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        try {
            array[Recipe] result = apiInstance.recipesInstalledGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledGet");
            e.printStackTrace();
        }
    }
}

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get all installed recipe template's.
[apiInstance recipesInstalledGetWithCompletionHandler: 
              ^(array[Recipe] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesInstalledGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesInstalledGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();

            try
            {
                // Get all installed recipe template's.
                array[Recipe] result = apiInstance.recipesInstalledGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();

eval { 
    my $result = $api_instance->recipesInstalledGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()

try: 
    # Get all installed recipe template's.
    api_response = api_instance.recipes_installed_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the installed recipe templates.

[{"id":29,"name":"MariaDB","description":"MariaDB Description.","version":"1.0.0","installed_recipes":[{"id":10,"cluster":{"id":32,"name":"Cluster32"},"status":"ACTIVE","error_description":"","vms":[{"id":304,"name":"mariaDB"}],"rg":{"id":101,"name":"resourrce group for mariaDB"},"support_assets_deletion":true}]}]

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesInstalledRecipeTemplateIdAnsibleLogsGet

Retrieves the ansible playbook's log of the installed recipe.

A successful response will fetch the latest lines to retrieve from recipe's ansible playbook.


/recipes/installed/{recipe_template_id}/ansible_logs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed/{recipe_template_id}/ansible_logs?lines="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
        try {
            RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
        try {
            RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *lines = 56; // The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Retrieves the ansible playbook's log of the installed recipe.
[apiInstance recipesInstalledRecipeTemplateIdAnsibleLogsGetWith:recipeTemplateId
    lines:lines
              completionHandler: ^(RecipeTemplateAnsibleLogs output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'lines': 56 // {{Integer}} The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesInstalledRecipeTemplateIdAnsibleLogsGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var lines = 56;  // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional) 

            try
            {
                // Retrieves the ansible playbook's log of the installed recipe.
                RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledRecipeTemplateIdAnsibleLogsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

try {
    $result = $api_instance->recipesInstalledRecipeTemplateIdAnsibleLogsGet($recipeTemplateId, $lines);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdAnsibleLogsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $lines = 56; # Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

eval { 
    my $result = $api_instance->recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId => $recipeTemplateId, lines => $lines);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdAnsibleLogsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
lines = 56 # Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional)

try: 
    # Retrieves the ansible playbook's log of the installed recipe.
    api_response = api_instance.recipes_installed_recipe_template_id_ansible_logs_get(recipeTemplateId, lines=lines)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdAnsibleLogsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Query parameters
Name Description
lines
Integer
The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

Responses

Status: 200 - The retrieved ansible playbook's logs.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesInstalledRecipeTemplateIdDelete

Delete the specified installed recipe template.

A successful response will delete the specified recipe template instance. Action can be performed only by users with `admin` role.


/recipes/installed/{recipe_template_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed/{recipe_template_id}?cleanup="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Boolean cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Boolean cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Boolean *cleanup = true; // Whether or not we want to cleanup all the generated resources with this recipe. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Delete the specified installed recipe template.
[apiInstance recipesInstalledRecipeTemplateIdDeleteWith:recipeTemplateId
    cleanup:cleanup
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'cleanup': true // {{Boolean}} Whether or not we want to cleanup all the generated resources with this recipe.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesInstalledRecipeTemplateIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var cleanup = true;  // Boolean | Whether or not we want to cleanup all the generated resources with this recipe. (optional) 

            try
            {
                // Delete the specified installed recipe template.
                apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledRecipeTemplateIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.

try {
    $api_instance->recipesInstalledRecipeTemplateIdDelete($recipeTemplateId, $cleanup);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $cleanup = true; # Boolean | Whether or not we want to cleanup all the generated resources with this recipe.

eval { 
    $api_instance->recipesInstalledRecipeTemplateIdDelete(recipeTemplateId => $recipeTemplateId, cleanup => $cleanup);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
cleanup = true # Boolean | Whether or not we want to cleanup all the generated resources with this recipe. (optional)

try: 
    # Delete the specified installed recipe template.
    api_instance.recipes_installed_recipe_template_id_delete(recipeTemplateId, cleanup=cleanup)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Query parameters
Name Description
cleanup
Boolean
Whether or not we want to cleanup all the generated resources with this recipe.

Responses

Status: 202 - Recipe template instance has been successfully accepted for asset deletion.

Status: 204 - Recipe template instance has been successfully deleted.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost

Re-execute a recipe in a groups of VMs that exist from a previous recipe execution.

A successful response will start an ansible container that runs the same (or not) recipe template, to a group of instances that already created from an other recipe execution.


/recipes/installed/{recipe_template_id}/installed_templates/{new_recipe_template_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed/{recipe_template_id}/installed_templates/{new_recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer newRecipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost(recipeTemplateId, newRecipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer newRecipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost(recipeTemplateId, newRecipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *newRecipeTemplateId = 56; // The template id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Re-execute a recipe in a groups of VMs that exist from a previous recipe execution.
[apiInstance recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPostWith:recipeTemplateId
    newRecipeTemplateId:newRecipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var newRecipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost(recipeTemplateId, newRecipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var newRecipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Re-execute a recipe in a groups of VMs that exist from a previous recipe execution.
                apiInstance.recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost(recipeTemplateId, newRecipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$newRecipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost($recipeTemplateId, $newRecipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $newRecipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost(recipeTemplateId => $recipeTemplateId, newRecipeTemplateId => $newRecipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
newRecipeTemplateId = 56 # Integer | The template id.

try: 
    # Re-execute a recipe in a groups of VMs that exist from a previous recipe execution.
    api_instance.recipes_installed_recipe_template_id_installed_templates_new_recipe_template_id_post(recipeTemplateId, newRecipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdInstalledTemplatesNewRecipeTemplateIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
new_recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - Re-execution has succesfully started.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdClusterRgPost

Create a cluster and resource group for a specific recipe template.

A successful response will create a resource group and cluster based on the resources required for the specified recipe template. Action can be performed only by users with `admin` role.


/recipes/templates/{recipe_template_id}/cluster_rg

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/cluster_rg"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        ClusterInfrastructure body = ; // ClusterInfrastructure | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClusterRgPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        ClusterInfrastructure body = ; // ClusterInfrastructure | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClusterRgPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
ClusterInfrastructure *body = ; // The parameters for creating the new instance(s). (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Create a cluster and resource group for a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdClusterRgPostWith:recipeTemplateId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{ClusterInfrastructure}} The parameters for creating the new instance(s).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdClusterRgPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new ClusterInfrastructure(); // ClusterInfrastructure | The parameters for creating the new instance(s). (optional) 

            try
            {
                // Create a cluster and resource group for a specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdClusterRgPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // ClusterInfrastructure | The parameters for creating the new instance(s).

try {
    $api_instance->recipesTemplatesRecipeTemplateIdClusterRgPost($recipeTemplateId, $body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClusterRgPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::ClusterInfrastructure->new(); # ClusterInfrastructure | The parameters for creating the new instance(s).

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId => $recipeTemplateId, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClusterRgPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # ClusterInfrastructure | The parameters for creating the new instance(s). (optional)

try: 
    # Create a cluster and resource group for a specific recipe template.
    api_instance.recipes_templates_recipe_template_id_cluster_rg_post(recipeTemplateId, body=body)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClusterRgPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - The requested cluster and resource group are preparing.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost

Create a resource group within the specified cluster for a specific recipe template.

A successful response will just create a resource group at the specified cluster based on the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/clusters/{cluster_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Long *clusterId = 789; // The cluster id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Create a resource group within the specified cluster for a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPostWith:recipeTemplateId
    clusterId:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Create a resource group within the specified cluster for a specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost($recipeTemplateId, $clusterId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId => $recipeTemplateId, clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
clusterId = 789 # Long | The cluster id.

try: 
    # Create a resource group within the specified cluster for a specific recipe template.
    api_instance.recipes_templates_recipe_template_id_clusters_cluster_id_resource_groups_post(recipeTemplateId, clusterId)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The resource group created successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdDelete

Delete a specific recipe template.

A successful response will delete a recipe template from the system.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdDelete(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdDelete(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Delete a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdDeleteWith:recipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdDelete(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Delete a specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdDelete(recipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdDelete($recipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdDelete(recipeTemplateId => $recipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Delete a specific recipe template.
    api_instance.recipes_templates_recipe_template_id_delete(recipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 204 - Recipe template delete successfully

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdExportPut

Export a recipe template.

A successful response will export/download a tar.gz file of recipe template. Only authorized users can perform this operation based on the recipe template's permissions.


/recipes/templates/{recipe_template_id}/export

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/export"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            byte[] result = apiInstance.recipesTemplatesRecipeTemplateIdExportPut(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdExportPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            byte[] result = apiInstance.recipesTemplatesRecipeTemplateIdExportPut(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdExportPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Export a recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdExportPutWith:recipeTemplateId
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdExportPut(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdExportPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Export a recipe template.
                byte[] result = apiInstance.recipesTemplatesRecipeTemplateIdExportPut(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdExportPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdExportPut(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdExportPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Export a recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_export_put(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdExportPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The recipe template file is sent.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdPost

Create new instance(s) based on the specific recipe template.

A successful response will spawn new instance(s) based on the specified recipe template. There are 3 cases according to the parameters: 1. Create an instance from recipe based on an existing cluster and an existing resource group. 2. Create an instance from recipe based on an existing cluster, but a new resource group. 3. Create only resource group on an existing cluster 4. Create an instance from recipe based on a new AWS cluster and a resource group on it. 5. Create only resource group on a new AWS cluster Recipe template can be deployed at one or multiple clusters. Multiple on-Premise / AWS cluster can be affected on a single call of the this end-point.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}?single_ansible_run="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        InputResources body = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
        Boolean singleAnsibleRun = true; // Boolean | It runs one Docker-ansible for all created recipes.
        try {
            array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body, singleAnsibleRun);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        InputResources body = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
        Boolean singleAnsibleRun = true; // Boolean | It runs one Docker-ansible for all created recipes.
        try {
            array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body, singleAnsibleRun);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
InputResources *body = ; // The parameters for creating the new instance(s) at one or multiple clusters. (optional)
Boolean *singleAnsibleRun = true; // It runs one Docker-ansible for all created recipes. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Create new instance(s) based on the specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdPostWith:recipeTemplateId
    body:body
    singleAnsibleRun:singleAnsibleRun
              completionHandler: ^(array[InputResourcesResponse] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{InputResources}} The parameters for creating the new instance(s) at one or multiple clusters.
  'singleAnsibleRun': true // {{Boolean}} It runs one Docker-ansible for all created recipes.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new InputResources(); // InputResources | The parameters for creating the new instance(s) at one or multiple clusters. (optional) 
            var singleAnsibleRun = true;  // Boolean | It runs one Docker-ansible for all created recipes. (optional) 

            try
            {
                // Create new instance(s) based on the specific recipe template.
                array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body, singleAnsibleRun);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
$singleAnsibleRun = true; // Boolean | It runs one Docker-ansible for all created recipes.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdPost($recipeTemplateId, $body, $singleAnsibleRun);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::InputResources->new(); # InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
my $singleAnsibleRun = true; # Boolean | It runs one Docker-ansible for all created recipes.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdPost(recipeTemplateId => $recipeTemplateId, body => $body, singleAnsibleRun => $singleAnsibleRun);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # InputResources | The parameters for creating the new instance(s) at one or multiple clusters. (optional)
singleAnsibleRun = true # Boolean | It runs one Docker-ansible for all created recipes. (optional)

try: 
    # Create new instance(s) based on the specific recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_post(recipeTemplateId, body=body, singleAnsibleRun=singleAnsibleRun)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body
Query parameters
Name Description
single_ansible_run
Boolean
It runs one Docker-ansible for all created recipes.

Responses

Status: 207 - Multi-Status response conveys information for Instance(s) creation

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

RecipesTemplate

recipesTemplatesFilesUploadPost

Upload a recipe template's file.

A successful response will accept the uploaded file and create and add it to the existing recipe template


/recipes/templates/files/upload

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/files/upload"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        UploadRecipeTemplateFile body = ; // UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

        try {
            apiInstance.recipesTemplatesFilesUploadPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesFilesUploadPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        UploadRecipeTemplateFile body = ; // UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

        try {
            apiInstance.recipesTemplatesFilesUploadPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesFilesUploadPost");
            e.printStackTrace();
        }
    }
}
UploadRecipeTemplateFile *body = ; // The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Upload a recipe template's file.
[apiInstance recipesTemplatesFilesUploadPostWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var opts = { 
  'body':  // {{UploadRecipeTemplateFile}} The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesFilesUploadPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesFilesUploadPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var body = new UploadRecipeTemplateFile(); // UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional) 

            try
            {
                // Upload a recipe template's file.
                apiInstance.recipesTemplatesFilesUploadPost(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesFilesUploadPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$body = ; // UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.


try {
    $api_instance->recipesTemplatesFilesUploadPost($body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesFilesUploadPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $body = WWW::SwaggerClient::Object::UploadRecipeTemplateFile->new(); # UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.


eval { 
    $api_instance->recipesTemplatesFilesUploadPost(body => $body);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesFilesUploadPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
body =  # UploadRecipeTemplateFile | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional)

try: 
    # Upload a recipe template's file.
    api_instance.recipes_templates_files_upload_post(body=body)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesFilesUploadPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The recipe template uploaded successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesGet

Get all available recipe templates.

A successful response will return a list of the available recipe templates.


/recipes/templates

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        try {
            array[RecipeTemplate] result = apiInstance.recipesTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        try {
            array[RecipeTemplate] result = apiInstance.recipesTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesGet");
            e.printStackTrace();
        }
    }
}

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get all available recipe templates.
[apiInstance recipesTemplatesGetWithCompletionHandler: 
              ^(array[RecipeTemplate] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();

            try
            {
                // Get all available recipe templates.
                array[RecipeTemplate] result = apiInstance.recipesTemplatesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();

eval { 
    my $result = $api_instance->recipesTemplatesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()

try: 
    # Get all available recipe templates.
    api_response = api_instance.recipes_templates_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the recipe templates.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesPost

Create a new recipe template.

A successful response will create a new recipe template from the existing prototype and return it alongside its files.


/recipes/templates

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        CreateRecipeTemplate body = ; // CreateRecipeTemplate | The parameters for creating a new recipe template.
        try {
            array[RecipeTemplateWithFiles] result = apiInstance.recipesTemplatesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        CreateRecipeTemplate body = ; // CreateRecipeTemplate | The parameters for creating a new recipe template.
        try {
            array[RecipeTemplateWithFiles] result = apiInstance.recipesTemplatesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesPost");
            e.printStackTrace();
        }
    }
}
CreateRecipeTemplate *body = ; // The parameters for creating a new recipe template. (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Create a new recipe template.
[apiInstance recipesTemplatesPostWith:body
              completionHandler: ^(array[RecipeTemplateWithFiles] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var opts = { 
  'body':  // {{CreateRecipeTemplate}} The parameters for creating a new recipe template.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var body = new CreateRecipeTemplate(); // CreateRecipeTemplate | The parameters for creating a new recipe template. (optional) 

            try
            {
                // Create a new recipe template.
                array[RecipeTemplateWithFiles] result = apiInstance.recipesTemplatesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$body = ; // CreateRecipeTemplate | The parameters for creating a new recipe template.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $body = WWW::SwaggerClient::Object::CreateRecipeTemplate->new(); # CreateRecipeTemplate | The parameters for creating a new recipe template.

eval { 
    my $result = $api_instance->recipesTemplatesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
body =  # CreateRecipeTemplate | The parameters for creating a new recipe template. (optional)

try: 
    # Create a new recipe template.
    api_response = api_instance.recipes_templates_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The created recipe template.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdCloneNamePost

Get a name proposal for a clone of an existing recipe template.

A successful response will propose a name for use in the clone of an existing recipe template.


/recipes/templates/{recipe_template_id}/clone/name

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/clone/name"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateProposedName result = apiInstance.recipesTemplatesRecipeTemplateIdCloneNamePost(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdCloneNamePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateProposedName result = apiInstance.recipesTemplatesRecipeTemplateIdCloneNamePost(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdCloneNamePost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a name proposal for a clone of an existing recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdCloneNamePostWith:recipeTemplateId
              completionHandler: ^(RecipeTemplateProposedName output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdCloneNamePost(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdCloneNamePostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a name proposal for a clone of an existing recipe template.
                RecipeTemplateProposedName result = apiInstance.recipesTemplatesRecipeTemplateIdCloneNamePost(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdCloneNamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdCloneNamePost(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdCloneNamePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a name proposal for a clone of an existing recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_clone_name_post(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdCloneNamePost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The proposed recipe template name of the clone.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdClonePost

Clone an existing recipe template.

A successful response will clone an existing recipe template and return it alongside its files.


/recipes/templates/{recipe_template_id}/clone

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/clone"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        CreateRecipeTemplate body = ; // CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used

        try {
            RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdClonePost(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdClonePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        CreateRecipeTemplate body = ; // CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used

        try {
            RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdClonePost(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdClonePost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
CreateRecipeTemplate *body = ; // The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used
 (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Clone an existing recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdClonePostWith:recipeTemplateId
    body:body
              completionHandler: ^(RecipeTemplateWithFiles output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{CreateRecipeTemplate}} The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdClonePost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdClonePostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new CreateRecipeTemplate(); // CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used
 (optional) 

            try
            {
                // Clone an existing recipe template.
                RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdClonePost(recipeTemplateId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdClonePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used


try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdClonePost($recipeTemplateId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdClonePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::CreateRecipeTemplate->new(); # CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used


eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdClonePost(recipeTemplateId => $recipeTemplateId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdClonePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # CreateRecipeTemplate | The parameters for cloning a recipe template. If image is not provided the parent's recipe 
template image is used
 (optional)

try: 
    # Clone an existing recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_clone_post(recipeTemplateId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdClonePost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The created recipe template.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdCompatibleAssetsGet

Get a specific recipe template's compatible assets.

A successful response will return the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/compatible_assets

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/compatible_assets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdCompatibleAssetsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdCompatibleAssetsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a specific recipe template's compatible assets.
[apiInstance recipesTemplatesRecipeTemplateIdCompatibleAssetsGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplateCompatibleAssets output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdCompatibleAssetsGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template's compatible assets.
                RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template's compatible assets.
    api_response = api_instance.recipes_templates_recipe_template_id_compatible_assets_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The required resources of the recipe template.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch

Update recipe template file content.

Write new content to recipe template file.


/recipes/templates/{recipe_template_id}/files/{file_id}/content

Usage and SDK Samples

curl -X PATCH\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/files/{file_id}/content"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            Error result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch(recipeTemplateId, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            Error result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch(recipeTemplateId, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *fileId = 56; // The file id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Update recipe template file content.
[apiInstance recipesTemplatesRecipeTemplateIdFilesFileIdContentPatchWith:recipeTemplateId
    fileId:fileId
              completionHandler: ^(Error output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var fileId = 56; // {{Integer}} The file id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch(recipeTemplateId, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesFileIdContentPatchExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var fileId = 56;  // Integer | The file id.

            try
            {
                // Update recipe template file content.
                Error result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch(recipeTemplateId, fileId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$fileId = 56; // Integer | The file id.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch($recipeTemplateId, $fileId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $fileId = 56; # Integer | The file id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch(recipeTemplateId => $recipeTemplateId, fileId => $fileId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
fileId = 56 # Integer | The file id.

try: 
    # Update recipe template file content.
    api_response = api_instance.recipes_templates_recipe_template_id_files_file_id_content_patch(recipeTemplateId, fileId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdContentPatch: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
file_id*
Integer (uint)
The file id.
Required

Responses

Status: 200 - File content has been updated succesfully. Although there are same validation warnings.

Status: 204 - Recipe template file content has been successfully updated.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdFilesFileIdDelete

Delete a recipe template's file.

Delete a recipe template file. Files can be folder and normal files.


/recipes/templates/{recipe_template_id}/files/{file_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json"\
"/api/recipes/templates/{recipe_template_id}/files/{file_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdDelete(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdDelete(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *fileId = 56; // The file id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Delete a recipe template's file.
[apiInstance recipesTemplatesRecipeTemplateIdFilesFileIdDeleteWith:recipeTemplateId
    fileId:fileId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var fileId = 56; // {{Integer}} The file id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdFilesFileIdDelete(recipeTemplateId, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesFileIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var fileId = 56;  // Integer | The file id.

            try
            {
                // Delete a recipe template's file.
                apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdDelete(recipeTemplateId, fileId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesFileIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$fileId = 56; // Integer | The file id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdDelete($recipeTemplateId, $fileId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $fileId = 56; # Integer | The file id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdDelete(recipeTemplateId => $recipeTemplateId, fileId => $fileId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
fileId = 56 # Integer | The file id.

try: 
    # Delete a recipe template's file.
    api_instance.recipes_templates_recipe_template_id_files_file_id_delete(recipeTemplateId, fileId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
file_id*
Integer (uint)
The file id.
Required

Responses

Status: 204 - Successfully deleted recipe template's file.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

recipesTemplatesRecipeTemplateIdFilesFileIdGet

Get content of a specific recipe template file.

A successful response will return the content of the specified recipe template file. In case that file is directory, content will be empty.


/recipes/templates/{recipe_template_id}/files/{file_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/files/{file_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            RecipeTemplateFiles result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdGet(recipeTemplateId, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            RecipeTemplateFiles result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdGet(recipeTemplateId, fileId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *fileId = 56; // The file id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get content of a specific recipe template file.
[apiInstance recipesTemplatesRecipeTemplateIdFilesFileIdGetWith:recipeTemplateId
    fileId:fileId
              completionHandler: ^(RecipeTemplateFiles output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var fileId = 56; // {{Integer}} The file id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdFilesFileIdGet(recipeTemplateId, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesFileIdGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var fileId = 56;  // Integer | The file id.

            try
            {
                // Get content of a specific recipe template file.
                RecipeTemplateFiles result = apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdGet(recipeTemplateId, fileId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesFileIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$fileId = 56; // Integer | The file id.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdGet($recipeTemplateId, $fileId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $fileId = 56; # Integer | The file id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdGet(recipeTemplateId => $recipeTemplateId, fileId => $fileId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
fileId = 56 # Integer | The file id.

try: 
    # Get content of a specific recipe template file.
    api_response = api_instance.recipes_templates_recipe_template_id_files_file_id_get(recipeTemplateId, fileId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
file_id*
Integer (uint)
The file id.
Required

Responses

Status: 200 - The details of the recipe template.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch

Rename recipe template file name.

Rename a recipe template file name. Name should be unique.


/recipes/templates/{recipe_template_id}/files/{file_id}/name

Usage and SDK Samples

curl -X PATCH\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/files/{file_id}/name"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *fileId = 56; // The file id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Rename recipe template file name.
[apiInstance recipesTemplatesRecipeTemplateIdFilesFileIdNamePatchWith:recipeTemplateId
    fileId:fileId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var fileId = 56; // {{Integer}} The file id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch(recipeTemplateId, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesFileIdNamePatchExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var fileId = 56;  // Integer | The file id.

            try
            {
                // Rename recipe template file name.
                apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch(recipeTemplateId, fileId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$fileId = 56; // Integer | The file id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch($recipeTemplateId, $fileId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $fileId = 56; # Integer | The file id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch(recipeTemplateId => $recipeTemplateId, fileId => $fileId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
fileId = 56 # Integer | The file id.

try: 
    # Rename recipe template file name.
    api_instance.recipes_templates_recipe_template_id_files_file_id_name_patch(recipeTemplateId, fileId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdNamePatch: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
file_id*
Integer (uint)
The file id.
Required

Responses

Status: 204 - Recipe template file has been successfully renamed.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdFilesFileIdPut

Update name and content of a recipe template file.

Change the content of a recipe template file. File name can be updated as well. In case that file is directory, content field will be ignored.


/recipes/templates/{recipe_template_id}/files/{file_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/files/{file_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdPut(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer fileId = 56; // Integer | The file id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdPut(recipeTemplateId, fileId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesFileIdPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *fileId = 56; // The file id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Update name and content of a recipe template file.
[apiInstance recipesTemplatesRecipeTemplateIdFilesFileIdPutWith:recipeTemplateId
    fileId:fileId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var fileId = 56; // {{Integer}} The file id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdFilesFileIdPut(recipeTemplateId, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesFileIdPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var fileId = 56;  // Integer | The file id.

            try
            {
                // Update name and content of a recipe template file.
                apiInstance.recipesTemplatesRecipeTemplateIdFilesFileIdPut(recipeTemplateId, fileId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesFileIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$fileId = 56; // Integer | The file id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdPut($recipeTemplateId, $fileId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $fileId = 56; # Integer | The file id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdFilesFileIdPut(recipeTemplateId => $recipeTemplateId, fileId => $fileId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
fileId = 56 # Integer | The file id.

try: 
    # Update name and content of a recipe template file.
    api_instance.recipes_templates_recipe_template_id_files_file_id_put(recipeTemplateId, fileId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesFileIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
file_id*
Integer (uint)
The file id.
Required

Responses

Status: 204 - Successfully updated file's name and content.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

recipesTemplatesRecipeTemplateIdFilesPost

Create a new empty recipe template file.

A successful response will create an empty recipe template file. There are two types of files: Folder: An empty folder will be created. File: An empty file will be created.


/recipes/templates/{recipe_template_id}/files/

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/files/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        InputRecipeTemplateFile body = ; // InputRecipeTemplateFile | The parameters for creating a new recipe template file.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        InputRecipeTemplateFile body = ; // InputRecipeTemplateFile | The parameters for creating a new recipe template file.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdFilesPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
InputRecipeTemplateFile *body = ; // The parameters for creating a new recipe template file. (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Create a new empty recipe template file.
[apiInstance recipesTemplatesRecipeTemplateIdFilesPostWith:recipeTemplateId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{InputRecipeTemplateFile}} The parameters for creating a new recipe template file.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdFilesPost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new InputRecipeTemplateFile(); // InputRecipeTemplateFile | The parameters for creating a new recipe template file. (optional) 

            try
            {
                // Create a new empty recipe template file.
                apiInstance.recipesTemplatesRecipeTemplateIdFilesPost(recipeTemplateId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // InputRecipeTemplateFile | The parameters for creating a new recipe template file.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdFilesPost($recipeTemplateId, $body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::InputRecipeTemplateFile->new(); # InputRecipeTemplateFile | The parameters for creating a new recipe template file.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdFilesPost(recipeTemplateId => $recipeTemplateId, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # InputRecipeTemplateFile | The parameters for creating a new recipe template file. (optional)

try: 
    # Create a new empty recipe template file.
    api_instance.recipes_templates_recipe_template_id_files_post(recipeTemplateId, body=body)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - Successfully created file.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdFilesSyncPut

Update/rebuild the recipe template files DB table based on the file system contents.

It checks the file system and it updates the recipe template files DB table. A successful response will return the details of the specified recipe template.


/recipes/templates/{recipe_template_id}/files/sync

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/files/sync"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdFilesSyncPut(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesSyncPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdFilesSyncPut(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdFilesSyncPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Update/rebuild the recipe template files DB table based on the file system contents.
[apiInstance recipesTemplatesRecipeTemplateIdFilesSyncPutWith:recipeTemplateId
              completionHandler: ^(RecipeTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdFilesSyncPut(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdFilesSyncPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Update/rebuild the recipe template files DB table based on the file system contents.
                RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdFilesSyncPut(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdFilesSyncPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdFilesSyncPut(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesSyncPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Update/rebuild the recipe template files DB table based on the file system contents.
    api_response = api_instance.recipes_templates_recipe_template_id_files_sync_put(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdFilesSyncPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The details of the recipe template.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

recipesTemplatesRecipeTemplateIdGet

Get a specific recipe template.

A successful response will return the details of the specified recipe template.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template.
                RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The details of the recipe template.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdHidePut

Hide an existing recipe template.

A successful response will set the recipe template as hidden. Only authorized users can perform this operation based on the recipe template's permissions.


/recipes/templates/{recipe_template_id}/hide

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/hide"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdHidePut(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdHidePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdHidePut(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdHidePut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Hide an existing recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdHidePutWith:recipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdHidePut(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdHidePutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Hide an existing recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdHidePut(recipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdHidePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdHidePut($recipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdHidePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdHidePut(recipeTemplateId => $recipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdHidePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Hide an existing recipe template.
    api_instance.recipes_templates_recipe_template_id_hide_put(recipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdHidePut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 204 - The recipe template has been set as hidden.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdImageDelete

Delete recipe template's image.

Delete a new recipe template image. Only admin has the permition to end this request.


/recipes/templates/{recipe_template_id}/image

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/image"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdImageDelete(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdImageDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdImageDelete(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdImageDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Delete recipe template's image.
[apiInstance recipesTemplatesRecipeTemplateIdImageDeleteWith:recipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdImageDelete(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdImageDeleteExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Delete recipe template's image.
                apiInstance.recipesTemplatesRecipeTemplateIdImageDelete(recipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdImageDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdImageDelete($recipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdImageDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdImageDelete(recipeTemplateId => $recipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdImageDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Delete recipe template's image.
    api_instance.recipes_templates_recipe_template_id_image_delete(recipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdImageDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 204 - Successfully deleted recipe template's image.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdImagePost

Upload recipe template's image.

Upload a new recipe template image. Only one image is stored per template. Only admin has the permition to end this request.


/recipes/templates/{recipe_template_id}/image

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/image"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdImagePost(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdImagePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdImagePost(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdImagePost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Upload recipe template's image.
[apiInstance recipesTemplatesRecipeTemplateIdImagePostWith:recipeTemplateId
              completionHandler: ^(RecipeTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdImagePost(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdImagePostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Upload recipe template's image.
                RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdImagePost(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdImagePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdImagePost(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdImagePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Upload recipe template's image.
    api_response = api_instance.recipes_templates_recipe_template_id_image_post(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdImagePost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - Successfully update recipe template's image.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdPut

Edit a recipe template.

A successful response will edit a recipe template and return it alongside its files.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        EditRecipeTemplate body = ; // EditRecipeTemplate | The parameters for editing a recipe template.

        try {
            RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        EditRecipeTemplate body = ; // EditRecipeTemplate | The parameters for editing a recipe template.

        try {
            RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
EditRecipeTemplate *body = ; // The parameters for editing a recipe template.
 (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Edit a recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdPutWith:recipeTemplateId
    body:body
              completionHandler: ^(RecipeTemplateWithFiles output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{EditRecipeTemplate}} The parameters for editing a recipe template.

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdPut(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new EditRecipeTemplate(); // EditRecipeTemplate | The parameters for editing a recipe template.
 (optional) 

            try
            {
                // Edit a recipe template.
                RecipeTemplateWithFiles result = apiInstance.recipesTemplatesRecipeTemplateIdPut(recipeTemplateId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // EditRecipeTemplate | The parameters for editing a recipe template.


try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdPut($recipeTemplateId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::EditRecipeTemplate->new(); # EditRecipeTemplate | The parameters for editing a recipe template.


eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdPut(recipeTemplateId => $recipeTemplateId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # EditRecipeTemplate | The parameters for editing a recipe template.
 (optional)

try: 
    # Edit a recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_put(recipeTemplateId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The edited recipe template.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdResourcesGet

Get a specific recipe template's required resources.

A successful response will return the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/resources

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a specific recipe template's required resources.
[apiInstance recipesTemplatesRecipeTemplateIdResourcesGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplateResources output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdResourcesGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template's required resources.
                RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdResourcesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template's required resources.
    api_response = api_instance.recipes_templates_recipe_template_id_resources_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The required resourced of the recipe template.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdResourcesPut

Update a specific recipe template's required resources.

A successful response will update the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/resources

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        RecipeTemplateResources body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        RecipeTemplateResources body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
RecipeTemplateResources *body = ; // The parameters for updating the new resources required of the recipe template. (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Update a specific recipe template's required resources.
[apiInstance recipesTemplatesRecipeTemplateIdResourcesPutWith:recipeTemplateId
    body:body
              completionHandler: ^(RecipeTemplateResources output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{RecipeTemplateResources}} The parameters for updating the new resources required of the recipe template.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdResourcesPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new RecipeTemplateResources(); // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template. (optional) 

            try
            {
                // Update a specific recipe template's required resources.
                RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdResourcesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdResourcesPut($recipeTemplateId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::RecipeTemplateResources->new(); # RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId => $recipeTemplateId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # RecipeTemplateResources | The parameters for updating the new resources required of the recipe template. (optional)

try: 
    # Update a specific recipe template's required resources.
    api_response = api_instance.recipes_templates_recipe_template_id_resources_put(recipeTemplateId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The required resourced of the recipe template.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdResourcesValidateGet

Validate recipe template's required resources.

A successful response will return the errors of recipe template resources validation.


/recipes/templates/{recipe_template_id}/resources_validate

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/resources_validate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdResourcesValidateGet(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesValidateGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdResourcesValidateGet(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdResourcesValidateGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Validate recipe template's required resources.
[apiInstance recipesTemplatesRecipeTemplateIdResourcesValidateGetWith:recipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdResourcesValidateGet(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdResourcesValidateGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Validate recipe template's required resources.
                apiInstance.recipesTemplatesRecipeTemplateIdResourcesValidateGet(recipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdResourcesValidateGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdResourcesValidateGet($recipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesValidateGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdResourcesValidateGet(recipeTemplateId => $recipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesValidateGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Validate recipe template's required resources.
    api_instance.recipes_templates_recipe_template_id_resources_validate_get(recipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdResourcesValidateGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - Successfully recipe template resources validation.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - Recipe errors after resources validation.

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet

Get a recipe template's permissions for a specific role.

A successful response will return the recipe template's permissions for the specified role


/recipes/templates/{recipe_template_id}/roles/{role}/permissions

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/roles/{role}/permissions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        String role = role_example; // String | The role name.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet(recipeTemplateId, role);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        String role = role_example; // String | The role name.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet(recipeTemplateId, role);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
String *role = role_example; // The role name.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a recipe template's permissions for a specific role.
[apiInstance recipesTemplatesRecipeTemplateIdRolesRolePermissionsGetWith:recipeTemplateId
    role:role
              completionHandler: ^(RecipeTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var role = role_example; // {{String}} The role name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet(recipeTemplateId, role, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdRolesRolePermissionsGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var role = role_example;  // String | The role name.

            try
            {
                // Get a recipe template's permissions for a specific role.
                RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet(recipeTemplateId, role);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$role = role_example; // String | The role name.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet($recipeTemplateId, $role);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $role = role_example; # String | The role name.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet(recipeTemplateId => $recipeTemplateId, role => $role);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
role = role_example # String | The role name.

try: 
    # Get a recipe template's permissions for a specific role.
    api_response = api_instance.recipes_templates_recipe_template_id_roles_role_permissions_get(recipeTemplateId, role)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
role*
String
The role name.
Required

Responses

Status: 200 - Recipe template's permissions for the role

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut

Edit a recipe template's permissions for a specific role.

A successful response will edit the recipe template's permissions for the specified role


/recipes/templates/{recipe_template_id}/roles/{role}/permissions

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/roles/{role}/permissions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        String role = role_example; // String | The role name.
        RecipeTemplatePermissionsReq body = ; // RecipeTemplatePermissionsReq | The permissions to use for the update
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut(recipeTemplateId, role, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        String role = role_example; // String | The role name.
        RecipeTemplatePermissionsReq body = ; // RecipeTemplatePermissionsReq | The permissions to use for the update
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut(recipeTemplateId, role, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
String *role = role_example; // The role name.
RecipeTemplatePermissionsReq *body = ; // The permissions to use for the update (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Edit a recipe template's permissions for a specific role.
[apiInstance recipesTemplatesRecipeTemplateIdRolesRolePermissionsPutWith:recipeTemplateId
    role:role
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var role = role_example; // {{String}} The role name.
var opts = { 
  'body':  // {{RecipeTemplatePermissionsReq}} The permissions to use for the update
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut(recipeTemplateIdrole, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdRolesRolePermissionsPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var role = role_example;  // String | The role name.
            var body = new RecipeTemplatePermissionsReq(); // RecipeTemplatePermissionsReq | The permissions to use for the update (optional) 

            try
            {
                // Edit a recipe template's permissions for a specific role.
                apiInstance.recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut(recipeTemplateId, role, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.
$role = role_example; // String | The role name.
$body = ; // RecipeTemplatePermissionsReq | The permissions to use for the update

try {
    $api_instance->recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut($recipeTemplateId, $role, $body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $role = role_example; # String | The role name.
my $body = WWW::SwaggerClient::Object::RecipeTemplatePermissionsReq->new(); # RecipeTemplatePermissionsReq | The permissions to use for the update

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut(recipeTemplateId => $recipeTemplateId, role => $role, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.
role = role_example # String | The role name.
body =  # RecipeTemplatePermissionsReq | The permissions to use for the update (optional)

try: 
    # Edit a recipe template's permissions for a specific role.
    api_instance.recipes_templates_recipe_template_id_roles_role_permissions_put(recipeTemplateId, role, body=body)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdRolesRolePermissionsPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
role*
String
The role name.
Required
Body parameters
Name Description
body

Responses

Status: 204 - Recipe template's permissions successfully updated

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRecipeTemplateIdUnhidePut

Unhide an existing recipe template.

A successful response will set the recipe template as unhidden. Only authorized users can perform this operation based on the recipe template's permissions.


/recipes/templates/{recipe_template_id}/unhide

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/unhide"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdUnhidePut(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdUnhidePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdUnhidePut(recipeTemplateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRecipeTemplateIdUnhidePut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Unhide an existing recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdUnhidePutWith:recipeTemplateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdUnhidePut(recipeTemplateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRecipeTemplateIdUnhidePutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Unhide an existing recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdUnhidePut(recipeTemplateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRecipeTemplateIdUnhidePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$recipeTemplateId = 56; // Integer | The template id.

try {
    $api_instance->recipesTemplatesRecipeTemplateIdUnhidePut($recipeTemplateId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdUnhidePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdUnhidePut(recipeTemplateId => $recipeTemplateId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdUnhidePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Unhide an existing recipe template.
    api_instance.recipes_templates_recipe_template_id_unhide_put(recipeTemplateId)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRecipeTemplateIdUnhidePut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 204 - The recipe template has been set as unhidden.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRolesRolePermissionsGet

Get a recipe templates' permissions for a specific role.

A successful response will return a list of all recipe templates with the permissions of each one for the specified role.


/recipes/templates/roles/{role}/permissions

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/roles/{role}/permissions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        String role = role_example; // String | The role name.
        try {
            array[RecipeTemplate] result = apiInstance.recipesTemplatesRolesRolePermissionsGet(role);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRolesRolePermissionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        String role = role_example; // String | The role name.
        try {
            array[RecipeTemplate] result = apiInstance.recipesTemplatesRolesRolePermissionsGet(role);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRolesRolePermissionsGet");
            e.printStackTrace();
        }
    }
}
String *role = role_example; // The role name.

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Get a recipe templates' permissions for a specific role.
[apiInstance recipesTemplatesRolesRolePermissionsGetWith:role
              completionHandler: ^(array[RecipeTemplate] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var role = role_example; // {{String}} The role name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRolesRolePermissionsGet(role, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRolesRolePermissionsGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var role = role_example;  // String | The role name.

            try
            {
                // Get a recipe templates' permissions for a specific role.
                array[RecipeTemplate] result = apiInstance.recipesTemplatesRolesRolePermissionsGet(role);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRolesRolePermissionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$role = role_example; // String | The role name.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $role = role_example; # String | The role name.

eval { 
    my $result = $api_instance->recipesTemplatesRolesRolePermissionsGet(role => $role);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRolesRolePermissionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
role = role_example # String | The role name.

try: 
    # Get a recipe templates' permissions for a specific role.
    api_response = api_instance.recipes_templates_roles_role_permissions_get(role)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRolesRolePermissionsGet: %s\n" % e)

Parameters

Path parameters
Name Description
role*
String
The role name.
Required

Responses

Status: 200 - The recipe template's permissions.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesRolesRolePermissionsPut

Edit recipe templates' permissions for a specific role.

A successful response will edit the recipe templates' permissions for the specified role


/recipes/templates/roles/{role}/permissions

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/roles/{role}/permissions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        String role = role_example; // String | The role name.
        array[RecipeTemplatesPermissionsUpdate] body = ; // array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update
        try {
            apiInstance.recipesTemplatesRolesRolePermissionsPut(role, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRolesRolePermissionsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        String role = role_example; // String | The role name.
        array[RecipeTemplatesPermissionsUpdate] body = ; // array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update
        try {
            apiInstance.recipesTemplatesRolesRolePermissionsPut(role, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesRolesRolePermissionsPut");
            e.printStackTrace();
        }
    }
}
String *role = role_example; // The role name.
array[RecipeTemplatesPermissionsUpdate] *body = ; // The permissions for each recipe template to use for the update (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Edit recipe templates' permissions for a specific role.
[apiInstance recipesTemplatesRolesRolePermissionsPutWith:role
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var role = role_example; // {{String}} The role name.
var opts = { 
  'body':  // {{array[RecipeTemplatesPermissionsUpdate]}} The permissions for each recipe template to use for the update
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRolesRolePermissionsPut(role, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesRolesRolePermissionsPutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var role = role_example;  // String | The role name.
            var body = new array[RecipeTemplatesPermissionsUpdate](); // array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update (optional) 

            try
            {
                // Edit recipe templates' permissions for a specific role.
                apiInstance.recipesTemplatesRolesRolePermissionsPut(role, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesRolesRolePermissionsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$role = role_example; // String | The role name.
$body = ; // array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update

try {
    $api_instance->recipesTemplatesRolesRolePermissionsPut($role, $body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesRolesRolePermissionsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $role = role_example; # String | The role name.
my $body = [WWW::SwaggerClient::Object::array[RecipeTemplatesPermissionsUpdate]->new()]; # array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update

eval { 
    $api_instance->recipesTemplatesRolesRolePermissionsPut(role => $role, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesRolesRolePermissionsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
role = role_example # String | The role name.
body =  # array[RecipeTemplatesPermissionsUpdate] | The permissions for each recipe template to use for the update (optional)

try: 
    # Edit recipe templates' permissions for a specific role.
    api_instance.recipes_templates_roles_role_permissions_put(role, body=body)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesRolesRolePermissionsPut: %s\n" % e)

Parameters

Path parameters
Name Description
role*
String
The role name.
Required
Body parameters
Name Description
body

Responses

Status: 204 - Recipe templates' permissions successfully updated. In case of any error a 207 error will be returned.

Status: 207 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesUpdatePut

Update all recipe templates.

A successful response will update all the available recipe templates.


/recipes/templates/update

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        try {
            apiInstance.recipesTemplatesUpdatePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesUpdatePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        try {
            apiInstance.recipesTemplatesUpdatePut();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesUpdatePut");
            e.printStackTrace();
        }
    }
}

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Update all recipe templates.
[apiInstance recipesTemplatesUpdatePutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesUpdatePut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesUpdatePutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();

            try
            {
                // Update all recipe templates.
                apiInstance.recipesTemplatesUpdatePut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesUpdatePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();

try {
    $api_instance->recipesTemplatesUpdatePut();
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesUpdatePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();

eval { 
    $api_instance->recipesTemplatesUpdatePut();
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesUpdatePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()

try: 
    # Update all recipe templates.
    api_instance.recipes_templates_update_put()
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesUpdatePut: %s\n" % e)

Parameters

Responses

Status: 202 - Recipe template will be updated.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesTemplatesUploadPost

Upload a recipe template.

A successful response will accept the uploaded file and create and new recipe template


/recipes/templates/upload

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/upload"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateApi;

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

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        UploadRecipeTemplate body = ; // UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

        try {
            apiInstance.recipesTemplatesUploadPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesUploadPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateApi;

public class RecipesTemplateApiExample {

    public static void main(String[] args) {
        RecipesTemplateApi apiInstance = new RecipesTemplateApi();
        UploadRecipeTemplate body = ; // UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

        try {
            apiInstance.recipesTemplatesUploadPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateApi#recipesTemplatesUploadPost");
            e.printStackTrace();
        }
    }
}
UploadRecipeTemplate *body = ; // The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional)

RecipesTemplateApi *apiInstance = [[RecipesTemplateApi alloc] init];

// Upload a recipe template.
[apiInstance recipesTemplatesUploadPostWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateApi()
var opts = { 
  'body':  // {{UploadRecipeTemplate}} The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesUploadPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesTemplatesUploadPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateApi();
            var body = new UploadRecipeTemplate(); // UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional) 

            try
            {
                // Upload a recipe template.
                apiInstance.recipesTemplatesUploadPost(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateApi.recipesTemplatesUploadPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateApi();
$body = ; // UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.


try {
    $api_instance->recipesTemplatesUploadPost($body);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateApi->recipesTemplatesUploadPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateApi->new();
my $body = WWW::SwaggerClient::Object::UploadRecipeTemplate->new(); # UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.


eval { 
    $api_instance->recipesTemplatesUploadPost(body => $body);
};
if ($@) {
    warn "Exception when calling RecipesTemplateApi->recipesTemplatesUploadPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateApi()
body =  # UploadRecipeTemplate | The upload is handled through the tus (https://tus.io/) protocol. All data are sent through tus metadata 
 header field.
 (optional)

try: 
    # Upload a recipe template.
    api_instance.recipes_templates_upload_post(body=body)
except ApiException as e:
    print("Exception when calling RecipesTemplateApi->recipesTemplatesUploadPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The recipe template uploaded successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

RecipesTemplateRepos

recipesRepositoriesGet

Get all available recipe templates repositories.

A successful response will return a list of the available recipe templates repositories. Only admin has the permition to end this request.


/recipes/repositories

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/repositories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateReposApi;

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

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        try {
            array[RecipeTemplateRepo] result = apiInstance.recipesRepositoriesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateReposApi;

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        try {
            array[RecipeTemplateRepo] result = apiInstance.recipesRepositoriesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesGet");
            e.printStackTrace();
        }
    }
}

RecipesTemplateReposApi *apiInstance = [[RecipesTemplateReposApi alloc] init];

// Get all available recipe templates repositories.
[apiInstance recipesRepositoriesGetWithCompletionHandler: 
              ^(array[RecipeTemplateRepo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateReposApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRepositoriesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRepositoriesGetExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateReposApi();

            try
            {
                // Get all available recipe templates repositories.
                array[RecipeTemplateRepo] result = apiInstance.recipesRepositoriesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateReposApi.recipesRepositoriesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateReposApi();

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateReposApi->new();

eval { 
    my $result = $api_instance->recipesRepositoriesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateReposApi->recipesRepositoriesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateReposApi()

try: 
    # Get all available recipe templates repositories.
    api_response = api_instance.recipes_repositories_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateReposApi->recipesRepositoriesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the recipe templates repositories.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesRepositoriesPost

Create a new recipe template repository.

A successful response will create a new recipe template repository. Only admin has the permition to end this request.


/recipes/repositories

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/repositories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateReposApi;

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

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        CreateRecipeTemplateRepository body = ; // CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository.
        try {
            array[RecipeTemplateWithFiles] result = apiInstance.recipesRepositoriesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateReposApi;

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        CreateRecipeTemplateRepository body = ; // CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository.
        try {
            array[RecipeTemplateWithFiles] result = apiInstance.recipesRepositoriesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesPost");
            e.printStackTrace();
        }
    }
}
CreateRecipeTemplateRepository *body = ; // The parameters for creating a new recipe template repository. (optional)

RecipesTemplateReposApi *apiInstance = [[RecipesTemplateReposApi alloc] init];

// Create a new recipe template repository.
[apiInstance recipesRepositoriesPostWith:body
              completionHandler: ^(array[RecipeTemplateWithFiles] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateReposApi()
var opts = { 
  'body':  // {{CreateRecipeTemplateRepository}} The parameters for creating a new recipe template repository.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRepositoriesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRepositoriesPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateReposApi();
            var body = new CreateRecipeTemplateRepository(); // CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository. (optional) 

            try
            {
                // Create a new recipe template repository.
                array[RecipeTemplateWithFiles] result = apiInstance.recipesRepositoriesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateReposApi.recipesRepositoriesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateReposApi();
$body = ; // CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository.

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

my $api_instance = WWW::SwaggerClient::RecipesTemplateReposApi->new();
my $body = WWW::SwaggerClient::Object::CreateRecipeTemplateRepository->new(); # CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository.

eval { 
    my $result = $api_instance->recipesRepositoriesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesTemplateReposApi->recipesRepositoriesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateReposApi()
body =  # CreateRecipeTemplateRepository | The parameters for creating a new recipe template repository. (optional)

try: 
    # Create a new recipe template repository.
    api_response = api_instance.recipes_repositories_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesTemplateReposApi->recipesRepositoriesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - The created recipe template repository.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesRepositoriesRecipeTemplateRepoIdDelete

Delete recipe template repo.

Delete a recipe template repository. Only admin has the permition to end this request.


/recipes/repositories/{recipe_template_repo_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/recipes/repositories/{recipe_template_repo_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateReposApi;

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

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdDelete(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateReposApi;

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdDelete(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateRepoId = 56; // The recipe template repo id.

RecipesTemplateReposApi *apiInstance = [[RecipesTemplateReposApi alloc] init];

// Delete recipe template repo.
[apiInstance recipesRepositoriesRecipeTemplateRepoIdDeleteWith:recipeTemplateRepoId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateReposApi()
var recipeTemplateRepoId = 56; // {{Integer}} The recipe template repo id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesRepositoriesRecipeTemplateRepoIdDelete(recipeTemplateRepoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRepositoriesRecipeTemplateRepoIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateReposApi();
            var recipeTemplateRepoId = 56;  // Integer | The recipe template repo id.

            try
            {
                // Delete recipe template repo.
                apiInstance.recipesRepositoriesRecipeTemplateRepoIdDelete(recipeTemplateRepoId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateReposApi.recipesRepositoriesRecipeTemplateRepoIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateReposApi();
$recipeTemplateRepoId = 56; // Integer | The recipe template repo id.

try {
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdDelete($recipeTemplateRepoId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateReposApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateReposApi->new();
my $recipeTemplateRepoId = 56; # Integer | The recipe template repo id.

eval { 
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdDelete(recipeTemplateRepoId => $recipeTemplateRepoId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateReposApi()
recipeTemplateRepoId = 56 # Integer | The recipe template repo id.

try: 
    # Delete recipe template repo.
    api_instance.recipes_repositories_recipe_template_repo_id_delete(recipeTemplateRepoId)
except ApiException as e:
    print("Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_repo_id*
Integer (uint)
The recipe template repo id.
Required

Responses

Status: 200 - Successfully deleted recipe template's image.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesRepositoriesRecipeTemplateRepoIdDisablePut

Disable a recipe template repo.

Disable a recipe template repository. Delete all repo's templates files and DB entries. Only admin has the permition to end this request.


/recipes/repositories/{recipe_template_repo_id}/disable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/repositories/{recipe_template_repo_id}/disable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateReposApi;

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

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdDisablePut(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdDisablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateReposApi;

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdDisablePut(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdDisablePut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateRepoId = 56; // The recipe template repo id.

RecipesTemplateReposApi *apiInstance = [[RecipesTemplateReposApi alloc] init];

// Disable a recipe template repo.
[apiInstance recipesRepositoriesRecipeTemplateRepoIdDisablePutWith:recipeTemplateRepoId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateReposApi()
var recipeTemplateRepoId = 56; // {{Integer}} The recipe template repo id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesRepositoriesRecipeTemplateRepoIdDisablePut(recipeTemplateRepoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRepositoriesRecipeTemplateRepoIdDisablePutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateReposApi();
            var recipeTemplateRepoId = 56;  // Integer | The recipe template repo id.

            try
            {
                // Disable a recipe template repo.
                apiInstance.recipesRepositoriesRecipeTemplateRepoIdDisablePut(recipeTemplateRepoId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateReposApi.recipesRepositoriesRecipeTemplateRepoIdDisablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateReposApi();
$recipeTemplateRepoId = 56; // Integer | The recipe template repo id.

try {
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdDisablePut($recipeTemplateRepoId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDisablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateReposApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateReposApi->new();
my $recipeTemplateRepoId = 56; # Integer | The recipe template repo id.

eval { 
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdDisablePut(recipeTemplateRepoId => $recipeTemplateRepoId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDisablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateReposApi()
recipeTemplateRepoId = 56 # Integer | The recipe template repo id.

try: 
    # Disable a recipe template repo.
    api_instance.recipes_repositories_recipe_template_repo_id_disable_put(recipeTemplateRepoId)
except ApiException as e:
    print("Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdDisablePut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_repo_id*
Integer (uint)
The recipe template repo id.
Required

Responses

Status: 200 - Successfully deleted recipe template's image.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

recipesRepositoriesRecipeTemplateRepoIdEnablePut

Enable a recipe template repo.

Enable a recipe template repository. Download and update all repo's templates. Only admin has the permition to end this request.


/recipes/repositories/{recipe_template_repo_id}/enable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/recipes/repositories/{recipe_template_repo_id}/enable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesTemplateReposApi;

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

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdEnablePut(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdEnablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesTemplateReposApi;

public class RecipesTemplateReposApiExample {

    public static void main(String[] args) {
        RecipesTemplateReposApi apiInstance = new RecipesTemplateReposApi();
        Integer recipeTemplateRepoId = 56; // Integer | The recipe template repo id.
        try {
            apiInstance.recipesRepositoriesRecipeTemplateRepoIdEnablePut(recipeTemplateRepoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesTemplateReposApi#recipesRepositoriesRecipeTemplateRepoIdEnablePut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateRepoId = 56; // The recipe template repo id.

RecipesTemplateReposApi *apiInstance = [[RecipesTemplateReposApi alloc] init];

// Enable a recipe template repo.
[apiInstance recipesRepositoriesRecipeTemplateRepoIdEnablePutWith:recipeTemplateRepoId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesTemplateReposApi()
var recipeTemplateRepoId = 56; // {{Integer}} The recipe template repo id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesRepositoriesRecipeTemplateRepoIdEnablePut(recipeTemplateRepoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRepositoriesRecipeTemplateRepoIdEnablePutExample
    {
        public void main()
        {

            var apiInstance = new RecipesTemplateReposApi();
            var recipeTemplateRepoId = 56;  // Integer | The recipe template repo id.

            try
            {
                // Enable a recipe template repo.
                apiInstance.recipesRepositoriesRecipeTemplateRepoIdEnablePut(recipeTemplateRepoId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesTemplateReposApi.recipesRepositoriesRecipeTemplateRepoIdEnablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesTemplateReposApi();
$recipeTemplateRepoId = 56; // Integer | The recipe template repo id.

try {
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdEnablePut($recipeTemplateRepoId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdEnablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesTemplateReposApi;

my $api_instance = WWW::SwaggerClient::RecipesTemplateReposApi->new();
my $recipeTemplateRepoId = 56; # Integer | The recipe template repo id.

eval { 
    $api_instance->recipesRepositoriesRecipeTemplateRepoIdEnablePut(recipeTemplateRepoId => $recipeTemplateRepoId);
};
if ($@) {
    warn "Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdEnablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RecipesTemplateReposApi()
recipeTemplateRepoId = 56 # Integer | The recipe template repo id.

try: 
    # Enable a recipe template repo.
    api_instance.recipes_repositories_recipe_template_repo_id_enable_put(recipeTemplateRepoId)
except ApiException as e:
    print("Exception when calling RecipesTemplateReposApi->recipesRepositoriesRecipeTemplateRepoIdEnablePut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_repo_id*
Integer (uint)
The recipe template repo id.
Required

Responses

Status: 200 - Successfully deleted recipe template's image.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Repositories

clustersClusterIdTemplatesReposGet

Get all the repositories of a cluster.


/clusters/{cluster_id}/templates_repos

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/templates_repos"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

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

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Get all the repositories of a cluster.
[apiInstance clustersClusterIdTemplatesReposGetWith:clusterId
              completionHandler: ^(array[Repository] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdTemplatesReposGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposGetExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get all the repositories of a cluster.
                array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdTemplatesReposGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get all the repositories of a cluster.
    api_response = api_instance.clusters_cluster_id_templates_repos_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of repositories.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdTemplatesReposPost

Create new repository in a cluster.

The endpoint creates a new repository. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/templates_repos

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/templates_repos"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

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

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        NewRepository body = ; // NewRepository | The repository to create.
        try {
            Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        NewRepository body = ; // NewRepository | The repository to create.
        try {
            Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewRepository *body = ; // The repository to create. (optional)

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Create new repository in a cluster.
[apiInstance clustersClusterIdTemplatesReposPostWith:clusterId
    body:body
              completionHandler: ^(Repository output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewRepository}} The repository to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdTemplatesReposPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposPostExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewRepository(); // NewRepository | The repository to create. (optional) 

            try
            {
                // Create new repository in a cluster.
                Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewRepository | The repository to create.

try {
    $result = $api_instance->clustersClusterIdTemplatesReposPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewRepository->new(); # NewRepository | The repository to create.

eval { 
    my $result = $api_instance->clustersClusterIdTemplatesReposPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
clusterId = 789 # Long | The cluster id.
body =  # NewRepository | The repository to create. (optional)

try: 
    # Create new repository in a cluster.
    api_response = api_instance.clusters_cluster_id_templates_repos_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Repository created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdTemplatesReposRepoIdDelete

Delete the specified repository from a cluster.


/clusters/{cluster_id}/templates_repos/{repo_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/templates_repos/{repo_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

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

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long repoId = 789; // Long | The repository id.
        try {
            apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposRepoIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long repoId = 789; // Long | The repository id.
        try {
            apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposRepoIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *repoId = 789; // The repository id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Delete the specified repository from a cluster.
[apiInstance clustersClusterIdTemplatesReposRepoIdDeleteWith:clusterId
    repoId:repoId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
var clusterId = 789; // {{Long}} The cluster id.
var repoId = 789; // {{Long}} The repository id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposRepoIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.
            var repoId = 789;  // Long | The repository id.

            try
            {
                // Delete the specified repository from a cluster.
                apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposRepoIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.
$repoId = 789; // Long | The repository id.

try {
    $api_instance->clustersClusterIdTemplatesReposRepoIdDelete($clusterId, $repoId);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $repoId = 789; # Long | The repository id.

eval { 
    $api_instance->clustersClusterIdTemplatesReposRepoIdDelete(clusterId => $clusterId, repoId => $repoId);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
clusterId = 789 # Long | The cluster id.
repoId = 789 # Long | The repository id.

try: 
    # Delete the specified repository from a cluster.
    api_instance.clusters_cluster_id_templates_repos_repo_id_delete(clusterId, repoId)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
repo_id*
Long (int64)
The repository id.
Required

Responses

Status: 204 - Repository deleted successfully

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

ResourceGroups

clustersClusterIdResourceGroupsPost

Create new resource group in a cluster.

The endpoint creates a new resource group. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#clustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#clustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewResourceGroup *body = ; // The resource group to create. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Create new resource group in a cluster.
[apiInstance clustersClusterIdResourceGroupsPostWith:clusterId
    body:body
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewResourceGroup}} The resource group to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewResourceGroup(); // NewResourceGroup | The resource group to create. (optional) 

            try
            {
                // Create new resource group in a cluster.
                ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.clustersClusterIdResourceGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewResourceGroup | The resource group to create.

try {
    $result = $api_instance->clustersClusterIdResourceGroupsPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewResourceGroup->new(); # NewResourceGroup | The resource group to create.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
clusterId = 789 # Long | The cluster id.
body =  # NewResourceGroup | The resource group to create. (optional)

try: 
    # Create new resource group in a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Resource Group created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsGet

Get a list of the available resource groups.

A successful response will return a list of the available resource groups. Only the resource groups that te user's role has access will be retrieved.


/resource_groups

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        try {
            array[ResourceGroup] result = apiInstance.resourceGroupsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        try {
            array[ResourceGroup] result = apiInstance.resourceGroupsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsGet");
            e.printStackTrace();
        }
    }
}

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a list of the available resource groups.
[apiInstance resourceGroupsGetWithCompletionHandler: 
              ^(array[ResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();

            try
            {
                // Get a list of the available resource groups.
                array[ResourceGroup] result = apiInstance.resourceGroupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();

eval { 
    my $result = $api_instance->resourceGroupsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()

try: 
    # Get a list of the available resource groups.
    api_response = api_instance.resource_groups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - The resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdDelete

Remove a core from a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a core from a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdDeleteWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Remove a core from a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $coreId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
coreId = 789 # Long | The core id.

try: 
    # Remove a core from a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_delete(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - Core removed successfully from the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdGet

Get a core of a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a core of a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdGetWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(Core output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Get a core of a resource group.
                Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdCoresCoreIdGet($resourceGroupId, $coreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $coreId = 789; # Long | The core id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId => $resourceGroupId, coreId => $coreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
coreId = 789 # Long | The core id.

try: 
    # Get a core of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_cores_core_id_get(resourceGroupId, coreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 200 - A core.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdPut

Add a core to a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a core to a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdPutWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Add a core to a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $coreId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
coreId = 789 # Long | The core id.

try: 
    # Add a core to a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_put(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - Core added successfully to the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresGet

Get all the cores of a resource group.


/resource_groups/{resource_group_id}/cores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the cores of a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresGetWith:resourceGroupId
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdCoresGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the cores of a resource group.
                array[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdCoresGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get all the cores of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_cores_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of cores.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete

Remove a datastore from a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a datastore from a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Remove a datastore from a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Remove a datastore from a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_delete(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore removed successfully from the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdGet

Get a datastore of a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a datastore of a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdGetWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Get a datastore of a resource group.
                Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet($resourceGroupId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Get a datastore of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_datastores_datastore_id_get(resourceGroupId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 200 - A datastore.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdPut

Add a datastore to a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a datastore to a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdPutWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Add a datastore to a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Add a datastore to a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_put(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore added successfully to the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresGet

Get all the datastores of a resource group.


/resource_groups/{resource_group_id}/datastores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the datastores of a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresGetWith:resourceGroupId
              completionHandler: ^(array[Datastore] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the datastores of a resource group.
                array[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get all the datastores of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_datastores_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of datastores.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDelete

Delete the specified resource group.

A successful response will delete the specified resource group.


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Delete the specified resource group.
[apiInstance resourceGroupsResourceGroupIdDeleteWith:resourceGroupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDelete(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Delete the specified resource group.
                apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

try {
    $api_instance->resourceGroupsResourceGroupIdDelete($resourceGroupId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDelete(resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Delete the specified resource group.
    api_instance.resource_groups_resource_group_id_delete(resourceGroupId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 204 - The resource group deleted successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdGet

Get the specified resource group.

A successful response will return details of the specified resource group.


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the specified resource group.
[apiInstance resourceGroupsResourceGroupIdGetWith:resourceGroupId
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get the specified resource group.
                ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get the specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - The resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdImagesGet

Get all available images of a resource group.

A successful response will return all the available images within the specified resource group.


/resource_groups/{resource_group_id}/images

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/images"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Image] result = apiInstance.resourceGroupsResourceGroupIdImagesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdImagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Image] result = apiInstance.resourceGroupsResourceGroupIdImagesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdImagesGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all available images of a resource group.
[apiInstance resourceGroupsResourceGroupIdImagesGetWith:resourceGroupId
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdImagesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdImagesGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all available images of a resource group.
                array[Image] result = apiInstance.resourceGroupsResourceGroupIdImagesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdImagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdImagesGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdImagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get all available images of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_images_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdImagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of images.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancemovesGet

Get the ongoing moves within a resource group.

A successful response will return a list with the ongoing move operations within the specified resource group.


/resource_groups/{resource_group_id}/instancemoves

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instancemoves"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[MoveStatus] result = apiInstance.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[MoveStatus] result = apiInstance.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the ongoing moves within a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancemovesGetWith:resourceGroupId
              completionHandler: ^(array[MoveStatus] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancemovesGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get the ongoing moves within a resource group.
                array[MoveStatus] result = apiInstance.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancemovesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get the ongoing moves within a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instancemoves_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of the ongoing moves

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancemovesMoveIdDelete

Delete a move of an instance.

Delete a move of an instance. If a move is ongoing operation will fail.


/resource_groups/{resource_group_id}/instancemoves/{move_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instancemoves/{move_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *moveId = 789; // The move's operation id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Delete a move of an instance.
[apiInstance resourceGroupsResourceGroupIdInstancemovesMoveIdDeleteWith:resourceGroupId
    moveId:moveId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var moveId = 789; // {{Long}} The move's operation id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancemovesMoveIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var moveId = 789;  // Long | The move's operation id.

            try
            {
                // Delete a move of an instance.
                apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$moveId = 789; // Long | The move's operation id.

try {
    $api_instance->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete($resourceGroupId, $moveId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $moveId = 789; # Long | The move's operation id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId => $resourceGroupId, moveId => $moveId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
moveId = 789 # Long | The move's operation id.

try: 
    # Delete a move of an instance.
    api_instance.resource_groups_resource_group_id_instancemoves_move_id_delete(resourceGroupId, moveId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
move_id*
Long (int64)
The move's operation id.
Required

Responses

Status: 200 - Move deleted successfully

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancemovesMoveIdGet

Get the specified move of an instance.

Get details for the specified move.


/resource_groups/{resource_group_id}/instancemoves/{move_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instancemoves/{move_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdGet(resourceGroupId, moveId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdGet(resourceGroupId, moveId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *moveId = 789; // The move's operation id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the specified move of an instance.
[apiInstance resourceGroupsResourceGroupIdInstancemovesMoveIdGetWith:resourceGroupId
    moveId:moveId
              completionHandler: ^(MoveStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var moveId = 789; // {{Long}} The move's operation id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancemovesMoveIdGet(resourceGroupId, moveId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancemovesMoveIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var moveId = 789;  // Long | The move's operation id.

            try
            {
                // Get the specified move of an instance.
                MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdGet(resourceGroupId, moveId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancemovesMoveIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$moveId = 789; // Long | The move's operation id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancemovesMoveIdGet($resourceGroupId, $moveId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $moveId = 789; # Long | The move's operation id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancemovesMoveIdGet(resourceGroupId => $resourceGroupId, moveId => $moveId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
moveId = 789 # Long | The move's operation id.

try: 
    # Get the specified move of an instance.
    api_response = api_instance.resource_groups_resource_group_id_instancemoves_move_id_get(resourceGroupId, moveId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
move_id*
Long (int64)
The move's operation id.
Required

Responses

Status: 200 - The move status of the instance

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut

Disassociate a public IP from associated the Network Interface.

Disassociate an allocated public IP from the associated Network interface.


/resource_groups/{resource_group_id}/instances/disassociate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/disassociate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
String *publicIp = publicIp_example; // The public IP to associate.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Disassociate a public IP from associated the Network Interface.
[apiInstance resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPutWith:resourceGroupId
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var publicIp = publicIp_example; // {{String}} The public IP to associate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Disassociate a public IP from associated the Network Interface.
                apiInstance.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$publicIp = publicIp_example; // String | The public IP to associate.

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut($resourceGroupId, $publicIp);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId => $resourceGroupId, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Disassociate a public IP from associated the Network Interface.
    api_instance.resource_groups_resource_group_id_instances_disassociate_ip_public_ip_put(resourceGroupId, publicIp)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP Disassociate successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesGet

Get all available instances of a resource group.

A successful response will return all the available instances of the specified resource group.


/resource_groups/{resource_group_id}/instances

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Instance] result = apiInstance.resourceGroupsResourceGroupIdInstancesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Instance] result = apiInstance.resourceGroupsResourceGroupIdInstancesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all available instances of a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesGetWith:resourceGroupId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all available instances of a resource group.
                array[Instance] result = apiInstance.resourceGroupsResourceGroupIdInstancesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get all available instances of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of instances.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be one of: stop|start|restart|destroy|factory_reset.


/resource_groups/{resource_group_id}/instances/{instance_id}/{action}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/{action}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
String *action = action_example; // The action to apply.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Apply action to specific instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdActionPutWith:resourceGroupId
    instanceId:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var action = action_example; // {{String}} The action to apply.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdActionPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var action = action_example;  // String | The action to apply.

            try
            {
                // Apply action to specific instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$action = action_example; // String | The action to apply.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut($resourceGroupId, $instanceId, $action);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $action = action_example; # String | The action to apply.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, action => $action);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
action = action_example # String | The action to apply.

try: 
    # Apply action to specific instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_action_put(resourceGroupId, instanceId, action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
action*
String
The action to apply.
Required

Responses

Status: 200 - Successfully applied action from instance.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut

Attach a CD ROM to the specified instance.

Attaches a CD ROM image to the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/attach_cdrom

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/attach_cdrom"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        AttachCDROM body = ; // AttachCDROM | The parameters of instance attach CD ROM
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        AttachCDROM body = ; // AttachCDROM | The parameters of instance attach CD ROM
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
AttachCDROM *body = ; // The parameters of instance attach CD ROM (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Attach a CD ROM to the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{AttachCDROM}} The parameters of instance attach CD ROM
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new AttachCDROM(); // AttachCDROM | The parameters of instance attach CD ROM (optional) 

            try
            {
                // Attach a CD ROM to the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // AttachCDROM | The parameters of instance attach CD ROM

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::AttachCDROM->new(); # AttachCDROM | The parameters of instance attach CD ROM

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # AttachCDROM | The parameters of instance attach CD ROM (optional)

try: 
    # Attach a CD ROM to the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_attach_cdrom_put(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The CD ROM image attachment operation accepted successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut

Initiate a backup creation for the specified instance.

Initiate a backup creation for the specified instance in the resource group. Only available for SIM hosted in AWS. Process will fail if Instance is in Moving or another Backup for the same instance is in progress. It will also fail if there are more than `max_parallel_backups_per_cluster` backups running on the same cluster.


/resource_groups/{resource_group_id}/instances/{instance_id}/create_backup

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/create_backup"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Initiate a backup creation for the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPutWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(Template output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Initiate a backup creation for the specified instance.
                Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Initiate a backup creation for the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_create_backup_put(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 202 - The templates details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 501 - An unexpected error occurred.

{"code":501,"message":"Operation cannot proceed as it is not implemented or supported."}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet

Get the credentials of the specified instance of a resource group.

A successful response will return the credentials to login to the specified instance of the resource group.


/resource_groups/{resource_group_id}/instances/{instance_id}/credentials

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/credentials"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            array[InstanceCredentials] result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            array[InstanceCredentials] result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the credentials of the specified instance of a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGetWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(array[InstanceCredentials] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get the credentials of the specified instance of a resource group.
                array[InstanceCredentials] result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Get the credentials of the specified instance of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_credentials_get(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - The credentials to connect to to the instance.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdDelete

Delete a specified instance.

A successful response will delete the specified instance of the resource group.


/resource_groups/{resource_group_id}/instances/{instance_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId, instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId, instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Delete a specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdDeleteWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Delete a specified instance.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId, instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdDelete($resourceGroupId, $instanceId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Delete a specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_delete(resourceGroupId, instanceId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Successfully deleted the instance of the resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut

Detach a CD ROM from the specified instance.

Detaches the attached CD ROM image from the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/detach_cdrom

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/detach_cdrom"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Detach a CD ROM from the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPutWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Detach a CD ROM from the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Detach a CD ROM from the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_detach_cdrom_put(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - The CD ROM image detachment operation accepted successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdGet

Get a specific instance's details of a resource group.

A successful response will return the specified instance's details of the resource group.


/resource_groups/{resource_group_id}/instances/{instance_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a specific instance's details of a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdGetWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get a specific instance's details of a resource group.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdGet($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Get a specific instance's details of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_get(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Get an instance details from the resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdMovePut

Move the specified instance to another Cluster.

Initiate a backup move for the specified instance. The move is specified by the new cluster, the new resource group, the new datastore and networks. Instance should be in ACTIVE or SHUTOFF status. The response includes the information of the instance's move.


/resource_groups/{resource_group_id}/instances/{instance_id}/move

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/move"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
MoveInstance *body = ; // The parameters of instance move (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Move the specified instance to another Cluster.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdMovePutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(MoveStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{MoveInstance}} The parameters of instance move
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdMovePutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new MoveInstance(); // MoveInstance | The parameters of instance move (optional) 

            try
            {
                // Move the specified instance to another Cluster.
                MoveStatus result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // MoveInstance | The parameters of instance move

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::MoveInstance->new(); # MoveInstance | The parameters of instance move

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # MoveInstance | The parameters of instance move (optional)

try: 
    # Move the specified instance to another Cluster.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_move_put(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - A move of the instance initiated and the details of the move.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Status: 501 - An unexpected error occurred.

{"code":501,"message":"Operation cannot proceed as it is not implemented or supported."}

resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete

Detach PCI devices from the specified instance.

Detaches PCI device(s) from the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PCIDevicesIDs *body = ; // The parameters of instance Detach PCI devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Detach PCI devices from the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDeleteWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{PCIDevicesIDs}} The parameters of instance Detach PCI devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new PCIDevicesIDs(); // PCIDevicesIDs | The parameters of instance Detach PCI devices (optional) 

            try
            {
                // Detach PCI devices from the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::PCIDevicesIDs->new(); # PCIDevicesIDs | The parameters of instance Detach PCI devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # PCIDevicesIDs | The parameters of instance Detach PCI devices (optional)

try: 
    # Detach PCI devices from the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pcidevs_delete(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The PCI devices detached successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost

Attach PCI devices to the specified instance.

Attaches PCI device(s) to the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance attach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance attach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PCIDevicesIDs *body = ; // The parameters of instance attach PCI devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Attach PCI devices to the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPostWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{PCIDevicesIDs}} The parameters of instance attach PCI devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new PCIDevicesIDs(); // PCIDevicesIDs | The parameters of instance attach PCI devices (optional) 

            try
            {
                // Attach PCI devices to the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // PCIDevicesIDs | The parameters of instance attach PCI devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::PCIDevicesIDs->new(); # PCIDevicesIDs | The parameters of instance attach PCI devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # PCIDevicesIDs | The parameters of instance attach PCI devices (optional)

try: 
    # Attach PCI devices to the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pcidevs_post(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The PCI devices attached successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete

Detach platform devices from the specified instance.

Detaches Platform device(s) from the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pltdevs

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/pltdevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PLTDevicesIDs body = ; // PLTDevicesIDs | The parameters of instance Detach Platform devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PLTDevicesIDs body = ; // PLTDevicesIDs | The parameters of instance Detach Platform devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PLTDevicesIDs *body = ; // The parameters of instance Detach Platform devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Detach platform devices from the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDeleteWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{PLTDevicesIDs}} The parameters of instance Detach Platform devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new PLTDevicesIDs(); // PLTDevicesIDs | The parameters of instance Detach Platform devices (optional) 

            try
            {
                // Detach platform devices from the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // PLTDevicesIDs | The parameters of instance Detach Platform devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::PLTDevicesIDs->new(); # PLTDevicesIDs | The parameters of instance Detach Platform devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # PLTDevicesIDs | The parameters of instance Detach Platform devices (optional)

try: 
    # Detach platform devices from the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pltdevs_delete(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The Platform devices detached successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost

Attach Platform devices to the specified instance.

Attaches Platform device(s) to the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pltdevs

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/pltdevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PLTDevicesIDs body = ; // PLTDevicesIDs | The parameters of instance attach Platform devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        PLTDevicesIDs body = ; // PLTDevicesIDs | The parameters of instance attach Platform devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PLTDevicesIDs *body = ; // The parameters of instance attach Platform devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Attach Platform devices to the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPostWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{PLTDevicesIDs}} The parameters of instance attach Platform devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new PLTDevicesIDs(); // PLTDevicesIDs | The parameters of instance attach Platform devices (optional) 

            try
            {
                // Attach Platform devices to the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // PLTDevicesIDs | The parameters of instance attach Platform devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::PLTDevicesIDs->new(); # PLTDevicesIDs | The parameters of instance attach Platform devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # PLTDevicesIDs | The parameters of instance attach Platform devices (optional)

try: 
    # Attach Platform devices to the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pltdevs_post(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPltdevsPost: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The Platform devices attached successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut

Rename the specified instance.

Renames the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/rename

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/rename"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
RenameInstance *body = ; // The parameters of instance rename (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Rename the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdRenamePutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{RenameInstance}} The parameters of instance rename
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdRenamePutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new RenameInstance(); // RenameInstance | The parameters of instance rename (optional) 

            try
            {
                // Rename the specified instance.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // RenameInstance | The parameters of instance rename

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::RenameInstance->new(); # RenameInstance | The parameters of instance rename

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # RenameInstance | The parameters of instance rename (optional)

try: 
    # Rename the specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_rename_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - The instance renamed successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdResizePut

Resize the specified instance.

Initiates a resize operation at the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/resize

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/resize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
ResizeInstance *body = ; // The parameters of instance resize (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Resize the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdResizePutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{ResizeInstance}} The parameters of instance resize
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdResizePutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new ResizeInstance(); // ResizeInstance | The parameters of instance resize (optional) 

            try
            {
                // Resize the specified instance.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // ResizeInstance | The parameters of instance resize

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::ResizeInstance->new(); # ResizeInstance | The parameters of instance resize

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # ResizeInstance | The parameters of instance resize (optional)

try: 
    # Resize the specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_resize_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 204 - The resize initiated successfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet

Get instance's user data.

A successful response will return the instance's user data.


/resource_groups/{resource_group_id}/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            CloudInitOpts result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            CloudInitOpts result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get instance's user data.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGetWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(CloudInitOpts output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get instance's user data.
                CloudInitOpts result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Get instance's user data.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_user_data_get(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Instance's user data details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut

Update/edit instance's user data.

Instance's user data are updated for virtupian and SIM DB.


/resource_groups/{resource_group_id}/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        CloudInitOpts body = ; // CloudInitOpts | Instance's user data
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        CloudInitOpts body = ; // CloudInitOpts | Instance's user data
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
CloudInitOpts *body = ; // Instance's user data (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Update/edit instance's user data.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{CloudInitOpts}} Instance's user data
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new CloudInitOpts(); // CloudInitOpts | Instance's user data (optional) 

            try
            {
                // Update/edit instance's user data.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // CloudInitOpts | Instance's user data

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::CloudInitOpts->new(); # CloudInitOpts | Instance's user data

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # CloudInitOpts | Instance's user data (optional)

try: 
    # Update/edit instance's user data.
    api_instance.resource_groups_resource_group_id_instances_instance_id_user_data_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdUserDataPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Update was successful.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete

Stop an instance's VNC

Stop an instance's VNC by concealing from Cluster.


/resource_groups/{resource_group_id}/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Stop an instance's VNC
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdVncDeleteWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdVncDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Stop an instance's VNC
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete($resourceGroupId, $instanceId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.

try: 
    # Stop an instance's VNC
    api_instance.resource_groups_resource_group_id_instances_instance_id_vnc_delete(resourceGroupId, instanceId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 204 - Successfully stopped instance's VNC

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdVncPost

Start an instance's VNC

Start an instance's VNC by exposing access from Cluster. Instance should be in ACTIVE status. The VNC can be accessed through the websocket at '/ws/resource_groups/{resource_group_id}/instances/{instance_id}/vnc'.


/resource_groups/{resource_group_id}/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
VNCOpts *body = ; // The expose instance's VNC parameters (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Start an instance's VNC
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdVncPostWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{VNCOpts}} The expose instance's VNC parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdVncPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new VNCOpts(); // VNCOpts | The expose instance's VNC parameters (optional) 

            try
            {
                // Start an instance's VNC
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // VNCOpts | The expose instance's VNC parameters

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::VNCOpts->new(); # VNCOpts | The expose instance's VNC parameters

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # VNCOpts | The expose instance's VNC parameters (optional)

try: 
    # Start an instance's VNC
    api_instance.resource_groups_resource_group_id_instances_instance_id_vnc_post(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Successfully initiated instance VNC

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesPost

Create a new instance in a resource group.

Add a new instance in a resource group.


/resource_groups/{resource_group_id}/instances

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewInstance body = ; // NewInstance | The instance parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewInstance body = ; // NewInstance | The instance parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
NewInstance *body = ; // The instance parameters (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Create a new instance in a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesPostWith:resourceGroupId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'body':  // {{NewInstance}} The instance parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var body = new NewInstance(); // NewInstance | The instance parameters (optional) 

            try
            {
                // Create a new instance in a resource group.
                apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$body = ; // NewInstance | The instance parameters

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesPost($resourceGroupId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $body = WWW::SwaggerClient::Object::NewInstance->new(); # NewInstance | The instance parameters

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesPost(resourceGroupId => $resourceGroupId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
body =  # NewInstance | The instance parameters (optional)

try: 
    # Create a new instance in a resource group.
    api_instance.resource_groups_resource_group_id_instances_post(resourceGroupId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPost: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Successfully created instance in resource group

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut

Associate a private IP to an allocated public IP.

Associate the Network interface with the specified private IP to an allocated public IP.


/resource_groups/{resource_group_id}/instances/{private_ip}/associate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{private_ip}/associate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
String *privateIp = privateIp_example; // The instance's private IP to associate to.
String *publicIp = publicIp_example; // The public IP to associate.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Associate a private IP to an allocated public IP.
[apiInstance resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPutWith:resourceGroupId
    privateIp:privateIp
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var privateIp = privateIp_example; // {{String}} The instance's private IP to associate to.
var publicIp = publicIp_example; // {{String}} The public IP to associate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var privateIp = privateIp_example;  // String | The instance's private IP to associate to.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Associate a private IP to an allocated public IP.
                apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$privateIp = privateIp_example; // String | The instance's private IP to associate to.
$publicIp = publicIp_example; // String | The public IP to associate.

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut($resourceGroupId, $privateIp, $publicIp);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $privateIp = privateIp_example; # String | The instance's private IP to associate to.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId => $resourceGroupId, privateIp => $privateIp, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
privateIp = privateIp_example # String | The instance's private IP to associate to.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Associate a private IP to an allocated public IP.
    api_instance.resource_groups_resource_group_id_instances_private_ip_associate_ip_public_ip_put(resourceGroupId, privateIp, publicIp)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
private_ip*
String
The instance's private IP to associate to.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP associated to private IP successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksGet

Get all the networks of a resource group.


/resource_groups/{resource_group_id}/networks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the networks of a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksGetWith:resourceGroupId
              completionHandler: ^(array[Network] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the networks of a resource group.
                array[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdNetworksGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get all the networks of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_networks_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of networks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdDelete

Remove a network from a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a network from a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdDeleteWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Remove a network from a resource group.
                apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete($resourceGroupId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $networkId = 789; # Long | The network id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId => $resourceGroupId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
networkId = 789 # Long | The network id.

try: 
    # Remove a network from a resource group.
    api_instance.resource_groups_resource_group_id_networks_network_id_delete(resourceGroupId, networkId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 204 - Network removed successfully from the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdGet

Get a network of a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a network of a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdGetWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get a network of a resource group.
                Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdGet($resourceGroupId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId => $resourceGroupId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
networkId = 789 # Long | The network id.

try: 
    # Get a network of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_networks_network_id_get(resourceGroupId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - A network.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdPut

Add a network to a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a network to a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdPutWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Add a network to a resource group.
                apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut($resourceGroupId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $networkId = 789; # Long | The network id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId => $resourceGroupId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
networkId = 789 # Long | The network id.

try: 
    # Add a network to a resource group.
    api_instance.resource_groups_resource_group_id_networks_network_id_put(resourceGroupId, networkId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 204 - Network added successfully to the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsGet

Get all the PCI devices of a resource group.


/resource_groups/{resource_group_id}/pcidevs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String state = state_example; // String | Filter PCI devs based on their state.
        try {
            array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String state = state_example; // String | Filter PCI devs based on their state.
        try {
            array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
String *state = state_example; // Filter PCI devs based on their state. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the PCI devices of a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsGetWith:resourceGroupId
    state:state
              completionHandler: ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'state': state_example // {{String}} Filter PCI devs based on their state.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var state = state_example;  // String | Filter PCI devs based on their state. (optional) 

            try
            {
                // Get all the PCI devices of a resource group.
                array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$state = state_example; // String | Filter PCI devs based on their state.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPcidevsGet($resourceGroupId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $state = state_example; # String | Filter PCI devs based on their state.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId => $resourceGroupId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
state = state_example # String | Filter PCI devs based on their state. (optional)

try: 
    # Get all the PCI devices of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pcidevs_get(resourceGroupId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
Query parameters
Name Description
state
String
Filter PCI devs based on their state.

Responses

Status: 200 - A list of PCI devices.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdDelete

Remove a PCI device from a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The pcidev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a PCI device from a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pcidevId = 789; // {{Long}} The pcidev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The pcidev id.

            try
            {
                // Remove a PCI device from a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The pcidev id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pcidevId = 789; # Long | The pcidev id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pcidevId = 789 # Long | The pcidev id.

try: 
    # Remove a PCI device from a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_delete(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The pcidev id.
Required

Responses

Status: 204 - PCI device removed successfully from the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdGet

Get a PCI device of a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The pcidev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a PCI device of a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdGetWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(PCIDev output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pcidevId = 789; // {{Long}} The pcidev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The pcidev id.

            try
            {
                // Get a PCI device of a resource group.
                PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The pcidev id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdGet($resourceGroupId, $pcidevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pcidevId = 789; # Long | The pcidev id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pcidevId = 789 # Long | The pcidev id.

try: 
    # Get a PCI device of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_get(resourceGroupId, pcidevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The pcidev id.
Required

Responses

Status: 200 - A PCI device.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdPut

Add a PCI device to a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pcidevId = 789; // Long | The pcidev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The pcidev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a PCI device to a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdPutWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pcidevId = 789; // {{Long}} The pcidev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The pcidev id.

            try
            {
                // Add a PCI device to a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The pcidev id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pcidevId = 789; # Long | The pcidev id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pcidevId = 789 # Long | The pcidev id.

try: 
    # Add a PCI device to a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_put(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The pcidev id.
Required

Responses

Status: 204 - PCI device added successfully to the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPltdevsGet

Get all the Platform devices of a resource group.


/resource_groups/{resource_group_id}/pltdevs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pltdevs?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
        try {
            array[PLTDev] result = apiInstance.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
        try {
            array[PLTDev] result = apiInstance.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
String *state = state_example; // Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the Platform devices of a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsGetWith:resourceGroupId
    state:state
              completionHandler: ^(array[PLTDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'state': state_example // {{String}} Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var state = state_example;  // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional) 

            try
            {
                // Get all the Platform devices of a resource group.
                array[PLTDev] result = apiInstance.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$state = state_example; // String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPltdevsGet($resourceGroupId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $state = state_example; # String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId => $resourceGroupId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
state = state_example # String | Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty. (optional)

try: 
    # Get all the Platform devices of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pltdevs_get(resourceGroupId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
Query parameters
Name Description
state
String
Filter PCI devs based on their state. Accepted parameters are 'attached' , 'detached' and empty.

Responses

Status: 200 - A list of Platform devices.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPltdevsPltdevIdDelete

Remove a Platform device from a resource group.


/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pltdevId = 789; // The platform dev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a Platform device from a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsPltdevIdDeleteWith:resourceGroupId
    pltdevId:pltdevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pltdevId = 789; // {{Long}} The platform dev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsPltdevIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pltdevId = 789;  // Long | The platform dev id.

            try
            {
                // Remove a Platform device from a resource group.
                apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pltdevId = 789; // Long | The platform dev id.

try {
    $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete($resourceGroupId, $pltdevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pltdevId = 789; # Long | The platform dev id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId => $resourceGroupId, pltdevId => $pltdevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pltdevId = 789 # Long | The platform dev id.

try: 
    # Remove a Platform device from a resource group.
    api_instance.resource_groups_resource_group_id_pltdevs_pltdev_id_delete(resourceGroupId, pltdevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pltdev_id*
Long (int64)
The platform dev id.
Required

Responses

Status: 204 - Platform device removed successfully from the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPltdevsPltdevIdGet

Get a platform device of a resource group.


/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            PLTDev result = apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdGet(resourceGroupId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            PLTDev result = apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdGet(resourceGroupId, pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pltdevId = 789; // The platform dev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a platform device of a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsPltdevIdGetWith:resourceGroupId
    pltdevId:pltdevId
              completionHandler: ^(PLTDev output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pltdevId = 789; // {{Long}} The platform dev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPltdevsPltdevIdGet(resourceGroupId, pltdevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsPltdevIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pltdevId = 789;  // Long | The platform dev id.

            try
            {
                // Get a platform device of a resource group.
                PLTDev result = apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdGet(resourceGroupId, pltdevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsPltdevIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pltdevId = 789; // Long | The platform dev id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdGet($resourceGroupId, $pltdevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pltdevId = 789; # Long | The platform dev id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdGet(resourceGroupId => $resourceGroupId, pltdevId => $pltdevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pltdevId = 789 # Long | The platform dev id.

try: 
    # Get a platform device of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pltdevs_pltdev_id_get(resourceGroupId, pltdevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pltdev_id*
Long (int64)
The platform dev id.
Required

Responses

Status: 200 - A platform device.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPltdevsPltdevIdPut

Add a platform device to a resource group.


/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long pltdevId = 789; // Long | The platform dev id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pltdevId = 789; // The platform dev id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a platform device to a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsPltdevIdPutWith:resourceGroupId
    pltdevId:pltdevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var pltdevId = 789; // {{Long}} The platform dev id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsPltdevIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pltdevId = 789;  // Long | The platform dev id.

            try
            {
                // Add a platform device to a resource group.
                apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsPltdevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pltdevId = 789; // Long | The platform dev id.

try {
    $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdPut($resourceGroupId, $pltdevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $pltdevId = 789; # Long | The platform dev id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId => $resourceGroupId, pltdevId => $pltdevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
pltdevId = 789 # Long | The platform dev id.

try: 
    # Add a platform device to a resource group.
    api_instance.resource_groups_resource_group_id_pltdevs_pltdev_id_put(resourceGroupId, pltdevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pltdev_id*
Long (int64)
The platform dev id.
Required

Responses

Status: 204 - Platform device added successfully to the resource group.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPublicIpsGet

Get a the allocated public IPs of a resource group.

A successful response will return all the allocated public IPS of the specified resource group.


/resource_groups/{resource_group_id}/public_ips

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/public_ips?available_ips="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Boolean availableIps = true; // Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.
        try {
            array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, availableIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPublicIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Boolean availableIps = true; // Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.
        try {
            array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, availableIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPublicIpsGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Boolean *availableIps = true; // Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a the allocated public IPs of a resource group.
[apiInstance resourceGroupsResourceGroupIdPublicIpsGetWith:resourceGroupId
    availableIps:availableIps
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'availableIps': true // {{Boolean}} Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPublicIpsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var availableIps = true;  // Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned. (optional) 

            try
            {
                // Get a the allocated public IPs of a resource group.
                array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, availableIps);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPublicIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$availableIps = true; // Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPublicIpsGet($resourceGroupId, $availableIps);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPublicIpsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $availableIps = true; # Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId => $resourceGroupId, availableIps => $availableIps);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPublicIpsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
availableIps = true # Boolean | Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned. (optional)

try: 
    # Get a the allocated public IPs of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_public_ips_get(resourceGroupId, availableIps=availableIps)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPublicIpsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
Query parameters
Name Description
available_ips
Boolean
Set this parameter to true to get only all available public IPs. In case that it is set to false, all public IPs are returned.

Responses

Status: 200 - A list of the allocated public IPs.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPut

Edit an existing resource group.

The endpoint edits a new resource group. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to edit.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to edit.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
NewResourceGroup *body = ; // The resource group to edit. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Edit an existing resource group.
[apiInstance resourceGroupsResourceGroupIdPutWith:resourceGroupId
    body:body
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'body':  // {{NewResourceGroup}} The resource group to edit.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPut(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var body = new NewResourceGroup(); // NewResourceGroup | The resource group to edit. (optional) 

            try
            {
                // Edit an existing resource group.
                ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$body = ; // NewResourceGroup | The resource group to edit.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPut($resourceGroupId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $body = WWW::SwaggerClient::Object::NewResourceGroup->new(); # NewResourceGroup | The resource group to edit.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPut(resourceGroupId => $resourceGroupId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
body =  # NewResourceGroup | The resource group to edit. (optional)

try: 
    # Edit an existing resource group.
    api_response = api_instance.resource_groups_resource_group_id_put(resourceGroupId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Resource Group updated.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdTemplatesGet

Get the templates of the specified resource group.

A successful response will return a list of the templates of the specified resource group.


/resource_groups/{resource_group_id}/templates

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Template] result = apiInstance.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            array[Template] result = apiInstance.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the templates of the specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesGetWith:resourceGroupId
              completionHandler: ^(array[Template] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdTemplatesGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get the templates of the specified resource group.
                array[Template] result = apiInstance.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get the templates of the specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_templates_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - The templates list of the resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdTemplatesTemplateIdDelete

Delete a template of a specified resource group.

A successful response will delete the specified template of the specified resource group.


/resource_groups/{resource_group_id}/templates/{template_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long templateId = 789; // Long | The template id.
        try {
            apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long templateId = 789; // Long | The template id.
        try {
            apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *templateId = 789; // The template id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Delete a template of a specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesTemplateIdDeleteWith:resourceGroupId
    templateId:templateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var templateId = 789; // {{Long}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdTemplatesTemplateIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var templateId = 789;  // Long | The template id.

            try
            {
                // Delete a template of a specified resource group.
                apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$templateId = 789; // Long | The template id.

try {
    $api_instance->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete($resourceGroupId, $templateId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $templateId = 789; # Long | The template id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId => $resourceGroupId, templateId => $templateId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
templateId = 789 # Long | The template id.

try: 
    # Delete a template of a specified resource group.
    api_instance.resource_groups_resource_group_id_templates_template_id_delete(resourceGroupId, templateId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
template_id*
Long (int64)
The template id.
Required

Responses

Status: 204 - Successfully deleted the specified template.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdTemplatesTemplateIdGet

Get the specified template's details of a specified resource group.

A successful response will return the details of the specified template of the specified resource group.


/resource_groups/{resource_group_id}/templates/{template_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long templateId = 789; // Long | The template id.
        try {
            Template result = apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesTemplateIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long templateId = 789; // Long | The template id.
        try {
            Template result = apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesTemplateIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *templateId = 789; // The template id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get the specified template's details of a specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesTemplateIdGetWith:resourceGroupId
    templateId:templateId
              completionHandler: ^(Template output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var templateId = 789; // {{Long}} The template id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId, templateId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdTemplatesTemplateIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var templateId = 789;  // Long | The template id.

            try
            {
                // Get the specified template's details of a specified resource group.
                Template result = apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId, templateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesTemplateIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$templateId = 789; // Long | The template id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdTemplatesTemplateIdGet($resourceGroupId, $templateId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $templateId = 789; # Long | The template id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId => $resourceGroupId, templateId => $templateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
templateId = 789 # Long | The template id.

try: 
    # Get the specified template's details of a specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_templates_template_id_get(resourceGroupId, templateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
template_id*
Long (int64)
The template id.
Required

Responses

Status: 200 - The templates details of the resource group.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Roles

rolesGet

Get all available roles.

Get a list with all the available roles. Action can be performed only by users with `admin` role.


/roles

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        try {
            array[Role] result = apiInstance.rolesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        try {
            array[Role] result = apiInstance.rolesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesGet");
            e.printStackTrace();
        }
    }
}

RolesApi *apiInstance = [[RolesApi alloc] init];

// Get all available roles.
[apiInstance rolesGetWithCompletionHandler: 
              ^(array[Role] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesGetExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();

            try
            {
                // Get all available roles.
                array[Role] result = apiInstance.rolesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();

eval { 
    my $result = $api_instance->rolesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()

try: 
    # Get all available roles.
    api_response = api_instance.roles_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of all the available roles.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesPost

Create a new Role.

Create a new role. The following validations apply: * Name should not be empty (422) Action can be performed only by users with `admin` role.


/roles

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/roles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        NewRole body = ; // NewRole | The new role details.
        try {
            Role result = apiInstance.rolesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        NewRole body = ; // NewRole | The new role details.
        try {
            Role result = apiInstance.rolesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesPost");
            e.printStackTrace();
        }
    }
}
NewRole *body = ; // The new role details. (optional)

RolesApi *apiInstance = [[RolesApi alloc] init];

// Create a new Role.
[apiInstance rolesPostWith:body
              completionHandler: ^(Role output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var opts = { 
  'body':  // {{NewRole}} The new role details.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesPostExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var body = new NewRole(); // NewRole | The new role details. (optional) 

            try
            {
                // Create a new Role.
                Role result = apiInstance.rolesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$body = ; // NewRole | The new role details.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $body = WWW::SwaggerClient::Object::NewRole->new(); # NewRole | The new role details.

eval { 
    my $result = $api_instance->rolesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
body =  # NewRole | The new role details. (optional)

try: 
    # Create a new Role.
    api_response = api_instance.roles_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Role created successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdAvailableUsersAssignGet

Get users available to assign a role.

Get a list of users that can be assigned to the specified role


/roles/{role_id}/available_users/assign

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/available_users/assign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            array[User] result = apiInstance.rolesRoleIdAvailableUsersAssignGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdAvailableUsersAssignGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            array[User] result = apiInstance.rolesRoleIdAvailableUsersAssignGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdAvailableUsersAssignGet");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Get users available to assign a role.
[apiInstance rolesRoleIdAvailableUsersAssignGetWith:roleId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesRoleIdAvailableUsersAssignGet(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdAvailableUsersAssignGetExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get users available to assign a role.
                array[User] result = apiInstance.rolesRoleIdAvailableUsersAssignGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdAvailableUsersAssignGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    my $result = $api_instance->rolesRoleIdAvailableUsersAssignGet(roleId => $roleId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdAvailableUsersAssignGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Get users available to assign a role.
    api_response = api_instance.roles_role_id_available_users_assign_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdAvailableUsersAssignGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - A list of the users

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdAvailableUsersDeassignGet

Get users available to deassign from a role.

Get a list of users that can be deassigned from the specific role


/roles/{role_id}/available_users/deassign

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/available_users/deassign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            array[User] result = apiInstance.rolesRoleIdAvailableUsersDeassignGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdAvailableUsersDeassignGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            array[User] result = apiInstance.rolesRoleIdAvailableUsersDeassignGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdAvailableUsersDeassignGet");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Get users available to deassign from a role.
[apiInstance rolesRoleIdAvailableUsersDeassignGetWith:roleId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesRoleIdAvailableUsersDeassignGet(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdAvailableUsersDeassignGetExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get users available to deassign from a role.
                array[User] result = apiInstance.rolesRoleIdAvailableUsersDeassignGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdAvailableUsersDeassignGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    my $result = $api_instance->rolesRoleIdAvailableUsersDeassignGet(roleId => $roleId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdAvailableUsersDeassignGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Get users available to deassign from a role.
    api_response = api_instance.roles_role_id_available_users_deassign_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdAvailableUsersDeassignGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - A list of the users

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdDelete

Delete a role with specific ID.

Delete the role with the specified ID. Action can be performed only by users with `admin` role.


/roles/{role_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdDelete(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdDelete(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdDelete");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Delete a role with specific ID.
[apiInstance rolesRoleIdDeleteWith:roleId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.rolesRoleIdDelete(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Delete a role with specific ID.
                apiInstance.rolesRoleIdDelete(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

try {
    $api_instance->rolesRoleIdDelete($roleId);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->rolesRoleIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RolesApi;

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    $api_instance->rolesRoleIdDelete(roleId => $roleId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Delete a role with specific ID.
    api_instance.roles_role_id_delete(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role successfully deleted.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdDisablePut

Disable the role

Disable the Role with the specific ID by changing its status. Action can be performed only by users with `admin` role.


/roles/{role_id}/disable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/disable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdDisablePut(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdDisablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdDisablePut(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdDisablePut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Disable the role
[apiInstance rolesRoleIdDisablePutWith:roleId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.rolesRoleIdDisablePut(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdDisablePutExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Disable the role
                apiInstance.rolesRoleIdDisablePut(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdDisablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

try {
    $api_instance->rolesRoleIdDisablePut($roleId);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->rolesRoleIdDisablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RolesApi;

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    $api_instance->rolesRoleIdDisablePut(roleId => $roleId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdDisablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Disable the role
    api_instance.roles_role_id_disable_put(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdDisablePut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role disabled successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdEnablePut

Enable the role

Enable the Role with the specific ID by changing its status. Action can be performed only by users with `admin` role.


/roles/{role_id}/enable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/enable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdEnablePut(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdEnablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            apiInstance.rolesRoleIdEnablePut(roleId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdEnablePut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Enable the role
[apiInstance rolesRoleIdEnablePutWith:roleId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.rolesRoleIdEnablePut(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdEnablePutExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Enable the role
                apiInstance.rolesRoleIdEnablePut(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdEnablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

try {
    $api_instance->rolesRoleIdEnablePut($roleId);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->rolesRoleIdEnablePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RolesApi;

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    $api_instance->rolesRoleIdEnablePut(roleId => $roleId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdEnablePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Enable the role
    api_instance.roles_role_id_enable_put(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdEnablePut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role enabled successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdGet

Get role with specific ID.

A successful response will return a role with specific ID. Action can be performed only by users with `admin` role.


/roles/{role_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            Role result = apiInstance.rolesRoleIdGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            Role result = apiInstance.rolesRoleIdGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdGet");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Get role with specific ID.
[apiInstance rolesRoleIdGetWith:roleId
              completionHandler: ^(Role output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesRoleIdGet(roleId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdGetExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get role with specific ID.
                Role result = apiInstance.rolesRoleIdGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

eval { 
    my $result = $api_instance->rolesRoleIdGet(roleId => $roleId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.

try: 
    # Get role with specific ID.
    api_response = api_instance.roles_role_id_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Details of the role with specific ID.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdUserUserIdAssignPut

Assign a specific role to a specific user.

Assign a specific role with role_id to a specific user with user_id. Action can be performed only by users with `admin` role.


/roles/{role_id}/user/{user_id}/assign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/user/{user_id}/assign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdAssignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdAssignPut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *userId = 789; // The user id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// Assign a specific role to a specific user.
[apiInstance rolesRoleIdUserUserIdAssignPutWith:roleId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.
var userId = 789; // {{Long}} The user id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.rolesRoleIdUserUserIdAssignPut(roleId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdUserUserIdAssignPutExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.
            var userId = 789;  // Long | The user id.

            try
            {
                // Assign a specific role to a specific user.
                apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdUserUserIdAssignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.
$userId = 789; // Long | The user id.

try {
    $api_instance->rolesRoleIdUserUserIdAssignPut($roleId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->rolesRoleIdUserUserIdAssignPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RolesApi;

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.
my $userId = 789; # Long | The user id.

eval { 
    $api_instance->rolesRoleIdUserUserIdAssignPut(roleId => $roleId, userId => $userId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdUserUserIdAssignPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.
userId = 789 # Long | The user id.

try: 
    # Assign a specific role to a specific user.
    api_instance.roles_role_id_user_user_id_assign_put(roleId, userId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdUserUserIdAssignPut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Role assigned to user successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

rolesRoleIdUserUserIdDeassignPut

De-assign a specific role from a specific user.

De-assign a specific role with role_id to a specific user with user_id. Action can be performed only by users with `admin` role.


/roles/{role_id}/user/{user_id}/deassign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/user/{user_id}/deassign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdDeassignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdDeassignPut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *userId = 789; // The user id.

RolesApi *apiInstance = [[RolesApi alloc] init];

// De-assign a specific role from a specific user.
[apiInstance rolesRoleIdUserUserIdDeassignPutWith:roleId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.
var userId = 789; // {{Long}} The user id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.rolesRoleIdUserUserIdDeassignPut(roleId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rolesRoleIdUserUserIdDeassignPutExample
    {
        public void main()
        {

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.
            var userId = 789;  // Long | The user id.

            try
            {
                // De-assign a specific role from a specific user.
                apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdUserUserIdDeassignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.
$userId = 789; // Long | The user id.

try {
    $api_instance->rolesRoleIdUserUserIdDeassignPut($roleId, $userId);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->rolesRoleIdUserUserIdDeassignPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RolesApi;

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.
my $userId = 789; # Long | The user id.

eval { 
    $api_instance->rolesRoleIdUserUserIdDeassignPut(roleId => $roleId, userId => $userId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdUserUserIdDeassignPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RolesApi()
roleId = 789 # Long | The role id.
userId = 789 # Long | The user id.

try: 
    # De-assign a specific role from a specific user.
    api_instance.roles_role_id_user_user_id_deassign_put(roleId, userId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdUserUserIdDeassignPut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Role de-assigned from a user successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Saus

clustersClusterIdSausMessagesGet

Get all available SAUS messages for a specified cluster.

A successful response will return a list with all the available SAUS messages for the cluster.


/clusters/{cluster_id}/saus/messages

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SausApi *apiInstance = [[SausApi alloc] init];

// Get all available SAUS messages for a specified cluster.
[apiInstance clustersClusterIdSausMessagesGetWith:clusterId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSausMessagesGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSausMessagesGetExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get all available SAUS messages for a specified cluster.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersClusterIdSausMessagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSausMessagesGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersClusterIdSausMessagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get all available SAUS messages for a specified cluster.
    api_response = api_instance.clusters_cluster_id_saus_messages_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersClusterIdSausMessagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of SAUS messages.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSausMessagesMessageIdDownloadPut

Download the specified SAUS message.

A successful response will download the SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.

SausApi *apiInstance = [[SausApi alloc] init];

// Download the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdDownloadPutWith:clusterId
    messageId:messageId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSausMessagesMessageIdDownloadPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.

            try
            {
                // Download the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersClusterIdSausMessagesMessageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$clusterId = 789; // Long | The cluster id.
$messageId = 789; // Long | The SAUS message id.

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdDownloadPut($clusterId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdDownloadPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SausApi;

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $clusterId = 789; # Long | The cluster id.
my $messageId = 789; # Long | The SAUS message id.

eval { 
    my $result = $api_instance->clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId => $clusterId, messageId => $messageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdDownloadPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
clusterId = 789 # Long | The cluster id.
messageId = 789 # Long | The SAUS message id.

try: 
    # Download the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_download_put(clusterId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
message_id*
Long (int64)
The SAUS message id.
Required

Responses

Status: 200 - Status accepted. The SAUS message will be downloaded.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSausMessagesMessageIdInstallPut

Install the specified SAUS message.

This action will install the SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}/install

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}/install?force="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        Boolean force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        Boolean force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.
Boolean *force = true; // Set this parameter to true so the update will forcefully shut down all active VMs (optional)

SausApi *apiInstance = [[SausApi alloc] init];

// Install the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdInstallPutWith:clusterId
    messageId:messageId
    force:force
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.
var opts = { 
  'force': true // {{Boolean}} Set this parameter to true so the update will forcefully shut down all active VMs
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSausMessagesMessageIdInstallPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.
            var force = true;  // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs (optional) 

            try
            {
                // Install the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId, force);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersClusterIdSausMessagesMessageIdInstallPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$clusterId = 789; // Long | The cluster id.
$messageId = 789; // Long | The SAUS message id.
$force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdInstallPut($clusterId, $messageId, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdInstallPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SausApi;

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $clusterId = 789; # Long | The cluster id.
my $messageId = 789; # Long | The SAUS message id.
my $force = true; # Boolean | Set this parameter to true so the update will forcefully shut down all active VMs

eval { 
    my $result = $api_instance->clustersClusterIdSausMessagesMessageIdInstallPut(clusterId => $clusterId, messageId => $messageId, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdInstallPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
clusterId = 789 # Long | The cluster id.
messageId = 789 # Long | The SAUS message id.
force = true # Boolean | Set this parameter to true so the update will forcefully shut down all active VMs (optional)

try: 
    # Install the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_install_put(clusterId, messageId, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdInstallPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
message_id*
Long (int64)
The SAUS message id.
Required
Query parameters
Name Description
force
Boolean
Set this parameter to true so the update will forcefully shut down all active VMs

Responses

Status: 200 - Status accepted. The SAUS message will be installed.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSausMessagesMessageIdPut

Change the read status of the specified SAUS message.

This action will change the read status of the message, and will return the updated SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long clusterId = 789; // Long | The cluster id.
        Long messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersClusterIdSausMessagesMessageIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.

SausApi *apiInstance = [[SausApi alloc] init];

// Change the read status of the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdPutWith:clusterId
    messageId:messageId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSausMessagesMessageIdPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.

            try
            {
                // Change the read status of the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersClusterIdSausMessagesMessageIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$clusterId = 789; // Long | The cluster id.
$messageId = 789; // Long | The SAUS message id.

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdPut($clusterId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SausApi;

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $clusterId = 789; # Long | The cluster id.
my $messageId = 789; # Long | The SAUS message id.

eval { 
    my $result = $api_instance->clustersClusterIdSausMessagesMessageIdPut(clusterId => $clusterId, messageId => $messageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
clusterId = 789 # Long | The cluster id.
messageId = 789 # Long | The SAUS message id.

try: 
    # Change the read status of the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_put(clusterId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersClusterIdSausMessagesMessageIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
message_id*
Long (int64)
The SAUS message id.
Required

Responses

Status: 200 - Status accepted. The status of the SAUS message will be updated.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersSausMessagesGet

Get all available SAUS messages for multiple clusters.

A successful response will return a list with all the available SAUS messages from all the clusters.


/clusters/saus/messages

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/saus/messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesGet");
            e.printStackTrace();
        }
    }
}

SausApi *apiInstance = [[SausApi alloc] init];

// Get all available SAUS messages for multiple clusters.
[apiInstance clustersSausMessagesGetWithCompletionHandler: 
              ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersSausMessagesGetExample
    {
        public void main()
        {

            var apiInstance = new SausApi();

            try
            {
                // Get all available SAUS messages for multiple clusters.
                array[SausMessage] result = apiInstance.clustersSausMessagesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersSausMessagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();

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

my $api_instance = WWW::SwaggerClient::SausApi->new();

eval { 
    my $result = $api_instance->clustersSausMessagesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersSausMessagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()

try: 
    # Get all available SAUS messages for multiple clusters.
    api_response = api_instance.clusters_saus_messages_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersSausMessagesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of SAUS messages of multiple clusters.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersSausMessagesMessageIdDownloadPut

Download the specified SAUS messages.

A successful response will download the SAUS messages.


/clusters/saus/messages/{message_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages/{message_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *messageId = 789; // The SAUS message id.
SausMessagesIDs *body = ; // The SAUS messages id's. (optional)

SausApi *apiInstance = [[SausApi alloc] init];

// Download the specified SAUS messages.
[apiInstance clustersSausMessagesMessageIdDownloadPutWith:messageId
    body:body
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var messageId = 789; // {{Long}} The SAUS message id.
var opts = { 
  'body':  // {{SausMessagesIDs}} The SAUS messages id's.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesMessageIdDownloadPut(messageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersSausMessagesMessageIdDownloadPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var messageId = 789;  // Long | The SAUS message id.
            var body = new SausMessagesIDs(); // SausMessagesIDs | The SAUS messages id's. (optional) 

            try
            {
                // Download the specified SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersSausMessagesMessageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$messageId = 789; // Long | The SAUS message id.
$body = ; // SausMessagesIDs | The SAUS messages id's.

try {
    $result = $api_instance->clustersSausMessagesMessageIdDownloadPut($messageId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SausApi->clustersSausMessagesMessageIdDownloadPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SausApi;

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $messageId = 789; # Long | The SAUS message id.
my $body = WWW::SwaggerClient::Object::SausMessagesIDs->new(); # SausMessagesIDs | The SAUS messages id's.

eval { 
    my $result = $api_instance->clustersSausMessagesMessageIdDownloadPut(messageId => $messageId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersSausMessagesMessageIdDownloadPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
messageId = 789 # Long | The SAUS message id.
body =  # SausMessagesIDs | The SAUS messages id's. (optional)

try: 
    # Download the specified SAUS messages.
    api_response = api_instance.clusters_saus_messages_message_id_download_put(messageId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersSausMessagesMessageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
message_id*
Long (int64)
The SAUS message id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Status accepted. The SAUS messages will be downloaded.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersSausMessagesMessageIdInstallPut

Install the specified SAUS messages.

A successful response will install the SAUS messages.


/clusters/saus/messages/{message_id}/install

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages/{message_id}/install?force="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        Boolean force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        Boolean force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body, force);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
Long *messageId = 789; // The SAUS message id.
SausMessagesIDs *body = ; // The SAUS messages id's. (optional)
Boolean *force = true; // Set this parameter to true so the update will forcefully shut down all active VMs (optional)

SausApi *apiInstance = [[SausApi alloc] init];

// Install the specified SAUS messages.
[apiInstance clustersSausMessagesMessageIdInstallPutWith:messageId
    body:body
    force:force
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var messageId = 789; // {{Long}} The SAUS message id.
var opts = { 
  'body':  // {{SausMessagesIDs}} The SAUS messages id's.
  'force': true // {{Boolean}} Set this parameter to true so the update will forcefully shut down all active VMs
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesMessageIdInstallPut(messageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersSausMessagesMessageIdInstallPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var messageId = 789;  // Long | The SAUS message id.
            var body = new SausMessagesIDs(); // SausMessagesIDs | The SAUS messages id's. (optional) 
            var force = true;  // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs (optional) 

            try
            {
                // Install the specified SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body, force);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersSausMessagesMessageIdInstallPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$messageId = 789; // Long | The SAUS message id.
$body = ; // SausMessagesIDs | The SAUS messages id's.
$force = true; // Boolean | Set this parameter to true so the update will forcefully shut down all active VMs

try {
    $result = $api_instance->clustersSausMessagesMessageIdInstallPut($messageId, $body, $force);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SausApi->clustersSausMessagesMessageIdInstallPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SausApi;

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $messageId = 789; # Long | The SAUS message id.
my $body = WWW::SwaggerClient::Object::SausMessagesIDs->new(); # SausMessagesIDs | The SAUS messages id's.
my $force = true; # Boolean | Set this parameter to true so the update will forcefully shut down all active VMs

eval { 
    my $result = $api_instance->clustersSausMessagesMessageIdInstallPut(messageId => $messageId, body => $body, force => $force);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersSausMessagesMessageIdInstallPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
messageId = 789 # Long | The SAUS message id.
body =  # SausMessagesIDs | The SAUS messages id's. (optional)
force = true # Boolean | Set this parameter to true so the update will forcefully shut down all active VMs (optional)

try: 
    # Install the specified SAUS messages.
    api_response = api_instance.clusters_saus_messages_message_id_install_put(messageId, body=body, force=force)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersSausMessagesMessageIdInstallPut: %s\n" % e)

Parameters

Path parameters
Name Description
message_id*
Long (int64)
The SAUS message id.
Required
Body parameters
Name Description
body
Query parameters
Name Description
force
Boolean
Set this parameter to true so the update will forcefully shut down all active VMs

Responses

Status: 200 - Status accepted. The SAUS messages will be installed.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersSausMessagesPut

Change the read status of multiple SAUS messages.

A successful response will change the read status of the specified SAUS messages.


/clusters/saus/messages

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SausApi;

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

public class SausApiExample {

    public static void main(String[] args) {
        
        SausApi apiInstance = new SausApi();
        SausMessagesUpdateIDs body = ; // SausMessagesUpdateIDs | The messages read action and  id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SausApi;

public class SausApiExample {

    public static void main(String[] args) {
        SausApi apiInstance = new SausApi();
        SausMessagesUpdateIDs body = ; // SausMessagesUpdateIDs | The messages read action and  id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SausApi#clustersSausMessagesPut");
            e.printStackTrace();
        }
    }
}
SausMessagesUpdateIDs *body = ; // The messages read action and  id's. (optional)

SausApi *apiInstance = [[SausApi alloc] init];

// Change the read status of multiple SAUS messages.
[apiInstance clustersSausMessagesPutWith:body
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SausApi()
var opts = { 
  'body':  // {{SausMessagesUpdateIDs}} The messages read action and  id's.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesPut(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersSausMessagesPutExample
    {
        public void main()
        {

            var apiInstance = new SausApi();
            var body = new SausMessagesUpdateIDs(); // SausMessagesUpdateIDs | The messages read action and  id's. (optional) 

            try
            {
                // Change the read status of multiple SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SausApi.clustersSausMessagesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSausApi();
$body = ; // SausMessagesUpdateIDs | The messages read action and  id's.

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

my $api_instance = WWW::SwaggerClient::SausApi->new();
my $body = WWW::SwaggerClient::Object::SausMessagesUpdateIDs->new(); # SausMessagesUpdateIDs | The messages read action and  id's.

eval { 
    my $result = $api_instance->clustersSausMessagesPut(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SausApi->clustersSausMessagesPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SausApi()
body =  # SausMessagesUpdateIDs | The messages read action and  id's. (optional)

try: 
    # Change the read status of multiple SAUS messages.
    api_response = api_instance.clusters_saus_messages_put(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SausApi->clustersSausMessagesPut: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Status accepted. The status of the SAUS messages will be updated.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

ScheduledSnapshots

scheduledSnapshotsGet

Get all available scheduled tasks for snapshots.

A successful response will return all the available scheduled snapshots.


/scheduled_snapshots

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/scheduled_snapshots"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledSnapshotsApi;

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        try {
            array[ScheduledSnapshot] result = apiInstance.scheduledSnapshotsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        try {
            array[ScheduledSnapshot] result = apiInstance.scheduledSnapshotsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsGet");
            e.printStackTrace();
        }
    }
}

ScheduledSnapshotsApi *apiInstance = [[ScheduledSnapshotsApi alloc] init];

// Get all available scheduled tasks for snapshots.
[apiInstance scheduledSnapshotsGetWithCompletionHandler: 
              ^(array[ScheduledSnapshot] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scheduledSnapshotsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scheduledSnapshotsGetExample
    {
        public void main()
        {

            var apiInstance = new ScheduledSnapshotsApi();

            try
            {
                // Get all available scheduled tasks for snapshots.
                array[ScheduledSnapshot] result = apiInstance.scheduledSnapshotsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();

eval { 
    my $result = $api_instance->scheduledSnapshotsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ScheduledSnapshotsApi()

try: 
    # Get all available scheduled tasks for snapshots.
    api_response = api_instance.scheduled_snapshots_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the scheduled snapshots.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

scheduledSnapshotsPost

Create a new scheduled task of the snapshot.

A successful response will create and return the new scheduled snapshot. A Conflict error (409) will be returned in case too many jobs exist for the same instance. Configuration: `max_sched_snaps_per_vm` (default = 5).


/scheduled_snapshots

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/scheduled_snapshots"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledSnapshotsApi;

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        NewScheduledSnapshot body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        NewScheduledSnapshot body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsPost");
            e.printStackTrace();
        }
    }
}
NewScheduledSnapshot *body = ; // The scheduled snapshot parameters. (optional)

ScheduledSnapshotsApi *apiInstance = [[ScheduledSnapshotsApi alloc] init];

// Create a new scheduled task of the snapshot.
[apiInstance scheduledSnapshotsPostWith:body
              completionHandler: ^(ScheduledSnapshot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var opts = { 
  'body':  // {{NewScheduledSnapshot}} The scheduled snapshot parameters.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scheduledSnapshotsPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scheduledSnapshotsPostExample
    {
        public void main()
        {

            var apiInstance = new ScheduledSnapshotsApi();
            var body = new NewScheduledSnapshot(); // NewScheduledSnapshot | The scheduled snapshot parameters. (optional) 

            try
            {
                // Create a new scheduled task of the snapshot.
                ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $body = WWW::SwaggerClient::Object::NewScheduledSnapshot->new(); # NewScheduledSnapshot | The scheduled snapshot parameters.

eval { 
    my $result = $api_instance->scheduledSnapshotsPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ScheduledSnapshotsApi()
body =  # NewScheduledSnapshot | The scheduled snapshot parameters. (optional)

try: 
    # Create a new scheduled task of the snapshot.
    api_response = api_instance.scheduled_snapshots_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - A new scheduled snapshot has been created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

scheduledSnapshotsSchedsnapIdDelete

Delete the given scheduled task of the snapshot.

A successful response will stop the cron job of the scheduled task.


/scheduled_snapshots/{schedsnap_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/scheduled_snapshots/{schedsnap_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledSnapshotsApi;

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *schedsnapId = 56; // The scheduled snapshot id.

ScheduledSnapshotsApi *apiInstance = [[ScheduledSnapshotsApi alloc] init];

// Delete the given scheduled task of the snapshot.
[apiInstance scheduledSnapshotsSchedsnapIdDeleteWith:schedsnapId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var schedsnapId = 56; // {{Integer}} The scheduled snapshot id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.scheduledSnapshotsSchedsnapIdDelete(schedsnapId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scheduledSnapshotsSchedsnapIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ScheduledSnapshotsApi();
            var schedsnapId = 56;  // Integer | The scheduled snapshot id.

            try
            {
                // Delete the given scheduled task of the snapshot.
                apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsSchedsnapIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$schedsnapId = 56; // Integer | The scheduled snapshot id.

try {
    $api_instance->scheduledSnapshotsSchedsnapIdDelete($schedsnapId);
} catch (Exception $e) {
    echo 'Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ScheduledSnapshotsApi;

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $schedsnapId = 56; # Integer | The scheduled snapshot id.

eval { 
    $api_instance->scheduledSnapshotsSchedsnapIdDelete(schedsnapId => $schedsnapId);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ScheduledSnapshotsApi()
schedsnapId = 56 # Integer | The scheduled snapshot id.

try: 
    # Delete the given scheduled task of the snapshot.
    api_instance.scheduled_snapshots_schedsnap_id_delete(schedsnapId)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
schedsnap_id*
Integer (uint)
The scheduled snapshot id.
Required

Responses

Status: 204 - Scheduled snapshot deleted successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

scheduledSnapshotsSchedsnapIdGet

Get the given scheduled jobs's details.

A successful response will get the scheduled snapshot job's details.


/scheduled_snapshots/{schedsnap_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/scheduled_snapshots/{schedsnap_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledSnapshotsApi;

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdGet");
            e.printStackTrace();
        }
    }
}
Integer *schedsnapId = 56; // The scheduled snapshot id.

ScheduledSnapshotsApi *apiInstance = [[ScheduledSnapshotsApi alloc] init];

// Get the given scheduled jobs's details.
[apiInstance scheduledSnapshotsSchedsnapIdGetWith:schedsnapId
              completionHandler: ^(ScheduledSnapshot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var schedsnapId = 56; // {{Integer}} The scheduled snapshot id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scheduledSnapshotsSchedsnapIdGet(schedsnapId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class scheduledSnapshotsSchedsnapIdGetExample
    {
        public void main()
        {

            var apiInstance = new ScheduledSnapshotsApi();
            var schedsnapId = 56;  // Integer | The scheduled snapshot id.

            try
            {
                // Get the given scheduled jobs's details.
                ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsSchedsnapIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$schedsnapId = 56; // Integer | The scheduled snapshot id.

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $schedsnapId = 56; # Integer | The scheduled snapshot id.

eval { 
    my $result = $api_instance->scheduledSnapshotsSchedsnapIdGet(schedsnapId => $schedsnapId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ScheduledSnapshotsApi()
schedsnapId = 56 # Integer | The scheduled snapshot id.

try: 
    # Get the given scheduled jobs's details.
    api_response = api_instance.scheduled_snapshots_schedsnap_id_get(schedsnapId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
schedsnap_id*
Integer (uint)
The scheduled snapshot id.
Required

Responses

Status: 200 - A scheduled snapshot object.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Stats

getAlertsGet

Get alerts from the connected clusters

A successful response will return a list of alerts of the connected clusters.


/get_alerts

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/get_alerts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StatsApi;

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

public class StatsApiExample {

    public static void main(String[] args) {
        
        StatsApi apiInstance = new StatsApi();
        try {
            array[Alert] result = apiInstance.getAlertsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatsApi#getAlertsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StatsApi;

public class StatsApiExample {

    public static void main(String[] args) {
        StatsApi apiInstance = new StatsApi();
        try {
            array[Alert] result = apiInstance.getAlertsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatsApi#getAlertsGet");
            e.printStackTrace();
        }
    }
}

StatsApi *apiInstance = [[StatsApi alloc] init];

// Get alerts from the connected clusters
[apiInstance getAlertsGetWithCompletionHandler: 
              ^(array[Alert] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.StatsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAlertsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAlertsGetExample
    {
        public void main()
        {

            var apiInstance = new StatsApi();

            try
            {
                // Get alerts from the connected clusters
                array[Alert] result = apiInstance.getAlertsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.getAlertsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStatsApi();

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

my $api_instance = WWW::SwaggerClient::StatsApi->new();

eval { 
    my $result = $api_instance->getAlertsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StatsApi->getAlertsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StatsApi()

try: 
    # Get alerts from the connected clusters
    api_response = api_instance.get_alerts_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatsApi->getAlertsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available alerts

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

getStatsGet

Get stats from the connected clusters

A successful response will return a list of stats aggregated from the connected clusters.


/get_stats

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/get_stats"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StatsApi;

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

public class StatsApiExample {

    public static void main(String[] args) {
        
        StatsApi apiInstance = new StatsApi();
        try {
            array[Stat] result = apiInstance.getStatsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatsApi#getStatsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StatsApi;

public class StatsApiExample {

    public static void main(String[] args) {
        StatsApi apiInstance = new StatsApi();
        try {
            array[Stat] result = apiInstance.getStatsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatsApi#getStatsGet");
            e.printStackTrace();
        }
    }
}

StatsApi *apiInstance = [[StatsApi alloc] init];

// Get stats from the connected clusters
[apiInstance getStatsGetWithCompletionHandler: 
              ^(array[Stat] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.StatsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getStatsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getStatsGetExample
    {
        public void main()
        {

            var apiInstance = new StatsApi();

            try
            {
                // Get stats from the connected clusters
                array[Stat] result = apiInstance.getStatsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.getStatsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiStatsApi();

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

my $api_instance = WWW::SwaggerClient::StatsApi->new();

eval { 
    my $result = $api_instance->getStatsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StatsApi->getStatsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StatsApi()

try: 
    # Get stats from the connected clusters
    api_response = api_instance.get_stats_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatsApi->getStatsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available stats

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

SupportSession

clustersClusterIdSupportSessionDelete

Delete a cluster's support session

A successful response will delete the support session of a cluster.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Delete a cluster's support session
[apiInstance clustersClusterIdSupportSessionDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdSupportSessionDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionDeleteExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Delete a cluster's support session
                apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdSupportSessionDelete($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdSupportSessionDelete(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Delete a cluster's support session
    api_instance.clusters_cluster_id_support_session_delete(clusterId)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 204 - The support session deleted successfully.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionGet

Get a cluster's support session

A successful response will return the support session of a cluster.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Get a cluster's support session
[apiInstance clustersClusterIdSupportSessionGetWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSupportSessionGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionGetExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionOptOutDelete

Disable the opt-out of the support session of a cluster.

A successful response will disable the opt-out of the support session of a cluster.


/clusters/{cluster_id}/support_session/opt_out

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session/opt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionOptOutDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionOptOutDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Disable the opt-out of the support session of a cluster.
[apiInstance clustersClusterIdSupportSessionOptOutDeleteWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSupportSessionOptOutDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionOptOutDeleteExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Disable the opt-out of the support session of a cluster.
                SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutDelete(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionOptOutDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionOptOutDelete(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionOptOutDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Disable the opt-out of the support session of a cluster.
    api_response = api_instance.clusters_cluster_id_support_session_opt_out_delete(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionOptOutDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionOptOutPost

Enable the opt-out of the support session of a cluster.

A successful response will enable the opt-out of the support session of a cluster.


/clusters/{cluster_id}/support_session/opt_out

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session/opt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionOptOutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionOptOutPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Enable the opt-out of the support session of a cluster.
[apiInstance clustersClusterIdSupportSessionOptOutPostWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSupportSessionOptOutPost(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionOptOutPostExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Enable the opt-out of the support session of a cluster.
                SupportSession result = apiInstance.clustersClusterIdSupportSessionOptOutPost(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionOptOutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionOptOutPost(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionOptOutPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Enable the opt-out of the support session of a cluster.
    api_response = api_instance.clusters_cluster_id_support_session_opt_out_post(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionOptOutPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionPost

Create a cluster's support session

A successful response will create the support session of a cluster.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Create a cluster's support session
[apiInstance clustersClusterIdSupportSessionPostWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSupportSessionPost(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionPostExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Create a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionPost(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Create a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_post(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionPut

Update a cluster's support session

A successful response will update the support session of a cluster.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

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

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Update a cluster's support session
[apiInstance clustersClusterIdSupportSessionPutWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdSupportSessionPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionPutExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Update a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionPut(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Update a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_put(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Templates

templatesGet

Get templates of instances filtered by the UUID of the VM.

A successful response will a list of instances with the available templates of each one.


/templates

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/templates?vm_uuid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

    public static void main(String[] args) {
        
        TemplatesApi apiInstance = new TemplatesApi();
        String vmUuid = vmUuid_example; // String | The UUID of the VM.
        try {
            array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#templatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String vmUuid = vmUuid_example; // String | The UUID of the VM.
        try {
            array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#templatesGet");
            e.printStackTrace();
        }
    }
}
String *vmUuid = vmUuid_example; // The UUID of the VM.

TemplatesApi *apiInstance = [[TemplatesApi alloc] init];

// Get templates of instances filtered by the UUID of the VM.
[apiInstance templatesGetWith:vmUuid
              completionHandler: ^(array[InstanceTemplates] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.TemplatesApi()
var vmUuid = vmUuid_example; // {{String}} The UUID of the VM.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.templatesGet(vmUuid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class templatesGetExample
    {
        public void main()
        {

            var apiInstance = new TemplatesApi();
            var vmUuid = vmUuid_example;  // String | The UUID of the VM.

            try
            {
                // Get templates of instances filtered by the UUID of the VM.
                array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.templatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTemplatesApi();
$vmUuid = vmUuid_example; // String | The UUID of the VM.

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $vmUuid = vmUuid_example; # String | The UUID of the VM.

eval { 
    my $result = $api_instance->templatesGet(vmUuid => $vmUuid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->templatesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
vmUuid = vmUuid_example # String | The UUID of the VM.

try: 
    # Get templates of instances filtered by the UUID of the VM.
    api_response = api_instance.templates_get(vmUuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->templatesGet: %s\n" % e)

Parameters

Query parameters
Name Description
vm_uuid*
String
The UUID of the VM.
Required

Responses

Status: 200 - A list of instances with the available templates.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Users

usersGet

Get all available users.

A successful response will return a list with all the available users. Action can be performed only by users with `admin` role.


/users

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.usersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.usersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersGet");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get all available users.
[apiInstance usersGetWithCompletionHandler: 
              ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersGetExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();

            try
            {
                // Get all available users.
                array[User] result = apiInstance.usersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    my $result = $api_instance->usersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Get all available users.
    api_response = api_instance.users_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available users.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

usersPost

Create a new SIM2 User.

Create a new SIM2 user. The following validations apply: * Username needs to start from a character (422) * Username needs to have at least 2 characters (422) * Password needs to have at least 6 characters (422) * Company needs to have at least 2 characters (422) * Username and email should not already exist (422) Action can be performed only by users with `admin` role.


/users

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        CreateUserCredentials body = ; // CreateUserCredentials | The credentials for a user creation.
        try {
            User result = apiInstance.usersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        CreateUserCredentials body = ; // CreateUserCredentials | The credentials for a user creation.
        try {
            User result = apiInstance.usersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
CreateUserCredentials *body = ; // The credentials for a user creation. (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Create a new SIM2 User.
[apiInstance usersPostWith:body
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var opts = { 
  'body':  // {{CreateUserCredentials}} The credentials for a user creation.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersPostExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var body = new CreateUserCredentials(); // CreateUserCredentials | The credentials for a user creation. (optional) 

            try
            {
                // Create a new SIM2 User.
                User result = apiInstance.usersPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$body = ; // CreateUserCredentials | The credentials for a user creation.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::CreateUserCredentials->new(); # CreateUserCredentials | The credentials for a user creation.

eval { 
    my $result = $api_instance->usersPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # CreateUserCredentials | The credentials for a user creation. (optional)

try: 
    # Create a new SIM2 User.
    api_response = api_instance.users_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - User successfully created.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

usersUserIdDelete

Delete a user with specific userID.

Delete the user with the provided ID. Action can be performed only by users with `admin` role.


/users/{user_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/users/{user_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.usersUserIdDelete(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.usersUserIdDelete(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdDelete");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.

UsersApi *apiInstance = [[UsersApi alloc] init];

// Delete a user with specific userID.
[apiInstance usersUserIdDeleteWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersUserIdDelete(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersUserIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.

            try
            {
                // Delete a user with specific userID.
                apiInstance.usersUserIdDelete(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.

try {
    $api_instance->usersUserIdDelete($userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersUserIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.

eval { 
    $api_instance->usersUserIdDelete(userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | The user id.

try: 
    # Delete a user with specific userID.
    api_instance.users_user_id_delete(userId)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - User successfully deleted.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

usersUserIdGet

Get user with specific ID.

A successful response will return a user with specific ID. Action can be performed only by users with `admin` role.


/users/{user_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/users/{user_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        try {
            User result = apiInstance.usersUserIdGet(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        try {
            User result = apiInstance.usersUserIdGet(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdGet");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get user with specific ID.
[apiInstance usersUserIdGetWith:userId
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersUserIdGet(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersUserIdGetExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.

            try
            {
                // Get user with specific ID.
                User result = apiInstance.usersUserIdGet(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.

eval { 
    my $result = $api_instance->usersUserIdGet(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | The user id.

try: 
    # Get user with specific ID.
    api_response = api_instance.users_user_id_get(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Details of the user with specific ID.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

usersUserIdPasswordPut

Update the password of the user with specific ID.

Change the User's password with specific ID. The following validations apply: * Username must match the users username (422) * Old password must match the users current password (422) * New Password needs to have at least 6 characters (422) A successful response will change the user's password. Action can be performed only by the user himself.


/users/{user_id}/password

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/users/{user_id}/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditPassword body = ; // EditPassword | The credentials for changing password.
        try {
            apiInstance.usersUserIdPasswordPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPasswordPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditPassword body = ; // EditPassword | The credentials for changing password.
        try {
            apiInstance.usersUserIdPasswordPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPasswordPut");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.
EditPassword *body = ; // The credentials for changing password. (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Update the password of the user with specific ID.
[apiInstance usersUserIdPasswordPutWith:userId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.
var opts = { 
  'body':  // {{EditPassword}} The credentials for changing password.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersUserIdPasswordPut(userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersUserIdPasswordPutExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.
            var body = new EditPassword(); // EditPassword | The credentials for changing password. (optional) 

            try
            {
                // Update the password of the user with specific ID.
                apiInstance.usersUserIdPasswordPut(userId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdPasswordPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.
$body = ; // EditPassword | The credentials for changing password.

try {
    $api_instance->usersUserIdPasswordPut($userId, $body);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersUserIdPasswordPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.
my $body = WWW::SwaggerClient::Object::EditPassword->new(); # EditPassword | The credentials for changing password.

eval { 
    $api_instance->usersUserIdPasswordPut(userId => $userId, body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdPasswordPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | The user id.
body =  # EditPassword | The credentials for changing password. (optional)

try: 
    # Update the password of the user with specific ID.
    api_instance.users_user_id_password_put(userId, body=body)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdPasswordPut: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Password changed successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

usersUserIdPut

Edit the user

Edit the User with specific ID. The following validations apply: * Password needs to have at least 6 characters (422) Action can be performed only by users with `admin` role or by the same user himself.


/users/{user_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/users/{user_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditUser body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.

        try {
            apiInstance.usersUserIdPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditUser body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.

        try {
            apiInstance.usersUserIdPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPut");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.
EditUser *body = ; // The user details to update. Providing a blank old_password
does not update the password.
 (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Edit the user
[apiInstance usersUserIdPutWith:userId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.
var opts = { 
  'body':  // {{EditUser}} The user details to update. Providing a blank old_password
does not update the password.

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersUserIdPut(userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersUserIdPutExample
    {
        public void main()
        {

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.
            var body = new EditUser(); // EditUser | The user details to update. Providing a blank old_password
does not update the password.
 (optional) 

            try
            {
                // Edit the user
                apiInstance.usersUserIdPut(userId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.
$body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.


try {
    $api_instance->usersUserIdPut($userId, $body);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersUserIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.
my $body = WWW::SwaggerClient::Object::EditUser->new(); # EditUser | The user details to update. Providing a blank old_password
does not update the password.


eval { 
    $api_instance->usersUserIdPut(userId => $userId, body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = 789 # Long | The user id.
body =  # EditUser | The user details to update. Providing a blank old_password
does not update the password.
 (optional)

try: 
    # Edit the user
    api_instance.users_user_id_put(userId, body=body)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - User Edited successfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Vdisks

clustersClusterIdVdisksGet

Get the list the cluster's vdisks


/clusters/{cluster_id}/vdisks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get the list the cluster's vdisks
[apiInstance clustersClusterIdVdisksGetWith:clusterId
              completionHandler: ^(array[VDisks] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksGetExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get the list the cluster's vdisks
                array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get the list the cluster's vdisks
    api_response = api_instance.clusters_cluster_id_vdisks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - List of vdisks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdDelete

Delete a vdisk from a cluster.

The endpoint deletes a vdisk. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Delete a vdisk from a cluster.
[apiInstance clustersClusterIdVdisksVdiskIdDeleteWith:clusterId
    vdiskId:vdiskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.

            try
            {
                // Delete a vdisk from a cluster.
                apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.

try {
    $api_instance->clustersClusterIdVdisksVdiskIdDelete($clusterId, $vdiskId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.

eval { 
    $api_instance->clustersClusterIdVdisksVdiskIdDelete(clusterId => $clusterId, vdiskId => $vdiskId);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.

try: 
    # Delete a vdisk from a cluster.
    api_instance.clusters_cluster_id_vdisks_vdisk_id_delete(clusterId, vdiskId)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required

Responses

Status: 204 - Vdisk deleted successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdGet

Get a vdisk of a cluster.

The endpoint gets the vdisk based on the ID and the cluster ID.


/clusters/{cluster_id}/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get a vdisk of a cluster.
[apiInstance clustersClusterIdVdisksVdiskIdGetWith:clusterId
    vdiskId:vdiskId
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdGetExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.

            try
            {
                // Get a vdisk of a cluster.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdGet($clusterId, $vdiskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdGet(clusterId => $clusterId, vdiskId => $vdiskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.

try: 
    # Get a vdisk of a cluster.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_get(clusterId, vdiskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required

Responses

Status: 200 - VDisk retrieved successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut

Edit a vdisk's name.

The endpoint edits a vdisk's name. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/rename/{new_vdisk_name}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/rename/{new_vdisk_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        String newVdiskName = newVdiskName_example; // String | The vdisk name.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        String newVdiskName = newVdiskName_example; // String | The vdisk name.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
String *newVdiskName = newVdiskName_example; // The vdisk name.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Edit a vdisk's name.
[apiInstance clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePutWith:clusterId
    vdiskId:vdiskId
    newVdiskName:newVdiskName
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var newVdiskName = newVdiskName_example; // {{String}} The vdisk name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePutExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var newVdiskName = newVdiskName_example;  // String | The vdisk name.

            try
            {
                // Edit a vdisk's name.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$newVdiskName = newVdiskName_example; // String | The vdisk name.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut($clusterId, $vdiskId, $newVdiskName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $newVdiskName = newVdiskName_example; # String | The vdisk name.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId => $clusterId, vdiskId => $vdiskId, newVdiskName => $newVdiskName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
newVdiskName = newVdiskName_example # String | The vdisk name.

try: 
    # Edit a vdisk's name.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_rename_new_vdisk_name_put(clusterId, vdiskId, newVdiskName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
new_vdisk_name*
String
The vdisk name.
Required

Responses

Status: 200 - VDisk name updated successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut

Create a snapshot of a vdisk to the specified datastore.

The endpoint creates a snapshot on a datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/snapcreate/datastore/{datastore_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/snapcreate/datastore/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
Long *datastoreId = 789; // The datastore id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a snapshot of a vdisk to the specified datastore.
[apiInstance clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPutWith:clusterId
    vdiskId:vdiskId
    datastoreId:datastoreId
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Create a snapshot of a vdisk to the specified datastore.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut($clusterId, $vdiskId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId => $clusterId, vdiskId => $vdiskId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Create a snapshot of a vdisk to the specified datastore.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_snapcreate_datastore_datastore_id_put(clusterId, vdiskId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 202 - The VDisk snapshot initiated successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdTemplatenewPost

Create a template from a vdisk.

The endpoint creates a new template from a vdisk. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/templatenew

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/templatenew"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

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

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        NewVDiskTemplate body = ; // NewVDiskTemplate | The template details to create.
        try {
            VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPost(clusterId, vdiskId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdTemplatenewPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        NewVDiskTemplate body = ; // NewVDiskTemplate | The template details to create.
        try {
            VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPost(clusterId, vdiskId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdTemplatenewPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
NewVDiskTemplate *body = ; // The template details to create. (optional)

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a template from a vdisk.
[apiInstance clustersClusterIdVdisksVdiskIdTemplatenewPostWith:clusterId
    vdiskId:vdiskId
    body:body
              completionHandler: ^(VDiskTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var opts = { 
  'body':  // {{NewVDiskTemplate}} The template details to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdTemplatenewPost(clusterIdvdiskId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdTemplatenewPostExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var body = new NewVDiskTemplate(); // NewVDiskTemplate | The template details to create. (optional) 

            try
            {
                // Create a template from a vdisk.
                VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPost(clusterId, vdiskId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdTemplatenewPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$body = ; // NewVDiskTemplate | The template details to create.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdTemplatenewPost($clusterId, $vdiskId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $body = WWW::SwaggerClient::Object::NewVDiskTemplate->new(); # NewVDiskTemplate | The template details to create.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdTemplatenewPost(clusterId => $clusterId, vdiskId => $vdiskId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
body =  # NewVDiskTemplate | The template details to create. (optional)

try: 
    # Create a template from a vdisk.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_templatenew_post(clusterId, vdiskId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - VDisk template creation started successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

WhiteLabel

whiteLabelGet

Get all available white labels.

Get all available white labels. All db entries have a unique name.


/white_label

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/white_label"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WhiteLabelApi;

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

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        try {
            array[WhiteLabel] result = apiInstance.whiteLabelGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WhiteLabelApi;

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        try {
            array[WhiteLabel] result = apiInstance.whiteLabelGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelGet");
            e.printStackTrace();
        }
    }
}

WhiteLabelApi *apiInstance = [[WhiteLabelApi alloc] init];

// Get all available white labels.
[apiInstance whiteLabelGetWithCompletionHandler: 
              ^(array[WhiteLabel] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.WhiteLabelApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.whiteLabelGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class whiteLabelGetExample
    {
        public void main()
        {

            var apiInstance = new WhiteLabelApi();

            try
            {
                // Get all available white labels.
                array[WhiteLabel] result = apiInstance.whiteLabelGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WhiteLabelApi.whiteLabelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWhiteLabelApi();

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

my $api_instance = WWW::SwaggerClient::WhiteLabelApi->new();

eval { 
    my $result = $api_instance->whiteLabelGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WhiteLabelApi->whiteLabelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WhiteLabelApi()

try: 
    # Get all available white labels.
    api_response = api_instance.white_label_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WhiteLabelApi->whiteLabelGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of white labels.

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

whiteLabelPost

Upload an image

Upload an image. Only admin has the permission to end this request. In case where new image has the same name with a db entry, it will be updated. No new entry will be created.


/white_label

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/white_label"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WhiteLabelApi;

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

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        NewWhiteLabel body = ; // NewWhiteLabel | The new white label
        try {
            WhiteLabel result = apiInstance.whiteLabelPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WhiteLabelApi;

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        NewWhiteLabel body = ; // NewWhiteLabel | The new white label
        try {
            WhiteLabel result = apiInstance.whiteLabelPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelPost");
            e.printStackTrace();
        }
    }
}
NewWhiteLabel *body = ; // The new white label (optional)

WhiteLabelApi *apiInstance = [[WhiteLabelApi alloc] init];

// Upload an image
[apiInstance whiteLabelPostWith:body
              completionHandler: ^(WhiteLabel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.WhiteLabelApi()
var opts = { 
  'body':  // {{NewWhiteLabel}} The new white label
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.whiteLabelPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class whiteLabelPostExample
    {
        public void main()
        {

            var apiInstance = new WhiteLabelApi();
            var body = new NewWhiteLabel(); // NewWhiteLabel | The new white label (optional) 

            try
            {
                // Upload an image
                WhiteLabel result = apiInstance.whiteLabelPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WhiteLabelApi.whiteLabelPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWhiteLabelApi();
$body = ; // NewWhiteLabel | The new white label

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

my $api_instance = WWW::SwaggerClient::WhiteLabelApi->new();
my $body = WWW::SwaggerClient::Object::NewWhiteLabel->new(); # NewWhiteLabel | The new white label

eval { 
    my $result = $api_instance->whiteLabelPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WhiteLabelApi->whiteLabelPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WhiteLabelApi()
body =  # NewWhiteLabel | The new white label (optional)

try: 
    # Upload an image
    api_response = api_instance.white_label_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WhiteLabelApi->whiteLabelPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Request accepted. Image will be updated in DB.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

whiteLabelWhiteLabelNameDelete

Delete a white label from DB.

Hard delete of a white label from DB.


/white_label/{white_label_name}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/white_label/{white_label_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WhiteLabelApi;

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

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        Long whiteLabelName = 789; // Long | The white label name.
        try {
            apiInstance.whiteLabelWhiteLabelNameDelete(whiteLabelName);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelWhiteLabelNameDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WhiteLabelApi;

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        Long whiteLabelName = 789; // Long | The white label name.
        try {
            apiInstance.whiteLabelWhiteLabelNameDelete(whiteLabelName);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelWhiteLabelNameDelete");
            e.printStackTrace();
        }
    }
}
Long *whiteLabelName = 789; // The white label name.

WhiteLabelApi *apiInstance = [[WhiteLabelApi alloc] init];

// Delete a white label from DB.
[apiInstance whiteLabelWhiteLabelNameDeleteWith:whiteLabelName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.WhiteLabelApi()
var whiteLabelName = 789; // {{Long}} The white label name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.whiteLabelWhiteLabelNameDelete(whiteLabelName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class whiteLabelWhiteLabelNameDeleteExample
    {
        public void main()
        {

            var apiInstance = new WhiteLabelApi();
            var whiteLabelName = 789;  // Long | The white label name.

            try
            {
                // Delete a white label from DB.
                apiInstance.whiteLabelWhiteLabelNameDelete(whiteLabelName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WhiteLabelApi.whiteLabelWhiteLabelNameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWhiteLabelApi();
$whiteLabelName = 789; // Long | The white label name.

try {
    $api_instance->whiteLabelWhiteLabelNameDelete($whiteLabelName);
} catch (Exception $e) {
    echo 'Exception when calling WhiteLabelApi->whiteLabelWhiteLabelNameDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WhiteLabelApi;

my $api_instance = WWW::SwaggerClient::WhiteLabelApi->new();
my $whiteLabelName = 789; # Long | The white label name.

eval { 
    $api_instance->whiteLabelWhiteLabelNameDelete(whiteLabelName => $whiteLabelName);
};
if ($@) {
    warn "Exception when calling WhiteLabelApi->whiteLabelWhiteLabelNameDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WhiteLabelApi()
whiteLabelName = 789 # Long | The white label name.

try: 
    # Delete a white label from DB.
    api_instance.white_label_white_label_name_delete(whiteLabelName)
except ApiException as e:
    print("Exception when calling WhiteLabelApi->whiteLabelWhiteLabelNameDelete: %s\n" % e)

Parameters

Path parameters
Name Description
white_label_name*
Long (int64)
The white label name.
Required

Responses

Status: 204 - Request accepted. White label will be removed.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

whiteLabelWhiteLabelNameGet

Get white label with specific Name.

A successful response will return a white label with specific Name. Action can be performed by any users. Not only user with `admin` role.


/white_label/{white_label_name}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"/api/white_label/{white_label_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WhiteLabelApi;

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

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        Long whiteLabelName = 789; // Long | The white label name.
        try {
            array[WhiteLabel] result = apiInstance.whiteLabelWhiteLabelNameGet(whiteLabelName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelWhiteLabelNameGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WhiteLabelApi;

public class WhiteLabelApiExample {

    public static void main(String[] args) {
        WhiteLabelApi apiInstance = new WhiteLabelApi();
        Long whiteLabelName = 789; // Long | The white label name.
        try {
            array[WhiteLabel] result = apiInstance.whiteLabelWhiteLabelNameGet(whiteLabelName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WhiteLabelApi#whiteLabelWhiteLabelNameGet");
            e.printStackTrace();
        }
    }
}
Long *whiteLabelName = 789; // The white label name.

WhiteLabelApi *apiInstance = [[WhiteLabelApi alloc] init];

// Get white label with specific Name.
[apiInstance whiteLabelWhiteLabelNameGetWith:whiteLabelName
              completionHandler: ^(array[WhiteLabel] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.WhiteLabelApi()
var whiteLabelName = 789; // {{Long}} The white label name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.whiteLabelWhiteLabelNameGet(whiteLabelName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class whiteLabelWhiteLabelNameGetExample
    {
        public void main()
        {

            var apiInstance = new WhiteLabelApi();
            var whiteLabelName = 789;  // Long | The white label name.

            try
            {
                // Get white label with specific Name.
                array[WhiteLabel] result = apiInstance.whiteLabelWhiteLabelNameGet(whiteLabelName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WhiteLabelApi.whiteLabelWhiteLabelNameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiWhiteLabelApi();
$whiteLabelName = 789; // Long | The white label name.

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

my $api_instance = WWW::SwaggerClient::WhiteLabelApi->new();
my $whiteLabelName = 789; # Long | The white label name.

eval { 
    my $result = $api_instance->whiteLabelWhiteLabelNameGet(whiteLabelName => $whiteLabelName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WhiteLabelApi->whiteLabelWhiteLabelNameGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.WhiteLabelApi()
whiteLabelName = 789 # Long | The white label name.

try: 
    # Get white label with specific Name.
    api_response = api_instance.white_label_white_label_name_get(whiteLabelName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WhiteLabelApi->whiteLabelWhiteLabelNameGet: %s\n" % e)

Parameters

Path parameters
Name Description
white_label_name*
Long (int64)
The white label name.
Required

Responses

Status: 200 - A successful response will return a white label with specific ID.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}