SIM2 API

AvailabilityZones

availabilityZonesGet

Get a list the supported availability zones.

A successful response will return a list with the supported availability zones. Zoned 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 ([email protected]) {
    warn "Exception when calling AvailabilityZonesApi->availabilityZonesGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

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 provider 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 of 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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdDelete: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersCreatePost: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersHostInfoGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

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 ([email protected]) {
    warn "Exception when calling ClustersApi->clustersPost: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

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"
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 resourceGroupId = 789; // Long | The resource group id.
        try {
            array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#resourceGroupsResourceGroupIdPublicIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

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

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

// Get a the allocated public IPs of a resource group.
[apiInstance resourceGroupsResourceGroupIdPublicIpsGetWith:resourceGroupId
              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 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.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, 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 ClustersApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get a the allocated public IPs of a resource group.
                array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.resourceGroupsResourceGroupIdPublicIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ([email protected]) {
    warn "Exception when calling ClustersApi->resourceGroupsResourceGroupIdPublicIpsGet: [email protected]\n";
}
from __future__ import print_statement
import time
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()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get a the allocated public IPs of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_public_ips_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->resourceGroupsResourceGroupIdPublicIpsGet: %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 allocated public IPs.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

DbBackup

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.DbBackupApi;

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

public class DbBackupApiExample {

    public static void main(String[] args) {
        
        DbBackupApi apiInstance = new DbBackupApi();
        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 DbBackupApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupApi;

public class DbBackupApiExample {

    public static void main(String[] args) {
        DbBackupApi apiInstance = new DbBackupApi();
        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 DbBackupApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
String *backupName = backupName_example; // The backup's name.

DbBackupApi *apiInstance = [[DbBackupApi 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.DbBackupApi()
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 DbBackupApi();
            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 DbBackupApi.dbBackupsBackupNamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDbBackupApi();
$backupName = backupName_example; // String | The backup's name.

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

my $api_instance = WWW::SwaggerClient::DbBackupApi->new();
my $backupName = backupName_example; # String | The backup's name.

eval { 
    my $result = $api_instance->dbBackupsBackupNamePut(backupName => $backupName);
    print Dumper($result);
};
if ([email protected]) {
    warn "Exception when calling DbBackupApi->dbBackupsBackupNamePut: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DbBackupApi()
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 DbBackupApi->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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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.DbBackupApi;

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

public class DbBackupApiExample {

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

public class DbBackupApiExample {

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

DbBackupApi *apiInstance = [[DbBackupApi 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.DbBackupApi()
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 DbBackupApi();

            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 DbBackupApi.dbBackupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->dbBackupsGet();
    print Dumper($result);
};
if ([email protected]) {
    warn "Exception when calling DbBackupApi->dbBackupsGet: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

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 DbBackupApi->dbBackupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available SIM's DB backups

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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.DbBackupApi;

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

public class DbBackupApiExample {

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

public class DbBackupApiExample {

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

DbBackupApi *apiInstance = [[DbBackupApi 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.DbBackupApi()
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 DbBackupApi();

            try
            {
                // Create a new backup of the SIM DB
                apiInstance.dbBackupsPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupApi.dbBackupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->dbBackupsPost();
};
if ([email protected]) {
    warn "Exception when calling DbBackupApi->dbBackupsPost: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

try: 
    # Create a new backup of the SIM DB
    api_instance.db_backups_post()
except ApiException as e:
    print("Exception when calling DbBackupApi->dbBackupsPost: %s\n" % e)

Parameters

Responses

Status: 200 - Backup created successfully

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

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."}

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 ([email protected]) {
    warn "Exception when calling DomainApi->domainDelete: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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 ([email protected]) {
    warn "Exception when calling DomainApi->domainPost: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 500 - An unexpected error occurred.

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

InstanceTypes

instanceTypesProviderGet

Get a list of the supported instance types of the provider.

A successful response will return a list of the supported instance types of the provider. Provider could be "aws" or "sunlight" and currently only "aws" has supported instance types.


/instance_types/{provider}

Usage and SDK Samples

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

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

public class InstanceTypesApiExample {

    public static void main(String[] args) {
        
        InstanceTypesApi apiInstance = new InstanceTypesApi();
        String provider = provider_example; // String | The cluster's provider.
        try {
            array['String'] result = apiInstance.instanceTypesProviderGet(provider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceTypesApi#instanceTypesProviderGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceTypesApi;

public class InstanceTypesApiExample {

    public static void main(String[] args) {
        InstanceTypesApi apiInstance = new InstanceTypesApi();
        String provider = provider_example; // String | The cluster's provider.
        try {
            array['String'] result = apiInstance.instanceTypesProviderGet(provider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceTypesApi#instanceTypesProviderGet");
            e.printStackTrace();
        }
    }
}
String *provider = provider_example; // The cluster's provider.

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

// Get a list of the supported instance types of the provider.
[apiInstance instanceTypesProviderGetWith:provider
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstanceTypesApi()
var provider = provider_example; // {{String}} The cluster's provider.

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

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

            var apiInstance = new InstanceTypesApi();
            var provider = provider_example;  // String | The cluster's provider.

            try
            {
                // Get a list of the supported instance types of the provider.
                array['String'] result = apiInstance.instanceTypesProviderGet(provider);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceTypesApi.instanceTypesProviderGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstanceTypesApi();
$provider = provider_example; // String | The cluster's provider.

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

my $api_instance = WWW::SwaggerClient::InstanceTypesApi->new();
my $provider = provider_example; # String | The cluster's provider.

eval { 
    my $result = $api_instance->instanceTypesProviderGet(provider => $provider);
    print Dumper($result);
};
if ([email protected]) {
    warn "Exception when calling InstanceTypesApi->instanceTypesProviderGet: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstanceTypesApi()
provider = provider_example # String | The cluster's provider.

try: 
    # Get a list of the supported instance types of the provider.
    api_response = api_instance.instance_types_provider_get(provider)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceTypesApi->instanceTypesProviderGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider*
String
The cluster's provider.
Required

Responses

Status: 201 - list of the instance types

Status: 401 - Status unauthorized.

{"code":401}

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 ([email protected]) {
    warn "Exception when calling LoginApi->loginPost: [email protected]\n";
}
from __future__ import print_statement
import time
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."},{"field":"units","message":"Units cannot be negative."}]}

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 ([email protected]) {
    warn "Exception when calling LoginApi->logoutPost: [email protected]\n";
}
from __future__ import print_statement
import time
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 ([email protected]) {
    warn "Exception when calling MaintenanceApi->maintenanceDelete: [email protected]\n";
}
from __future__ import print_statement
import time
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}

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 ([email protected]) {
    warn "Exception when calling MaintenanceApi->maintenancePut: [email protected]\n";
}
from __future__ import print_statement
import time
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}

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."}

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 ([email protected]) {
    warn "Exception when calling PermissionsApi->permissionsGet: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

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 ([email protected]) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdGet: [email protected]\n";
}
from __future__ import print_statement
import time
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 pf resource group

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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 ([email protected]) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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 ([email protected]) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: [email protected]\n";
}
from __future__ import print_statement
import time
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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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"}

Recipes

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 ([email protected]) {
    warn "Exception when calling RecipesApi->recipesInstalledGet: [email protected]\n";
}
from __future__ import print_statement
import time
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.

Status: 401 - Status unauthorized.

{"code":401}

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 ([email protected]) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: [email protected]\n";
}
from __future__ import print_statement
import time
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: 204 - Recipe template instance has been successfully deleted.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.