Sunlight-dashboard

Alerts

alertsAlertIdDelete

Delete an alert.


/alerts/{alert_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/alerts/{alert_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Integer alertId = 56; // Integer | The alert id.
        try {
            apiInstance.alertsAlertIdDelete(alertId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsAlertIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Integer alertId = 56; // Integer | The alert id.
        try {
            apiInstance.alertsAlertIdDelete(alertId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsAlertIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *alertId = 56; // The alert id.

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

// Delete an alert.
[apiInstance alertsAlertIdDeleteWith:alertId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var alertId = 56; // {Integer} The alert id.


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

namespace Example
{
    public class alertsAlertIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var alertId = 56;  // Integer | The alert id.

            try
            {
                // Delete an alert.
                apiInstance.alertsAlertIdDelete(alertId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsAlertIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$alertId = 56; // Integer | The alert id.

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

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $alertId = 56; # Integer | The alert id.

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

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
alertId = 56 # Integer | The alert id.

try: 
    # Delete an alert.
    api_instance.alerts_alert_id_delete(alertId)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsAlertIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
alert_id*
Integer (uint)
The alert id.
Required

Responses

Status: 204 - Alert deleted succesfully.

Status: 406 - Alert's id is not number.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

alertsAlertIdPut

Hide alert for the user.


/alerts/{alert_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/alerts/{alert_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Integer alertId = 56; // Integer | The alert id.
        try {
            apiInstance.alertsAlertIdPut(alertId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsAlertIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Integer alertId = 56; // Integer | The alert id.
        try {
            apiInstance.alertsAlertIdPut(alertId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsAlertIdPut");
            e.printStackTrace();
        }
    }
}
Integer *alertId = 56; // The alert id.

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

// Hide alert for the user.
[apiInstance alertsAlertIdPutWith:alertId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var alertId = 56; // {Integer} The alert id.


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

namespace Example
{
    public class alertsAlertIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var alertId = 56;  // Integer | The alert id.

            try
            {
                // Hide alert for the user.
                apiInstance.alertsAlertIdPut(alertId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsAlertIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$alertId = 56; // Integer | The alert id.

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

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $alertId = 56; # Integer | The alert id.

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

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
alertId = 56 # Integer | The alert id.

try: 
    # Hide alert for the user.
    api_instance.alerts_alert_id_put(alertId)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsAlertIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
alert_id*
Integer (uint)
The alert id.
Required

Responses

Status: 204 - Alert was hidden ssuccesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

alertsDelete

Delete list of alerts

Delete list of alerts The following scenarios will result in a *failed* response: * The 'all' is false and 'ids' is empty (422) * The 'all' is true and 'ids' is not empty (422)


/alerts

Usage and SDK Samples

curl -X DELETE "http://localhost/api/alerts?all=&ids="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Boolean all = true; // Boolean | Delete all alerts.
        String ids = ids_example; // String | Delete specific alerts based on a list of IDs seperated by comma.

        try {
            apiInstance.alertsDelete(all, ids);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Boolean all = true; // Boolean | Delete all alerts.
        String ids = ids_example; // String | Delete specific alerts based on a list of IDs seperated by comma.

        try {
            apiInstance.alertsDelete(all, ids);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsDelete");
            e.printStackTrace();
        }
    }
}
Boolean *all = true; // Delete all alerts. (optional)
String *ids = ids_example; // Delete specific alerts based on a list of IDs seperated by comma.
 (optional)

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

// Delete list of alerts
[apiInstance alertsDeleteWith:all
    ids:ids
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var opts = { 
  'all': true, // {Boolean} Delete all alerts.
  'ids': ids_example // {String} Delete specific alerts based on a list of IDs seperated by comma.

};

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

namespace Example
{
    public class alertsDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var all = true;  // Boolean | Delete all alerts. (optional) 
            var ids = ids_example;  // String | Delete specific alerts based on a list of IDs seperated by comma.
 (optional) 

            try
            {
                // Delete list of alerts
                apiInstance.alertsDelete(all, ids);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$all = true; // Boolean | Delete all alerts.
$ids = ids_example; // String | Delete specific alerts based on a list of IDs seperated by comma.


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

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $all = true; # Boolean | Delete all alerts.
my $ids = ids_example; # String | Delete specific alerts based on a list of IDs seperated by comma.


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

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
all = true # Boolean | Delete all alerts. (optional)
ids = ids_example # String | Delete specific alerts based on a list of IDs seperated by comma.
 (optional)

try: 
    # Delete list of alerts
    api_instance.alerts_delete(all=all, ids=ids)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsDelete: %s\n" % e)

Parameters

Query parameters
Name Description
all
Boolean
Delete all alerts.
ids
String
Delete specific alerts based on a list of IDs seperated by comma.

Responses

Status: 204 - Alerts deleted succesfully.

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 occured.

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

alertsGet

Get all alerts

A succesful response will return all alerts that the system accumulated.


/alerts

Usage and SDK Samples

curl -X GET "http://localhost/api/alerts?hide=&unviewed=&level=&object_type=&page=&per_page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Boolean hide = true; // Boolean | Show hidden alerts.
        Boolean unviewed = true; // Boolean | Show only unviewed alerts.
        String level = level_example; // String | Show alerts from a specific level.
        String objectType = objectType_example; // String | Show alerts from a specific object type.
        BigDecimal page = 8.14; // BigDecimal | the number of page
        BigDecimal perPage = 8.14; // BigDecimal | The number of alerts in each page.
        try {
            array[Alert] result = apiInstance.alertsGet(hide, unviewed, level, objectType, page, perPage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Boolean hide = true; // Boolean | Show hidden alerts.
        Boolean unviewed = true; // Boolean | Show only unviewed alerts.
        String level = level_example; // String | Show alerts from a specific level.
        String objectType = objectType_example; // String | Show alerts from a specific object type.
        BigDecimal page = 8.14; // BigDecimal | the number of page
        BigDecimal perPage = 8.14; // BigDecimal | The number of alerts in each page.
        try {
            array[Alert] result = apiInstance.alertsGet(hide, unviewed, level, objectType, page, perPage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsGet");
            e.printStackTrace();
        }
    }
}
Boolean *hide = true; // Show hidden alerts. (optional)
Boolean *unviewed = true; // Show only unviewed alerts. (optional)
String *level = level_example; // Show alerts from a specific level. (optional)
String *objectType = objectType_example; // Show alerts from a specific object type. (optional)
BigDecimal *page = 8.14; // the number of page (optional)
BigDecimal *perPage = 8.14; // The number of alerts in each page. (optional)

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

// Get all alerts
[apiInstance alertsGetWith:hide
    unviewed:unviewed
    level:level
    objectType:objectType
    page:page
    perPage:perPage
              completionHandler: ^(array[Alert] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var opts = { 
  'hide': true, // {Boolean} Show hidden alerts.
  'unviewed': true, // {Boolean} Show only unviewed alerts.
  'level': level_example, // {String} Show alerts from a specific level.
  'objectType': objectType_example, // {String} Show alerts from a specific object type.
  'page': 8.14, // {BigDecimal} the number of page
  'perPage': 8.14 // {BigDecimal} The number of alerts in each page.
};

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

namespace Example
{
    public class alertsGetExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var hide = true;  // Boolean | Show hidden alerts. (optional) 
            var unviewed = true;  // Boolean | Show only unviewed alerts. (optional) 
            var level = level_example;  // String | Show alerts from a specific level. (optional) 
            var objectType = objectType_example;  // String | Show alerts from a specific object type. (optional) 
            var page = 8.14;  // BigDecimal | the number of page (optional) 
            var perPage = 8.14;  // BigDecimal | The number of alerts in each page. (optional) 

            try
            {
                // Get all alerts
                array[Alert] result = apiInstance.alertsGet(hide, unviewed, level, objectType, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$hide = true; // Boolean | Show hidden alerts.
$unviewed = true; // Boolean | Show only unviewed alerts.
$level = level_example; // String | Show alerts from a specific level.
$objectType = objectType_example; // String | Show alerts from a specific object type.
$page = 8.14; // BigDecimal | the number of page
$perPage = 8.14; // BigDecimal | The number of alerts in each page.

try {
    $result = $api_instance->alertsGet($hide, $unviewed, $level, $objectType, $page, $perPage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlertsApi->alertsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AlertsApi;

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $hide = true; # Boolean | Show hidden alerts.
my $unviewed = true; # Boolean | Show only unviewed alerts.
my $level = level_example; # String | Show alerts from a specific level.
my $objectType = objectType_example; # String | Show alerts from a specific object type.
my $page = 8.14; # BigDecimal | the number of page
my $perPage = 8.14; # BigDecimal | The number of alerts in each page.

eval { 
    my $result = $api_instance->alertsGet(hide => $hide, unviewed => $unviewed, level => $level, objectType => $objectType, page => $page, perPage => $perPage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AlertsApi->alertsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
hide = true # Boolean | Show hidden alerts. (optional)
unviewed = true # Boolean | Show only unviewed alerts. (optional)
level = level_example # String | Show alerts from a specific level. (optional)
objectType = objectType_example # String | Show alerts from a specific object type. (optional)
page = 8.14 # BigDecimal | the number of page (optional)
perPage = 8.14 # BigDecimal | The number of alerts in each page. (optional)

try: 
    # Get all alerts
    api_response = api_instance.alerts_get(hide=hide, unviewed=unviewed, level=level, objectType=objectType, page=page, perPage=perPage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsGet: %s\n" % e)

Parameters

Query parameters
Name Description
hide
Boolean
Show hidden alerts.
unviewed
Boolean
Show only unviewed alerts.
level
String
Show alerts from a specific level.
object_type
String
Show alerts from a specific object type.
page
BigDecimal
the number of page
per_page
BigDecimal
The number of alerts in each page.

Responses

Status: 200 - A list of alerts


alertsPost

Create an alert.


/alerts

Usage and SDK Samples

curl -X POST "http://localhost/api/alerts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Alert alert = ; // Alert | The alert to create.
        try {
            apiInstance.alertsPost(alert);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Alert alert = ; // Alert | The alert to create.
        try {
            apiInstance.alertsPost(alert);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsPost");
            e.printStackTrace();
        }
    }
}
Alert *alert = ; // The alert to create. (optional)

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

// Create an alert.
[apiInstance alertsPostWith:alert
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var opts = { 
  'alert':  // {Alert} The alert to create.
};

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

namespace Example
{
    public class alertsPostExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var alert = new Alert(); // Alert | The alert to create. (optional) 

            try
            {
                // Create an alert.
                apiInstance.alertsPost(alert);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$alert = ; // Alert | The alert to create.

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

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $alert = WWW::SwaggerClient::Object::Alert->new(); # Alert | The alert to create.

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

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
alert =  # Alert | The alert to create. (optional)

try: 
    # Create an alert.
    api_instance.alerts_post(alert=alert)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsPost: %s\n" % e)

Parameters

Body parameters
Name Description
alert

Responses

Status: 202 - The alert is created.

Status: 500 - An unexpected error occured.

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

alertsPut

Hide list of alerts

Hide list of alerts The following scenarios will result in a *failed* response: * The 'all' is false and 'ids' is empty (422) * The 'all' is true and 'ids' is not empty (422)


/alerts

Usage and SDK Samples

curl -X PUT "http://localhost/api/alerts?all=&ids="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AlertsApi;

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

public class AlertsApiExample {

    public static void main(String[] args) {
        
        AlertsApi apiInstance = new AlertsApi();
        Boolean all = true; // Boolean | Hide all alerts.
        String ids = ids_example; // String | Hide specific alerts based on a list of IDs seperated by comma.

        try {
            apiInstance.alertsPut(all, ids);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AlertsApi;

public class AlertsApiExample {

    public static void main(String[] args) {
        AlertsApi apiInstance = new AlertsApi();
        Boolean all = true; // Boolean | Hide all alerts.
        String ids = ids_example; // String | Hide specific alerts based on a list of IDs seperated by comma.

        try {
            apiInstance.alertsPut(all, ids);
        } catch (ApiException e) {
            System.err.println("Exception when calling AlertsApi#alertsPut");
            e.printStackTrace();
        }
    }
}
Boolean *all = true; // Hide all alerts. (optional)
String *ids = ids_example; // Hide specific alerts based on a list of IDs seperated by comma.
 (optional)

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

// Hide list of alerts
[apiInstance alertsPutWith:all
    ids:ids
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.AlertsApi()

var opts = { 
  'all': true, // {Boolean} Hide all alerts.
  'ids': ids_example // {String} Hide specific alerts based on a list of IDs seperated by comma.

};

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

namespace Example
{
    public class alertsPutExample
    {
        public void main()
        {
            
            var apiInstance = new AlertsApi();
            var all = true;  // Boolean | Hide all alerts. (optional) 
            var ids = ids_example;  // String | Hide specific alerts based on a list of IDs seperated by comma.
 (optional) 

            try
            {
                // Hide list of alerts
                apiInstance.alertsPut(all, ids);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AlertsApi.alertsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AlertsApi();
$all = true; // Boolean | Hide all alerts.
$ids = ids_example; // String | Hide specific alerts based on a list of IDs seperated by comma.


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

my $api_instance = WWW::SwaggerClient::AlertsApi->new();
my $all = true; # Boolean | Hide all alerts.
my $ids = ids_example; # String | Hide specific alerts based on a list of IDs seperated by comma.


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

# create an instance of the API class
api_instance = swagger_client.AlertsApi()
all = true # Boolean | Hide all alerts. (optional)
ids = ids_example # String | Hide specific alerts based on a list of IDs seperated by comma.
 (optional)

try: 
    # Hide list of alerts
    api_instance.alerts_put(all=all, ids=ids)
except ApiException as e:
    print("Exception when calling AlertsApi->alertsPut: %s\n" % e)

Parameters

Query parameters
Name Description
all
Boolean
Hide all alerts.
ids
String
Hide specific alerts based on a list of IDs seperated by comma.

Responses

Status: 204 - Alerts hided succesfully.

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 occured.

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

Blades

bladesBladeIdDelete

Delete a blade.


/blades/{blade_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/blades/{blade_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BladesApi;

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

public class BladesApiExample {

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

public class BladesApiExample {

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

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

// Delete a blade.
[apiInstance bladesBladeIdDeleteWith:bladeId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BladesApi()

var bladeId = 789; // {Long} The blade id.


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

namespace Example
{
    public class bladesBladeIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new BladesApi();
            var bladeId = 789;  // Long | The blade id.

            try
            {
                // Delete a blade.
                apiInstance.bladesBladeIdDelete(bladeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BladesApi.bladesBladeIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\BladesApi();
$bladeId = 789; // Long | The blade id.

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

my $api_instance = WWW::SwaggerClient::BladesApi->new();
my $bladeId = 789; # Long | The blade id.

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

# create an instance of the API class
api_instance = swagger_client.BladesApi()
bladeId = 789 # Long | The blade id.

try: 
    # Delete a blade.
    api_instance.blades_blade_id_delete(bladeId)
except ApiException as e:
    print("Exception when calling BladesApi->bladesBladeIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
blade_id*
Long (int64)
The blade id.
Required

Responses

Status: 204 - Blade successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

bladesBladeIdGet

Get a blade.


/blades/{blade_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/blades/{blade_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BladesApi;

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

public class BladesApiExample {

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

public class BladesApiExample {

    public static void main(String[] args) {
        BladesApi apiInstance = new BladesApi();
        Long bladeId = 789; // Long | The blade id.
        try {
            Blade result = apiInstance.bladesBladeIdGet(bladeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BladesApi#bladesBladeIdGet");
            e.printStackTrace();
        }
    }
}
Long *bladeId = 789; // The blade id.

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

// Get a blade.
[apiInstance bladesBladeIdGetWith:bladeId
              completionHandler: ^(Blade output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BladesApi()

var bladeId = 789; // {Long} The blade id.


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

namespace Example
{
    public class bladesBladeIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new BladesApi();
            var bladeId = 789;  // Long | The blade id.

            try
            {
                // Get a blade.
                Blade result = apiInstance.bladesBladeIdGet(bladeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BladesApi.bladesBladeIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\BladesApi();
$bladeId = 789; // Long | The blade id.

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

my $api_instance = WWW::SwaggerClient::BladesApi->new();
my $bladeId = 789; # Long | The blade id.

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

# create an instance of the API class
api_instance = swagger_client.BladesApi()
bladeId = 789 # Long | The blade id.

try: 
    # Get a blade.
    api_response = api_instance.blades_blade_id_get(bladeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BladesApi->bladesBladeIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
blade_id*
Long (int64)
The blade id.
Required

Responses

Status: 200 - A blade.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

bladesBladeIdPut

Update a blade.


/blades/{blade_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/blades/{blade_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BladesApi;

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

public class BladesApiExample {

    public static void main(String[] args) {
        
        BladesApi apiInstance = new BladesApi();
        Long bladeId = 789; // Long | The blade id.
        Blade blade = ; // Blade | The data to update the specific blade.
        try {
            Blade result = apiInstance.bladesBladeIdPut(bladeId, blade);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BladesApi#bladesBladeIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BladesApi;

public class BladesApiExample {

    public static void main(String[] args) {
        BladesApi apiInstance = new BladesApi();
        Long bladeId = 789; // Long | The blade id.
        Blade blade = ; // Blade | The data to update the specific blade.
        try {
            Blade result = apiInstance.bladesBladeIdPut(bladeId, blade);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BladesApi#bladesBladeIdPut");
            e.printStackTrace();
        }
    }
}
Long *bladeId = 789; // The blade id.
Blade *blade = ; // The data to update the specific blade.

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

// Update a blade.
[apiInstance bladesBladeIdPutWith:bladeId
    blade:blade
              completionHandler: ^(Blade output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BladesApi()

var bladeId = 789; // {Long} The blade id.

var blade = ; // {Blade} The data to update the specific blade.


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

namespace Example
{
    public class bladesBladeIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new BladesApi();
            var bladeId = 789;  // Long | The blade id.
            var blade = new Blade(); // Blade | The data to update the specific blade.

            try
            {
                // Update a blade.
                Blade result = apiInstance.bladesBladeIdPut(bladeId, blade);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BladesApi.bladesBladeIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\BladesApi();
$bladeId = 789; // Long | The blade id.
$blade = ; // Blade | The data to update the specific blade.

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

my $api_instance = WWW::SwaggerClient::BladesApi->new();
my $bladeId = 789; # Long | The blade id.
my $blade = WWW::SwaggerClient::Object::Blade->new(); # Blade | The data to update the specific blade.

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

# create an instance of the API class
api_instance = swagger_client.BladesApi()
bladeId = 789 # Long | The blade id.
blade =  # Blade | The data to update the specific blade.

try: 
    # Update a blade.
    api_response = api_instance.blades_blade_id_put(bladeId, blade)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BladesApi->bladesBladeIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
blade_id*
Long (int64)
The blade id.
Required
Body parameters
Name Description
blade *

Responses

Status: 200 - Blade successfully updated.

Status: 400 - Blade couldn't have been updated.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

bladesGet

Get all blades.


/blades

Usage and SDK Samples

curl -X GET "http://localhost/api/blades"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BladesApi;

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

public class BladesApiExample {

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

public class BladesApiExample {

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

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

// Get all blades.
[apiInstance bladesGetWithCompletionHandler: 
              ^(array[Blade] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BladesApi()

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

namespace Example
{
    public class bladesGetExample
    {
        public void main()
        {
            
            var apiInstance = new BladesApi();

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

$api_instance = new Swagger\Client\Api\BladesApi();

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

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

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

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

try: 
    # Get all blades.
    api_response = api_instance.blades_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BladesApi->bladesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of blades.

Status: 500 - An unexpected error occured.

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

bladesPost

Create a new blade.


/blades

Usage and SDK Samples

curl -X POST "http://localhost/api/blades"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BladesApi;

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

public class BladesApiExample {

    public static void main(String[] args) {
        
        BladesApi apiInstance = new BladesApi();
        NewBlade blade = ; // NewBlade | The blade to create.
        try {
            Blade result = apiInstance.bladesPost(blade);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BladesApi#bladesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.BladesApi;

public class BladesApiExample {

    public static void main(String[] args) {
        BladesApi apiInstance = new BladesApi();
        NewBlade blade = ; // NewBlade | The blade to create.
        try {
            Blade result = apiInstance.bladesPost(blade);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BladesApi#bladesPost");
            e.printStackTrace();
        }
    }
}
NewBlade *blade = ; // The blade to create. (optional)

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

// Create a new blade.
[apiInstance bladesPostWith:blade
              completionHandler: ^(Blade output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BladesApi()

var opts = { 
  'blade':  // {NewBlade} The blade to create.
};

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

namespace Example
{
    public class bladesPostExample
    {
        public void main()
        {
            
            var apiInstance = new BladesApi();
            var blade = new NewBlade(); // NewBlade | The blade to create. (optional) 

            try
            {
                // Create a new blade.
                Blade result = apiInstance.bladesPost(blade);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BladesApi.bladesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\BladesApi();
$blade = ; // NewBlade | The blade to create.

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

my $api_instance = WWW::SwaggerClient::BladesApi->new();
my $blade = WWW::SwaggerClient::Object::NewBlade->new(); # NewBlade | The blade to create.

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

# create an instance of the API class
api_instance = swagger_client.BladesApi()
blade =  # NewBlade | The blade to create. (optional)

try: 
    # Create a new blade.
    api_response = api_instance.blades_post(blade=blade)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BladesApi->bladesPost: %s\n" % e)

Parameters

Body parameters
Name Description
blade

Responses

Status: 201 - Blade succesfully created.

Name Type Format Description
Location String uri The full URI of the created Blade.

Status: 400 - Blade couldn't have been created.

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 occured.

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

BuildInfo

buildInfoGet

Get the build information of Sunlight platform.


/build_info

Usage and SDK Samples

curl -X GET "http://localhost/api/build_info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.BuildInfoApi;

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

public class BuildInfoApiExample {

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

public class BuildInfoApiExample {

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

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

// Get the build information of Sunlight platform.
[apiInstance buildInfoGetWithCompletionHandler: 
              ^(BuildInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.BuildInfoApi()

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

namespace Example
{
    public class buildInfoGetExample
    {
        public void main()
        {
            
            var apiInstance = new BuildInfoApi();

            try
            {
                // Get the build information of Sunlight platform.
                BuildInfo result = apiInstance.buildInfoGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BuildInfoApi.buildInfoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\BuildInfoApi();

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

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

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

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

try: 
    # Get the build information of Sunlight platform.
    api_response = api_instance.build_info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BuildInfoApi->buildInfoGet: %s\n" % e)

Parameters

Responses

Status: 200 - Details of build information of Sunlight platform.

[{build_date=Thu Apr 18 16:18:16 UTC 2019, build_host=Linux ubuntu-xenial 4.4.0-142-generic, build_name=PEEPER, build_tag=R20190418-161154-bbaa, build_type=DEVEL, platform=bobcat}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

Certifications

certificationsCertificationIdDelete

Delete the certification

Delete the certification. The following scenarios will fail: * If it is the only one certification from the list (422)


/certifications/{certification_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/certifications/{certification_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CertificationsApi;

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

public class CertificationsApiExample {

    public static void main(String[] args) {
        
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        try {
            apiInstance.certificationsCertificationIdDelete(certificationId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CertificationsApi;

public class CertificationsApiExample {

    public static void main(String[] args) {
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        try {
            apiInstance.certificationsCertificationIdDelete(certificationId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *certificationId = ; // The certification id.

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

// Delete the certification
[apiInstance certificationsCertificationIdDeleteWith:certificationId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CertificationsApi()

var certificationId = ; // {UUID} The certification id.


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

namespace Example
{
    public class certificationsCertificationIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new CertificationsApi();
            var certificationId = new UUID(); // UUID | The certification id.

            try
            {
                // Delete the certification
                apiInstance.certificationsCertificationIdDelete(certificationId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CertificationsApi.certificationsCertificationIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CertificationsApi();
$certificationId = ; // UUID | The certification id.

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

my $api_instance = WWW::SwaggerClient::CertificationsApi->new();
my $certificationId = ; # UUID | The certification id.

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

# create an instance of the API class
api_instance = swagger_client.CertificationsApi()
certificationId =  # UUID | The certification id.

try: 
    # Delete the certification
    api_instance.certifications_certification_id_delete(certificationId)
except ApiException as e:
    print("Exception when calling CertificationsApi->certificationsCertificationIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
certification_id*
UUID (uuid)
The certification id.
Required

Responses

Status: 204 - Certification successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

certificationsCertificationIdGet

Get a certification based on the ID


/certifications/{certification_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/certifications/{certification_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CertificationsApi;

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

public class CertificationsApiExample {

    public static void main(String[] args) {
        
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        try {
            Certification result = apiInstance.certificationsCertificationIdGet(certificationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CertificationsApi;

public class CertificationsApiExample {

    public static void main(String[] args) {
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        try {
            Certification result = apiInstance.certificationsCertificationIdGet(certificationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdGet");
            e.printStackTrace();
        }
    }
}
UUID *certificationId = ; // The certification id.

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

// Get a certification based on the ID
[apiInstance certificationsCertificationIdGetWith:certificationId
              completionHandler: ^(Certification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CertificationsApi()

var certificationId = ; // {UUID} The certification id.


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

namespace Example
{
    public class certificationsCertificationIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new CertificationsApi();
            var certificationId = new UUID(); // UUID | The certification id.

            try
            {
                // Get a certification based on the ID
                Certification result = apiInstance.certificationsCertificationIdGet(certificationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CertificationsApi.certificationsCertificationIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CertificationsApi();
$certificationId = ; // UUID | The certification id.

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

my $api_instance = WWW::SwaggerClient::CertificationsApi->new();
my $certificationId = ; # UUID | The certification id.

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

# create an instance of the API class
api_instance = swagger_client.CertificationsApi()
certificationId =  # UUID | The certification id.

try: 
    # Get a certification based on the ID
    api_response = api_instance.certifications_certification_id_get(certificationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertificationsApi->certificationsCertificationIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
certification_id*
UUID (uuid)
The certification id.
Required

Responses

Status: 200 - Certification succesfully created.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

certificationsCertificationIdPut

Update the certification based on the ID

Updates the certification's attributes. However, if the 'key' is empty, then it will use the new certification based on the old key. The following scenarios will fail * If any attribute is empty, except the key (422) * Domain is not in correct format (422) * Certification and key are not valid (422)


/certifications/{certification_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/certifications/{certification_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CertificationsApi;

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

public class CertificationsApiExample {

    public static void main(String[] args) {
        
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        NewCertification certification = ; // NewCertification | The certification to create.
        try {
            Certification result = apiInstance.certificationsCertificationIdPut(certificationId, certification);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CertificationsApi;

public class CertificationsApiExample {

    public static void main(String[] args) {
        CertificationsApi apiInstance = new CertificationsApi();
        UUID certificationId = ; // UUID | The certification id.
        NewCertification certification = ; // NewCertification | The certification to create.
        try {
            Certification result = apiInstance.certificationsCertificationIdPut(certificationId, certification);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsCertificationIdPut");
            e.printStackTrace();
        }
    }
}
UUID *certificationId = ; // The certification id.
NewCertification *certification = ; // The certification to create. (optional)

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

// Update the certification based on the ID
[apiInstance certificationsCertificationIdPutWith:certificationId
    certification:certification
              completionHandler: ^(Certification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CertificationsApi()

var certificationId = ; // {UUID} The certification id.

var opts = { 
  'certification':  // {NewCertification} The certification to create.
};

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

namespace Example
{
    public class certificationsCertificationIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new CertificationsApi();
            var certificationId = new UUID(); // UUID | The certification id.
            var certification = new NewCertification(); // NewCertification | The certification to create. (optional) 

            try
            {
                // Update the certification based on the ID
                Certification result = apiInstance.certificationsCertificationIdPut(certificationId, certification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CertificationsApi.certificationsCertificationIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CertificationsApi();
$certificationId = ; // UUID | The certification id.
$certification = ; // NewCertification | The certification to create.

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

my $api_instance = WWW::SwaggerClient::CertificationsApi->new();
my $certificationId = ; # UUID | The certification id.
my $certification = WWW::SwaggerClient::Object::NewCertification->new(); # NewCertification | The certification to create.

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

# create an instance of the API class
api_instance = swagger_client.CertificationsApi()
certificationId =  # UUID | The certification id.
certification =  # NewCertification | The certification to create. (optional)

try: 
    # Update the certification based on the ID
    api_response = api_instance.certifications_certification_id_put(certificationId, certification=certification)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertificationsApi->certificationsCertificationIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
certification_id*
UUID (uuid)
The certification id.
Required
Body parameters
Name Description
certification

Responses

Status: 200 - Certification succesfully created.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

certificationsGet

Get list of certifications.


/certifications

Usage and SDK Samples

curl -X GET "http://localhost/api/certifications"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CertificationsApi;

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

public class CertificationsApiExample {

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

public class CertificationsApiExample {

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

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

// Get list of certifications.
[apiInstance certificationsGetWithCompletionHandler: 
              ^(array[Certification] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CertificationsApi()

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

namespace Example
{
    public class certificationsGetExample
    {
        public void main()
        {
            
            var apiInstance = new CertificationsApi();

            try
            {
                // Get list of certifications.
                array[Certification] result = apiInstance.certificationsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CertificationsApi.certificationsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CertificationsApi();

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

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

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

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

try: 
    # Get list of certifications.
    api_response = api_instance.certifications_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertificationsApi->certificationsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of certifications.

Status: 500 - An unexpected error occured.

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

certificationsPost

Add a new certification.

Add a new certification. The following scenarios will fail: * If any attribute is empty (422) * Domain is not in correct format (422) * Certification and key are not valid (422)


/certifications

Usage and SDK Samples

curl -X POST "http://localhost/api/certifications"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CertificationsApi;

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

public class CertificationsApiExample {

    public static void main(String[] args) {
        
        CertificationsApi apiInstance = new CertificationsApi();
        NewCertification certification = ; // NewCertification | The certification to create.
        try {
            Certification result = apiInstance.certificationsPost(certification);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CertificationsApi;

public class CertificationsApiExample {

    public static void main(String[] args) {
        CertificationsApi apiInstance = new CertificationsApi();
        NewCertification certification = ; // NewCertification | The certification to create.
        try {
            Certification result = apiInstance.certificationsPost(certification);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CertificationsApi#certificationsPost");
            e.printStackTrace();
        }
    }
}
NewCertification *certification = ; // The certification to create. (optional)

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

// Add a new certification.
[apiInstance certificationsPostWith:certification
              completionHandler: ^(Certification output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CertificationsApi()

var opts = { 
  'certification':  // {NewCertification} The certification to create.
};

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

namespace Example
{
    public class certificationsPostExample
    {
        public void main()
        {
            
            var apiInstance = new CertificationsApi();
            var certification = new NewCertification(); // NewCertification | The certification to create. (optional) 

            try
            {
                // Add a new certification.
                Certification result = apiInstance.certificationsPost(certification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CertificationsApi.certificationsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CertificationsApi();
$certification = ; // NewCertification | The certification to create.

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

my $api_instance = WWW::SwaggerClient::CertificationsApi->new();
my $certification = WWW::SwaggerClient::Object::NewCertification->new(); # NewCertification | The certification to create.

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

# create an instance of the API class
api_instance = swagger_client.CertificationsApi()
certification =  # NewCertification | The certification to create. (optional)

try: 
    # Add a new certification.
    api_response = api_instance.certifications_post(certification=certification)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertificationsApi->certificationsPost: %s\n" % e)

Parameters

Body parameters
Name Description
certification

Responses

Status: 201 - Certification succesfully created.

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 occured.

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

Chassis

chassisChassisIdDelete

Delete a chassis.


/chassis/{chassis_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/chassis/{chassis_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        try {
            apiInstance.chassisChassisIdDelete(chassisId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        try {
            apiInstance.chassisChassisIdDelete(chassisId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *chassisId = ; // The chassis id.

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

// Delete a chassis.
[apiInstance chassisChassisIdDeleteWith:chassisId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisId = ; // {UUID} The chassis id.


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

namespace Example
{
    public class chassisChassisIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisId = new UUID(); // UUID | The chassis id.

            try
            {
                // Delete a chassis.
                apiInstance.chassisChassisIdDelete(chassisId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisChassisIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisId = ; // UUID | The chassis id.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisId = ; # UUID | The chassis id.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisId =  # UUID | The chassis id.

try: 
    # Delete a chassis.
    api_instance.chassis_chassis_id_delete(chassisId)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisChassisIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_id*
UUID (uuid)
The chassis id.
Required

Responses

Status: 204 - Chassis successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

chassisChassisIdGet

Get a chassis.


/chassis/{chassis_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/chassis/{chassis_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        try {
            Chassis result = apiInstance.chassisChassisIdGet(chassisId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        try {
            Chassis result = apiInstance.chassisChassisIdGet(chassisId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdGet");
            e.printStackTrace();
        }
    }
}
UUID *chassisId = ; // The chassis id.

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

// Get a chassis.
[apiInstance chassisChassisIdGetWith:chassisId
              completionHandler: ^(Chassis output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisId = ; // {UUID} The chassis id.


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

namespace Example
{
    public class chassisChassisIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisId = new UUID(); // UUID | The chassis id.

            try
            {
                // Get a chassis.
                Chassis result = apiInstance.chassisChassisIdGet(chassisId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisChassisIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisId = ; // UUID | The chassis id.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisId = ; # UUID | The chassis id.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisId =  # UUID | The chassis id.

try: 
    # Get a chassis.
    api_response = api_instance.chassis_chassis_id_get(chassisId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisChassisIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_id*
UUID (uuid)
The chassis id.
Required

Responses

Status: 200 - A chassis.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

chassisChassisIdPut

Update a chassis.


/chassis/{chassis_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/chassis/{chassis_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        NewChassis chassis = ; // NewChassis | The data to update the specific chassis.
        try {
            Chassis result = apiInstance.chassisChassisIdPut(chassisId, chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        UUID chassisId = ; // UUID | The chassis id.
        NewChassis chassis = ; // NewChassis | The data to update the specific chassis.
        try {
            Chassis result = apiInstance.chassisChassisIdPut(chassisId, chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisChassisIdPut");
            e.printStackTrace();
        }
    }
}
UUID *chassisId = ; // The chassis id.
NewChassis *chassis = ; // The data to update the specific chassis.

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

// Update a chassis.
[apiInstance chassisChassisIdPutWith:chassisId
    chassis:chassis
              completionHandler: ^(Chassis output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisId = ; // {UUID} The chassis id.

var chassis = ; // {NewChassis} The data to update the specific chassis.


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

namespace Example
{
    public class chassisChassisIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisId = new UUID(); // UUID | The chassis id.
            var chassis = new NewChassis(); // NewChassis | The data to update the specific chassis.

            try
            {
                // Update a chassis.
                Chassis result = apiInstance.chassisChassisIdPut(chassisId, chassis);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisChassisIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisId = ; // UUID | The chassis id.
$chassis = ; // NewChassis | The data to update the specific chassis.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisId = ; # UUID | The chassis id.
my $chassis = WWW::SwaggerClient::Object::NewChassis->new(); # NewChassis | The data to update the specific chassis.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisId =  # UUID | The chassis id.
chassis =  # NewChassis | The data to update the specific chassis.

try: 
    # Update a chassis.
    api_response = api_instance.chassis_chassis_id_put(chassisId, chassis)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisChassisIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_id*
UUID (uuid)
The chassis id.
Required
Body parameters
Name Description
chassis *

Responses

Status: 200 - Chassis successfully updated.

Status: 400 - Chassis couldn't have been updated.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

chassisGet

Get all chassis.


/chassis

Usage and SDK Samples

curl -X GET "http://localhost/api/chassis"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

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

public class ChassisApiExample {

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

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

// Get all chassis.
[apiInstance chassisGetWithCompletionHandler: 
              ^(array[GenericChassis] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

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

namespace Example
{
    public class chassisGetExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();

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

$api_instance = new Swagger\Client\Api\ChassisApi();

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

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

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

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

try: 
    # Get all chassis.
    api_response = api_instance.chassis_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of chassis.

[{id=as8u43yew6d78f9gohytik54hrfs8934, autodiscovered=false, chassis_type={id=1, name=Example chassis type, description=This is an example chassis type to test the api., units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}}, {id=nhbg789ioyh3q984utgh7s9i4348r934, rack_id=2, start_position=0, autodiscovered=false, chassis_type={id=1, rack_id=123, name=Example chassis type, description=This is an example chassis type to test the api., units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}}]

Status: 500 - An unexpected error occured.

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

chassisPost

Create a new chassis.


/chassis

Usage and SDK Samples

curl -X POST "http://localhost/api/chassis"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        NewChassis chassis = ; // NewChassis | The chassis to create.
        try {
            Chassis result = apiInstance.chassisPost(chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        NewChassis chassis = ; // NewChassis | The chassis to create.
        try {
            Chassis result = apiInstance.chassisPost(chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisPost");
            e.printStackTrace();
        }
    }
}
NewChassis *chassis = ; // The chassis to create. (optional)

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

// Create a new chassis.
[apiInstance chassisPostWith:chassis
              completionHandler: ^(Chassis output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var opts = { 
  'chassis':  // {NewChassis} The chassis to create.
};

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

namespace Example
{
    public class chassisPostExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassis = new NewChassis(); // NewChassis | The chassis to create. (optional) 

            try
            {
                // Create a new chassis.
                Chassis result = apiInstance.chassisPost(chassis);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassis = ; // NewChassis | The chassis to create.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassis = WWW::SwaggerClient::Object::NewChassis->new(); # NewChassis | The chassis to create.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassis =  # NewChassis | The chassis to create. (optional)

try: 
    # Create a new chassis.
    api_response = api_instance.chassis_post(chassis=chassis)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisPost: %s\n" % e)

Parameters

Body parameters
Name Description
chassis

Responses

Status: 201 - Chassis succesfully created.

Name Type Format Description
Location String uri The full URI of the created chassis.

Status: 400 - Chassis couldn't have been created. For example, if the supplied chassis type id cannot be found an error like this should be returned.

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 occured.

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

chassisTypesChassisTypeIdDelete

Delete a specific chassis type.


/chassis_types/{chassis_type_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/chassis_types/{chassis_type_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

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

public class ChassisApiExample {

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

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

// Delete a specific chassis type.
[apiInstance chassisTypesChassisTypeIdDeleteWith:chassisTypeId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisTypeId = 789; // {Long} The chassis type id.


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

namespace Example
{
    public class chassisTypesChassisTypeIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisTypeId = 789;  // Long | The chassis type id.

            try
            {
                // Delete a specific chassis type.
                apiInstance.chassisTypesChassisTypeIdDelete(chassisTypeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisTypesChassisTypeIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisTypeId = 789; // Long | The chassis type id.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisTypeId = 789; # Long | The chassis type id.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisTypeId = 789 # Long | The chassis type id.

try: 
    # Delete a specific chassis type.
    api_instance.chassis_types_chassis_type_id_delete(chassisTypeId)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisTypesChassisTypeIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_type_id*
Long (int64)
The chassis type id.
Required

Responses

Status: 204 - Chassis type is successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

chassisTypesChassisTypeIdGet

Get a chassis type.


/chassis_types/{chassis_type_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/chassis_types/{chassis_type_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        Long chassisTypeId = 789; // Long | The chassis type id.
        try {
            ChassisType result = apiInstance.chassisTypesChassisTypeIdGet(chassisTypeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesChassisTypeIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        Long chassisTypeId = 789; // Long | The chassis type id.
        try {
            ChassisType result = apiInstance.chassisTypesChassisTypeIdGet(chassisTypeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesChassisTypeIdGet");
            e.printStackTrace();
        }
    }
}
Long *chassisTypeId = 789; // The chassis type id.

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

// Get a chassis type.
[apiInstance chassisTypesChassisTypeIdGetWith:chassisTypeId
              completionHandler: ^(ChassisType output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisTypeId = 789; // {Long} The chassis type id.


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

namespace Example
{
    public class chassisTypesChassisTypeIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisTypeId = 789;  // Long | The chassis type id.

            try
            {
                // Get a chassis type.
                ChassisType result = apiInstance.chassisTypesChassisTypeIdGet(chassisTypeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisTypesChassisTypeIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisTypeId = 789; // Long | The chassis type id.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisTypeId = 789; # Long | The chassis type id.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisTypeId = 789 # Long | The chassis type id.

try: 
    # Get a chassis type.
    api_response = api_instance.chassis_types_chassis_type_id_get(chassisTypeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisTypesChassisTypeIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_type_id*
Long (int64)
The chassis type id.
Required

Responses

Status: 200 - A response containing a single chassis type resource.

{id=1, name=Example chassis type, description=This is an example chassis type to test the api., units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

chassisTypesChassisTypeIdPut

Update a chassis type.


/chassis_types/{chassis_type_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/chassis_types/{chassis_type_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        Long chassisTypeId = 789; // Long | The chassis type id.
        ChassisType chassis = ; // ChassisType | The data to update the specific chassis type.
        try {
            ChassisType result = apiInstance.chassisTypesChassisTypeIdPut(chassisTypeId, chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesChassisTypeIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        Long chassisTypeId = 789; // Long | The chassis type id.
        ChassisType chassis = ; // ChassisType | The data to update the specific chassis type.
        try {
            ChassisType result = apiInstance.chassisTypesChassisTypeIdPut(chassisTypeId, chassis);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesChassisTypeIdPut");
            e.printStackTrace();
        }
    }
}
Long *chassisTypeId = 789; // The chassis type id.
ChassisType *chassis = ; // The data to update the specific chassis type.

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

// Update a chassis type.
[apiInstance chassisTypesChassisTypeIdPutWith:chassisTypeId
    chassis:chassis
              completionHandler: ^(ChassisType output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var chassisTypeId = 789; // {Long} The chassis type id.

var chassis = ; // {ChassisType} The data to update the specific chassis type.


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

namespace Example
{
    public class chassisTypesChassisTypeIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisTypeId = 789;  // Long | The chassis type id.
            var chassis = new ChassisType(); // ChassisType | The data to update the specific chassis type.

            try
            {
                // Update a chassis type.
                ChassisType result = apiInstance.chassisTypesChassisTypeIdPut(chassisTypeId, chassis);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisTypesChassisTypeIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisTypeId = 789; // Long | The chassis type id.
$chassis = ; // ChassisType | The data to update the specific chassis type.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisTypeId = 789; # Long | The chassis type id.
my $chassis = WWW::SwaggerClient::Object::ChassisType->new(); # ChassisType | The data to update the specific chassis type.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisTypeId = 789 # Long | The chassis type id.
chassis =  # ChassisType | The data to update the specific chassis type.

try: 
    # Update a chassis type.
    api_response = api_instance.chassis_types_chassis_type_id_put(chassisTypeId, chassis)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisTypesChassisTypeIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
chassis_type_id*
Long (int64)
The chassis type id.
Required
Body parameters
Name Description
chassis *

Responses

Status: 200 - A response containing a single chassis type resource.

{id=1, name=Example chassis type, description=This is an example chassis type to test the api., units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}

Status: 400 - Chassis type could not be updated.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

chassisTypesGet

Get available chassis types.


/chassis_types

Usage and SDK Samples

curl -X GET "http://localhost/api/chassis_types"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

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

public class ChassisApiExample {

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

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

// Get available chassis types.
[apiInstance chassisTypesGetWithCompletionHandler: 
              ^(array[ChassisType] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

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

namespace Example
{
    public class chassisTypesGetExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();

            try
            {
                // Get available chassis types.
                array[ChassisType] result = apiInstance.chassisTypesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisTypesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();

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

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

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

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

try: 
    # Get available chassis types.
    api_response = api_instance.chassis_types_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisTypesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of chassis types.

[{id=1, name=Type 1, description=Type 1, units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}, {id=2, name=Type 2, description=Type 2, units=1, blades=1, nodes_per_blade=10, physical_disks_per_blade=0}]

Status: 500 - An unexpected error occured.

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

chassisTypesPost

Create a new chassis type.

Given a chassis type configuration it will create a new type. The request body may omit `nodes_per_blade` or `physical_disks_per_blade` but not both. At least one of them must be present with a value greater than zero. The same rule applies if both are present in the request body. This way we can represent chassis that either include only compute nodes or storage or both. In the second case, the chassis may contain CPUs but they are not included in the resources of the whole system and are used solely by that chassis. If validations fail then an error will be returned informing the client of what went wrong.


/chassis_types

Usage and SDK Samples

curl -X POST "http://localhost/api/chassis_types"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChassisApi;

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

public class ChassisApiExample {

    public static void main(String[] args) {
        
        ChassisApi apiInstance = new ChassisApi();
        ChassisType chassisType = ; // ChassisType | The chassis type to be created.
        try {
            ChassisType result = apiInstance.chassisTypesPost(chassisType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChassisApi;

public class ChassisApiExample {

    public static void main(String[] args) {
        ChassisApi apiInstance = new ChassisApi();
        ChassisType chassisType = ; // ChassisType | The chassis type to be created.
        try {
            ChassisType result = apiInstance.chassisTypesPost(chassisType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChassisApi#chassisTypesPost");
            e.printStackTrace();
        }
    }
}
ChassisType *chassisType = ; // The chassis type to be created. (optional)

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

// Create a new chassis type.
[apiInstance chassisTypesPostWith:chassisType
              completionHandler: ^(ChassisType output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ChassisApi()

var opts = { 
  'chassisType':  // {ChassisType} The chassis type to be created.
};

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

namespace Example
{
    public class chassisTypesPostExample
    {
        public void main()
        {
            
            var apiInstance = new ChassisApi();
            var chassisType = new ChassisType(); // ChassisType | The chassis type to be created. (optional) 

            try
            {
                // Create a new chassis type.
                ChassisType result = apiInstance.chassisTypesPost(chassisType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChassisApi.chassisTypesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ChassisApi();
$chassisType = ; // ChassisType | The chassis type to be created.

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

my $api_instance = WWW::SwaggerClient::ChassisApi->new();
my $chassisType = WWW::SwaggerClient::Object::ChassisType->new(); # ChassisType | The chassis type to be created.

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

# create an instance of the API class
api_instance = swagger_client.ChassisApi()
chassisType =  # ChassisType | The chassis type to be created. (optional)

try: 
    # Create a new chassis type.
    api_response = api_instance.chassis_types_post(chassisType=chassisType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChassisApi->chassisTypesPost: %s\n" % e)

Parameters

Body parameters
Name Description
chassisType

Responses

Status: 201 - The new chassis type has been created.

{id=1, name=Example chassis type, description=This is an example chassis type to test the api., units=3, blades=12, nodes_per_blade=4, physical_disks_per_blade=4}
Name Type Format Description
Location String uri The full URI of the created chassis type.

Status: 400 - Chassis type could not be created.

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 occured.

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

Clusters

clusterTypesGet

Get list of cluster types.

The current supported cluster types are * VM * Docker * Docker Swarm


/cluster_types

Usage and SDK Samples

curl -X GET "http://localhost/api/cluster_types"
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[ClusterType] result = apiInstance.clusterTypesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clusterTypesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

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

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

// Get list of cluster types.
[apiInstance clusterTypesGetWithCompletionHandler: 
              ^(array[ClusterType] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

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

namespace Example
{
    public class clusterTypesGetExample
    {
        public void main()
        {
            
            var apiInstance = new ClustersApi();

            try
            {
                // Get list of cluster types.
                array[ClusterType] result = apiInstance.clusterTypesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clusterTypesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ClustersApi();

try {
    $result = $api_instance->clusterTypesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clusterTypesGet: ', $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->clusterTypesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clusterTypesGet: $@\n";
}
from __future__ import print_statement
import time
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 list of cluster types.
    api_response = api_instance.cluster_types_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clusterTypesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of cluster types.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

clustersClusterIdDelete

Deletes a cluster including its instances.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/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();
        UUID clusterId = ; // UUID | 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();
        UUID clusterId = ; // UUID | The cluster id.
        try {
            apiInstance.clustersClusterIdDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *clusterId = ; // The cluster id.

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

// Deletes a cluster including its instances.
[apiInstance clustersClusterIdDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

var clusterId = ; // {UUID} 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 = new UUID(); // UUID | The cluster id.

            try
            {
                // Deletes a cluster including its instances.
                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\Api\ClustersApi();
$clusterId = ; // UUID | 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 = ; # UUID | The cluster id.

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

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

try: 
    # Deletes a cluster including its instances.
    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*
UUID (uuid)
The cluster id.
Required

Responses

Status: 204 - Cluster successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

clustersClusterIdGet

Get cluster.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X GET "http://localhost/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();
        UUID clusterId = ; // UUID | 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();
        UUID clusterId = ; // UUID | 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();
        }
    }
}
UUID *clusterId = ; // The cluster id.

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

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

var api = new SunlightDashboard.ClustersApi()

var clusterId = ; // {UUID} 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 = new UUID(); // UUID | The cluster id.

            try
            {
                // Get cluster.
                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\Api\ClustersApi();
$clusterId = ; // UUID | 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 = ; # UUID | The cluster id.

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

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

try: 
    # Get cluster.
    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*
UUID (uuid)
The cluster id.
Required

Responses

Status: 200 - A cluster.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

clustersClusterIdInstancesGet

Get all the instances belonging to a particular cluster.


/clusters/{cluster_id}/instances

Usage and SDK Samples

curl -X GET "http://localhost/api/clusters/{cluster_id}/instances"
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();
        UUID clusterId = ; // UUID | The cluster id.
        try {
            array[Instance] result = apiInstance.clustersClusterIdInstancesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

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

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

// Get all the instances belonging to a particular cluster.
[apiInstance clustersClusterIdInstancesGetWith:clusterId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

var clusterId = ; // {UUID} The cluster id.


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

namespace Example
{
    public class clustersClusterIdInstancesGetExample
    {
        public void main()
        {
            
            var apiInstance = new ClustersApi();
            var clusterId = new UUID(); // UUID | The cluster id.

            try
            {
                // Get all the instances belonging to a particular cluster.
                array[Instance] result = apiInstance.clustersClusterIdInstancesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ClustersApi();
$clusterId = ; // UUID | The cluster id.

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

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

eval { 
    my $result = $api_instance->clustersClusterIdInstancesGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdInstancesGet: $@\n";
}
from __future__ import print_statement
import time
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 =  # UUID | The cluster id.

try: 
    # Get all the instances belonging to a particular cluster.
    api_response = api_instance.clusters_cluster_id_instances_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdInstancesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
UUID (uuid)
The cluster id.
Required

Responses

Status: 200 - A list of resource groups.

[{name=yesenia.name.small-instance, id=27, domain_name=dny3NkG1faI8, node=74265909, resource_group_id=1, state=SHUTOFF, progress=instance_active, owner=Leonora_Goldner, root_disk_gb=3, memory_mb=384, vcpus=1, extra_disk_1_gb=0, extra_disk_2_gb=0, image={id=0a45078e-a582-50sm-b0e2-31e073787657, name=Ubuntu 16.04 x64, virtual_size=0, status=enabled, min_ram=0, min_disk=1, os_distro=Linux, provider=sunlight, location=local, os_version=16.04, architecture=x64}}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

clustersClusterIdInstancesPost

Creates a new instance for the specific cluster.

The API creates an instance for the specific cluster by using its resources. The following scenarios will fail * The cluster ID is not UUID. (400) * The cluster does not exist. (404) * The cluster is not available. (422) * The cluster is not the type of swarm and the 'swarm_node_role' parameter exists in the body. (422) * The cluster is a type of swarm and the 'swarm_node_role' parameter does not exist. (422) * The cluster is a type of swarm and the 'swarm_node_role' parameter does not contain value 'manager' or 'worker'. (422)


/clusters/{cluster_id}/instances

Usage and SDK Samples

curl -X POST "http://localhost/api/clusters/{cluster_id}/instances"
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();
        UUID clusterId = ; // UUID | The cluster id.
        NewClusterInstance instance = ; // NewClusterInstance | The instance to create.
        try {
            Instance result = apiInstance.clustersClusterIdInstancesPost(clusterId, instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdInstancesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        UUID clusterId = ; // UUID | The cluster id.
        NewClusterInstance instance = ; // NewClusterInstance | The instance to create.
        try {
            Instance result = apiInstance.clustersClusterIdInstancesPost(clusterId, instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdInstancesPost");
            e.printStackTrace();
        }
    }
}
UUID *clusterId = ; // The cluster id.
NewClusterInstance *instance = ; // The instance to create. (optional)

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

// Creates a new instance for the specific cluster.
[apiInstance clustersClusterIdInstancesPostWith:clusterId
    instance:instance
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

var clusterId = ; // {UUID} The cluster id.

var opts = { 
  'instance':  // {NewClusterInstance} The instance to create.
};

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

namespace Example
{
    public class clustersClusterIdInstancesPostExample
    {
        public void main()
        {
            
            var apiInstance = new ClustersApi();
            var clusterId = new UUID(); // UUID | The cluster id.
            var instance = new NewClusterInstance(); // NewClusterInstance | The instance to create. (optional) 

            try
            {
                // Creates a new instance for the specific cluster.
                Instance result = apiInstance.clustersClusterIdInstancesPost(clusterId, instance);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdInstancesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ClustersApi();
$clusterId = ; // UUID | The cluster id.
$instance = ; // NewClusterInstance | The instance to create.

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = ; # UUID | The cluster id.
my $instance = WWW::SwaggerClient::Object::NewClusterInstance->new(); # NewClusterInstance | The instance to create.

eval { 
    my $result = $api_instance->clustersClusterIdInstancesPost(clusterId => $clusterId, instance => $instance);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdInstancesPost: $@\n";
}
from __future__ import print_statement
import time
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 =  # UUID | The cluster id.
instance =  # NewClusterInstance | The instance to create. (optional)

try: 
    # Creates a new instance for the specific cluster.
    api_response = api_instance.clusters_cluster_id_instances_post(clusterId, instance=instance)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdInstancesPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
UUID (uuid)
The cluster id.
Required
Body parameters
Name Description
instance

Responses

Status: 201 - Instance succesfully created.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

clustersGet

Get list of clusters.


/clusters

Usage and SDK Samples

curl -X GET "http://localhost/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 list of clusters.
[apiInstance clustersGetWithCompletionHandler: 
              ^(array[Cluster] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.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 list of 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\Api\ClustersApi();

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

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

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

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

try: 
    # Get list of 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: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

clustersPost

Create a new cluster.

Based on the cluster type provided in the request, it will start the creation process of a VM, Docker or Docker Swarm cluster. If the request is well-formed, the cluster and instance entities entities contained by it will be created immediately and a response will be returned. In the background, a process will begin that will create and fire up the instances. The following scenarios will fail * The name is empty (422) * The number of nodes is equal or less than zero (422) * The resource group is not found (404) * A datastore is not found (404) * The image does not exist. (404) * The flavor does not exist. (404) * A network is not found. (404) * Could not find the network or the datastore in the resource group (422) * The image is not active. (422) * The image is not for the cluster type. (422) * The number of managers can not be more than the number of nodes or zero, if it is cluster type of swarm. (422) * Datastore does not have enough space to create all the instances. (422) * Memory of the group is not enough for all the instances. (422) * The flavor's disk size is very low for this image. (422) * The flavor's memory size is very low for the minimum memory of the image. (422)


/clusters

Usage and SDK Samples

curl -X POST "http://localhost/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();
        NewCluster cluster = ; // NewCluster | The cluster to create.
        try {
            Cluster result = apiInstance.clustersPost(cluster);
            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();
        NewCluster cluster = ; // NewCluster | The cluster to create.
        try {
            Cluster result = apiInstance.clustersPost(cluster);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersPost");
            e.printStackTrace();
        }
    }
}
NewCluster *cluster = ; // The cluster to create. (optional)

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

// Create a new cluster.
[apiInstance clustersPostWith:cluster
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

var opts = { 
  'cluster':  // {NewCluster} The cluster to create.
};

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 cluster = new NewCluster(); // NewCluster | The cluster to create. (optional) 

            try
            {
                // Create a new cluster.
                Cluster result = apiInstance.clustersPost(cluster);
                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\Api\ClustersApi();
$cluster = ; // NewCluster | The cluster to create.

try {
    $result = $api_instance->clustersPost($cluster);
    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 $cluster = WWW::SwaggerClient::Object::NewCluster->new(); # NewCluster | The cluster to create.

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

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
cluster =  # NewCluster | The cluster to create. (optional)

try: 
    # Create a new cluster.
    api_response = api_instance.clusters_post(cluster=cluster)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersPost: %s\n" % e)

Parameters

Body parameters
Name Description
cluster

Responses

Status: 202 - Cluster succesfully created and background process has started.

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 occured.

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

Cores

coresCoreIdPut

Update a core

Only the property **resource_group_id** can be updated under some restrictions. In order to remove a core from a resource group, then the property **resource_group_id** must have a value of zero. The following update scenarios will fail with a validation error (422) * A core is removed from a **reserved** resource group. * A core is removed from a resource group that has instances no matter their state. * A core is removed from a resource group and it is the only core that that group contains.


/cores/{core_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CoresApi;

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

public class CoresApiExample {

    public static void main(String[] args) {
        
        CoresApi apiInstance = new CoresApi();
        UUID coreId = ; // UUID | The core id.
        Body_1 body = ; // Body_1 | List of core IDs with resource group IDs.
        try {
            Core result = apiInstance.coresCoreIdPut(coreId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoresApi#coresCoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CoresApi;

public class CoresApiExample {

    public static void main(String[] args) {
        CoresApi apiInstance = new CoresApi();
        UUID coreId = ; // UUID | The core id.
        Body_1 body = ; // Body_1 | List of core IDs with resource group IDs.
        try {
            Core result = apiInstance.coresCoreIdPut(coreId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CoresApi#coresCoreIdPut");
            e.printStackTrace();
        }
    }
}
UUID *coreId = ; // The core id.
Body_1 *body = ; // List of core IDs with resource group IDs. (optional)

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

// Update a core
[apiInstance coresCoreIdPutWith:coreId
    body:body
              completionHandler: ^(Core output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.CoresApi()

var coreId = ; // {UUID} The core id.

var opts = { 
  'body':  // {Body_1} List of core IDs with resource group IDs.
};

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

namespace Example
{
    public class coresCoreIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new CoresApi();
            var coreId = new UUID(); // UUID | The core id.
            var body = new Body_1(); // Body_1 | List of core IDs with resource group IDs. (optional) 

            try
            {
                // Update a core
                Core result = apiInstance.coresCoreIdPut(coreId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CoresApi.coresCoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CoresApi();
$coreId = ; // UUID | The core id.
$body = ; // Body_1 | List of core IDs with resource group IDs.

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

my $api_instance = WWW::SwaggerClient::CoresApi->new();
my $coreId = ; # UUID | The core id.
my $body = WWW::SwaggerClient::Object::Body_1->new(); # Body_1 | List of core IDs with resource group IDs.

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

# create an instance of the API class
api_instance = swagger_client.CoresApi()
coreId =  # UUID | The core id.
body =  # Body_1 | List of core IDs with resource group IDs. (optional)

try: 
    # Update a core
    api_response = api_instance.cores_core_id_put(coreId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CoresApi->coresCoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
core_id*
UUID (uuid)
The core id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The update core.

Status: 400 - Ann error occured that is not covered by 404 or 422. An example is the id in the url was of invalid format/type.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

Datastores

datastoresDatastoreIdDbBackupsGet

Get the DB backups of a datastore.


/datastores/{datastore_id}/db_backups

Usage and SDK Samples

curl -X GET "http://localhost/api/datastores/{datastore_id}/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get the DB backups of a datastore.
[apiInstance datastoresDatastoreIdDbBackupsGetWith:datastoreId
              completionHandler: ^(array[DbBackup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.


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

namespace Example
{
    public class datastoresDatastoreIdDbBackupsGetExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.

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

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

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

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

try: 
    # Get the DB backups of a datastore.
    api_response = api_instance.datastores_datastore_id_db_backups_get(datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDbBackupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 200 - A list of DB backups.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

datastoresDatastoreIdDelete

Delete a datastore.

The endpoint deletes a datastore based on the ID. On the following scenarios, the endpoint will fail * The datastore does not exists. (404) * The datastore is reserved for controller. (422) * The Sunlight storage API fails to delete it. (500) * The database fails to delete it. (500)


/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/datastores/{datastore_id}?force="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        UUID datastoreId = ; // UUID | The datastore id.
        String force = force_example; // String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.

        try {
            apiInstance.datastoresDatastoreIdDelete(datastoreId, force);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        UUID datastoreId = ; // UUID | The datastore id.
        String force = force_example; // String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.

        try {
            apiInstance.datastoresDatastoreIdDelete(datastoreId, force);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *datastoreId = ; // The datastore id.
String *force = force_example; // Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.
 (optional) (default to no-force)

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

// Delete a datastore.
[apiInstance datastoresDatastoreIdDeleteWith:datastoreId
    force:force
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.

var opts = { 
  'force': force_example // {String} Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.

};

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

namespace Example
{
    public class datastoresDatastoreIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.
            var force = force_example;  // String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.
 (optional)  (default to no-force)

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.
$force = force_example; // String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.


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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $datastoreId = ; # UUID | The datastore id.
my $force = force_example; # String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.


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

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
datastoreId =  # UUID | The datastore id.
force = force_example # String | Delete the Datastore. If force=safe-force, it means that the API
will delete the datastore with all its orphans virtual disks.
If force=no-force, the API will delete only the datastore.
 (optional) (default to no-force)

try: 
    # Delete a datastore.
    api_instance.datastores_datastore_id_delete(datastoreId, force=force)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required
Query parameters
Name Description
force
String
Delete the Datastore. If force=safe-force, it means that the API will delete the datastore with all its orphans virtual disks. If force=no-force, the API will delete only the datastore.

Responses

Status: 204 - Datastore successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

datastoresDatastoreIdDisksDiskIdDelete

Remove a disk from the datastore.


/datastores/{datastore_id}/disks/{disk_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/datastores/{datastore_id}/disks/{disk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Remove a disk from the datastore.
[apiInstance datastoresDatastoreIdDisksDiskIdDeleteWith:datastoreId
    diskId:diskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.

var diskId = ; // {UUID} The disk id.


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

namespace Example
{
    public class datastoresDatastoreIdDisksDiskIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.
            var diskId = new UUID(); // UUID | The disk id.

            try
            {
                // Remove a disk from the datastore.
                apiInstance.datastoresDatastoreIdDisksDiskIdDelete(datastoreId, diskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.datastoresDatastoreIdDisksDiskIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.
$diskId = ; // UUID | The disk id.

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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $datastoreId = ; # UUID | The datastore id.
my $diskId = ; # UUID | The disk id.

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

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
datastoreId =  # UUID | The datastore id.
diskId =  # UUID | The disk id.

try: 
    # Remove a disk from the datastore.
    api_instance.datastores_datastore_id_disks_disk_id_delete(datastoreId, diskId)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDisksDiskIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required
disk_id*
UUID (uuid)
The disk id.
Required

Responses

Status: 204 - A disk removed successfully.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

datastoresDatastoreIdDisksDiskIdPut

Add a disk to the datastore.


/datastores/{datastore_id}/disks/{disk_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/datastores/{datastore_id}/disks/{disk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Add a disk to the datastore.
[apiInstance datastoresDatastoreIdDisksDiskIdPutWith:datastoreId
    diskId:diskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.

var diskId = ; // {UUID} The disk id.


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

namespace Example
{
    public class datastoresDatastoreIdDisksDiskIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.
            var diskId = new UUID(); // UUID | The disk id.

            try
            {
                // Add a disk to the datastore.
                apiInstance.datastoresDatastoreIdDisksDiskIdPut(datastoreId, diskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.datastoresDatastoreIdDisksDiskIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.
$diskId = ; // UUID | The disk id.

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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $datastoreId = ; # UUID | The datastore id.
my $diskId = ; # UUID | The disk id.

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

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
datastoreId =  # UUID | The datastore id.
diskId =  # UUID | The disk id.

try: 
    # Add a disk to the datastore.
    api_instance.datastores_datastore_id_disks_disk_id_put(datastoreId, diskId)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDisksDiskIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required
disk_id*
UUID (uuid)
The disk id.
Required

Responses

Status: 204 - A disk successfully added to the datastore.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

datastoresDatastoreIdDisksGet

Get all the disks found in the datastore.


/datastores/{datastore_id}/disks

Usage and SDK Samples

curl -X GET "http://localhost/api/datastores/{datastore_id}/disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get all the disks found in the datastore.
[apiInstance datastoresDatastoreIdDisksGetWith:datastoreId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.


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

namespace Example
{
    public class datastoresDatastoreIdDisksGetExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.

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

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

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

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

try: 
    # Get all the disks found in the datastore.
    api_response = api_instance.datastores_datastore_id_disks_get(datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 200 - A list of disks.

[{id=1111-1111-demo-node, number=0, node_id=74265909, resource_group_id=1, used=100, total=8388608, vendor=Samsung}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

datastoresDatastoreIdGet

Get a datastore.


/datastores/{datastore_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get a datastore.
[apiInstance datastoresDatastoreIdGetWith:datastoreId
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.


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

namespace Example
{
    public class datastoresDatastoreIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.

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

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

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

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

try: 
    # Get a datastore.
    api_response = api_instance.datastores_datastore_id_get(datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 200 - A datastore.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

datastoresDatastoreIdPatch

Update datastore.

Partially update a datastore. On the following scenarios, the endpoint will fail * The datastore does not exists. (404) * The name cannot be empty. (422) * When has_db_metadata is enabled but the datastore does not have enough space for the DB Metadata LUN. (422)


/datastores/{datastore_id}

Usage and SDK Samples

curl -X PATCH "http://localhost/api/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Update datastore.
[apiInstance datastoresDatastoreIdPatchWith:datastoreId
    datastore:datastore
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.

var opts = { 
  'datastore':  // {EditDatastore} The datastore to update.
};

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

namespace Example
{
    public class datastoresDatastoreIdPatchExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.
            var datastore = new EditDatastore(); // EditDatastore | The datastore to update. (optional) 

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.
$datastore = ; // EditDatastore | The datastore to update.

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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $datastoreId = ; # UUID | The datastore id.
my $datastore = WWW::SwaggerClient::Object::EditDatastore->new(); # EditDatastore | The datastore to update.

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

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
datastoreId =  # UUID | The datastore id.
datastore =  # EditDatastore | The datastore to update. (optional)

try: 
    # Update datastore.
    api_response = api_instance.datastores_datastore_id_patch(datastoreId, datastore=datastore)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdPatch: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required
Body parameters
Name Description
datastore

Responses

Status: 202 - Datastore succesfully updated.

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 occured.

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

datastoresDatastoreIdVdisksGet

Get all the virtual disks created in the datastore.


/datastores/{datastore_id}/vdisks

Usage and SDK Samples

curl -X GET "http://localhost/api/datastores/{datastore_id}/vdisks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get all the virtual disks created in the datastore.
[apiInstance datastoresDatastoreIdVdisksGetWith:datastoreId
              completionHandler: ^(array[VDisk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var datastoreId = ; // {UUID} The datastore id.


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

namespace Example
{
    public class datastoresDatastoreIdVdisksGetExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.

            try
            {
                // Get all the virtual disks created in the datastore.
                array[VDisk] result = apiInstance.datastoresDatastoreIdVdisksGet(datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.datastoresDatastoreIdVdisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.

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

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

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

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

try: 
    # Get all the virtual disks created in the datastore.
    api_response = api_instance.datastores_datastore_id_vdisks_get(datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdVdisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 200 - A list of virtual disks.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

datastoresGet

Get all the datastores.


/datastores

Usage and SDK Samples

curl -X GET "http://localhost/api/datastores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get all the datastores.
[apiInstance datastoresGetWithCompletionHandler: 
              ^(array[Datastore] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

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

namespace Example
{
    public class datastoresGetExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();

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

$api_instance = new Swagger\Client\Api\DatastoresApi();

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

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

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

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

try: 
    # Get all the datastores.
    api_response = api_instance.datastores_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of datastores.

Status: 500 - An unexpected error occured.

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

datastoresPost

Create a new datastore.

The API creates a new datastore. The following scenarios will fail * The name is empty. (422) * The name has to be less than or equal to 31 characters (422) * The name can not be 'OPENSTACK_DS' (422) * The name can not have any of these characters '= , ? \" \' \\' (422) * The replicas is 0 or lower. (422) * The overcommit is over 100. (422) * The array of disks is empty or it contains non-existed IDs (422)


/datastores

Usage and SDK Samples

curl -X POST "http://localhost/api/datastores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Create a new datastore.
[apiInstance datastoresPostWith:datastore
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DatastoresApi()

var opts = { 
  'datastore':  // {NewDatastore} The datastore to create.
};

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

namespace Example
{
    public class datastoresPostExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastore = new NewDatastore(); // NewDatastore | The datastore to create. (optional) 

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

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastore = ; // NewDatastore | The datastore to create.

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

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $datastore = WWW::SwaggerClient::Object::NewDatastore->new(); # NewDatastore | The datastore to create.

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

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
datastore =  # NewDatastore | The datastore to create. (optional)

try: 
    # Create a new datastore.
    api_response = api_instance.datastores_post(datastore=datastore)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresPost: %s\n" % e)

Parameters

Body parameters
Name Description
datastore

Responses

Status: 202 - Datastore succesfully created.

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 occured.

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

DbBackups

dbBackupsDbBackupFilenameRestorePut

Restore a DB Backup based on its filename.


/db_backups/{db_backup_filename}/restore

Usage and SDK Samples

curl -X PUT "http://localhost/api/db_backups/{db_backup_filename}/restore"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

    public static void main(String[] args) {
        
        DbBackupsApi apiInstance = new DbBackupsApi();
        String dbBackupFilename = dbBackupFilename_example; // String | The DB backup filename.
        try {
            apiInstance.dbBackupsDbBackupFilenameRestorePut(dbBackupFilename);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsDbBackupFilenameRestorePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupsApi;

public class DbBackupsApiExample {

    public static void main(String[] args) {
        DbBackupsApi apiInstance = new DbBackupsApi();
        String dbBackupFilename = dbBackupFilename_example; // String | The DB backup filename.
        try {
            apiInstance.dbBackupsDbBackupFilenameRestorePut(dbBackupFilename);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsDbBackupFilenameRestorePut");
            e.printStackTrace();
        }
    }
}
String *dbBackupFilename = dbBackupFilename_example; // The DB backup filename.

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

// Restore a DB Backup based on its filename.
[apiInstance dbBackupsDbBackupFilenameRestorePutWith:dbBackupFilename
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DbBackupsApi()

var dbBackupFilename = dbBackupFilename_example; // {String} The DB backup filename.


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

namespace Example
{
    public class dbBackupsDbBackupFilenameRestorePutExample
    {
        public void main()
        {
            
            var apiInstance = new DbBackupsApi();
            var dbBackupFilename = dbBackupFilename_example;  // String | The DB backup filename.

            try
            {
                // Restore a DB Backup based on its filename.
                apiInstance.dbBackupsDbBackupFilenameRestorePut(dbBackupFilename);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsDbBackupFilenameRestorePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DbBackupsApi();
$dbBackupFilename = dbBackupFilename_example; // String | The DB backup filename.

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

my $api_instance = WWW::SwaggerClient::DbBackupsApi->new();
my $dbBackupFilename = dbBackupFilename_example; # String | The DB backup filename.

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

# create an instance of the API class
api_instance = swagger_client.DbBackupsApi()
dbBackupFilename = dbBackupFilename_example # String | The DB backup filename.

try: 
    # Restore a DB Backup based on its filename.
    api_instance.db_backups_db_backup_filename_restore_put(dbBackupFilename)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsDbBackupFilenameRestorePut: %s\n" % e)

Parameters

Path parameters
Name Description
db_backup_filename*
String
The DB backup filename.
Required

Responses

Status: 202 - Restored successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

dbBackupsDelete

Delete DB backups.

Deletes DB backups in two ways. The first way is to wipe all DB backups from the DB Metadata LUNs. The second way is to specify upto how many days we will keep backups from. On the following scenarios, the endpoint will fail * The keep_days is less than 1 (422)


/db_backups

Usage and SDK Samples

curl -X DELETE "http://localhost/api/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

    public static void main(String[] args) {
        
        DbBackupsApi apiInstance = new DbBackupsApi();
        DbBackupsDeleteOpts dbBackupDelete = ; // DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all.
        try {
            apiInstance.dbBackupsDelete(dbBackupDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupsApi;

public class DbBackupsApiExample {

    public static void main(String[] args) {
        DbBackupsApi apiInstance = new DbBackupsApi();
        DbBackupsDeleteOpts dbBackupDelete = ; // DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all.
        try {
            apiInstance.dbBackupsDelete(dbBackupDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupsApi#dbBackupsDelete");
            e.printStackTrace();
        }
    }
}
DbBackupsDeleteOpts *dbBackupDelete = ; // Add the days of DB backups you want to keep or wipe them all. (optional)

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

// Delete DB backups.
[apiInstance dbBackupsDeleteWith:dbBackupDelete
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DbBackupsApi()

var opts = { 
  'dbBackupDelete':  // {DbBackupsDeleteOpts} Add the days of DB backups you want to keep or wipe them all.
};

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

namespace Example
{
    public class dbBackupsDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DbBackupsApi();
            var dbBackupDelete = new DbBackupsDeleteOpts(); // DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all. (optional) 

            try
            {
                // Delete DB backups.
                apiInstance.dbBackupsDelete(dbBackupDelete);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DbBackupsApi();
$dbBackupDelete = ; // DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all.

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

my $api_instance = WWW::SwaggerClient::DbBackupsApi->new();
my $dbBackupDelete = WWW::SwaggerClient::Object::DbBackupsDeleteOpts->new(); # DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all.

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

# create an instance of the API class
api_instance = swagger_client.DbBackupsApi()
dbBackupDelete =  # DbBackupsDeleteOpts | Add the days of DB backups you want to keep or wipe them all. (optional)

try: 
    # Delete DB backups.
    api_instance.db_backups_delete(dbBackupDelete=dbBackupDelete)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsDelete: %s\n" % e)

Parameters

Body parameters
Name Description
dbBackupDelete

Responses

Status: 204 - Deleted succesfully.

Status: 500 - An unexpected error occured.

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

dbBackupsGet

Get all the DB backups.


/db_backups

Usage and SDK Samples

curl -X GET "http://localhost/api/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

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

public class DbBackupsApiExample {

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

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

// Get all the DB backups.
[apiInstance dbBackupsGetWithCompletionHandler: 
              ^(array[DbBackup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DbBackupsApi()

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

namespace Example
{
    public class dbBackupsGetExample
    {
        public void main()
        {
            
            var apiInstance = new DbBackupsApi();

            try
            {
                // Get all the DB backups.
                array[DbBackup] result = apiInstance.dbBackupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DbBackupsApi();

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

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

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

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

try: 
    # Get all the DB backups.
    api_response = api_instance.db_backups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of DB backups.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

dbBackupsPost

Create a new DB backup (for testing only).


/db_backups

Usage and SDK Samples

curl -X POST "http://localhost/api/db_backups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupsApi;

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

public class DbBackupsApiExample {

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

public class DbBackupsApiExample {

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

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

// Create a new DB backup (for testing only).
[apiInstance dbBackupsPostWithCompletionHandler: 
              ^(DbBackup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DbBackupsApi()

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

namespace Example
{
    public class dbBackupsPostExample
    {
        public void main()
        {
            
            var apiInstance = new DbBackupsApi();

            try
            {
                // Create a new DB backup (for testing only).
                DbBackup result = apiInstance.dbBackupsPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupsApi.dbBackupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DbBackupsApi();

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

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

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

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

try: 
    # Create a new DB backup (for testing only).
    api_response = api_instance.db_backups_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupsApi->dbBackupsPost: %s\n" % e)

Parameters

Responses

Status: 200 - Created a new DB backup.

Status: 500 - An unexpected error occured.

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

DbMetadata

dbMetadataSyncPost

Sync the DB Metadata LUNs with the controller (for testing only).


/db_metadata/sync

Usage and SDK Samples

curl -X POST "http://localhost/api/db_metadata/sync"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbMetadataApi;

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

public class DbMetadataApiExample {

    public static void main(String[] args) {
        
        DbMetadataApi apiInstance = new DbMetadataApi();
        DbMetadataSyncOpts dbMetadataSync = ; // DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.

        try {
            apiInstance.dbMetadataSyncPost(dbMetadataSync);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbMetadataApi#dbMetadataSyncPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbMetadataApi;

public class DbMetadataApiExample {

    public static void main(String[] args) {
        DbMetadataApi apiInstance = new DbMetadataApi();
        DbMetadataSyncOpts dbMetadataSync = ; // DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.

        try {
            apiInstance.dbMetadataSyncPost(dbMetadataSync);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbMetadataApi#dbMetadataSyncPost");
            e.printStackTrace();
        }
    }
}
DbMetadataSyncOpts *dbMetadataSync = ; // Add a specific DB backup filename or/and sync all the backup files.
 (optional)

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

// Sync the DB Metadata LUNs with the controller (for testing only).
[apiInstance dbMetadataSyncPostWith:dbMetadataSync
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DbMetadataApi()

var opts = { 
  'dbMetadataSync':  // {DbMetadataSyncOpts} Add a specific DB backup filename or/and sync all the backup files.

};

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

namespace Example
{
    public class dbMetadataSyncPostExample
    {
        public void main()
        {
            
            var apiInstance = new DbMetadataApi();
            var dbMetadataSync = new DbMetadataSyncOpts(); // DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.
 (optional) 

            try
            {
                // Sync the DB Metadata LUNs with the controller (for testing only).
                apiInstance.dbMetadataSyncPost(dbMetadataSync);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbMetadataApi.dbMetadataSyncPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DbMetadataApi();
$dbMetadataSync = ; // DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.


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

my $api_instance = WWW::SwaggerClient::DbMetadataApi->new();
my $dbMetadataSync = WWW::SwaggerClient::Object::DbMetadataSyncOpts->new(); # DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.


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

# create an instance of the API class
api_instance = swagger_client.DbMetadataApi()
dbMetadataSync =  # DbMetadataSyncOpts | Add a specific DB backup filename or/and sync all the backup files.
 (optional)

try: 
    # Sync the DB Metadata LUNs with the controller (for testing only).
    api_instance.db_metadata_sync_post(dbMetadataSync=dbMetadataSync)
except ApiException as e:
    print("Exception when calling DbMetadataApi->dbMetadataSyncPost: %s\n" % e)

Parameters

Body parameters
Name Description
dbMetadataSync

Responses

Status: 200 - Synced successfully.

Status: 500 - An unexpected error occured.

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

Domain

domainGet

Get the current domain.


/domain

Usage and SDK Samples

curl -X GET "http://localhost/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();
        try {
            Domain result = apiInstance.domainGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DomainApi;

public class DomainApiExample {

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

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

// Get the current domain.
[apiInstance domainGetWithCompletionHandler: 
              ^(Domain output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DomainApi()

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

namespace Example
{
    public class domainGetExample
    {
        public void main()
        {
            
            var apiInstance = new DomainApi();

            try
            {
                // Get the current domain.
                Domain result = apiInstance.domainGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DomainApi();

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

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

eval { 
    my $result = $api_instance->domainGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DomainApi->domainGet: $@\n";
}
from __future__ import print_statement
import time
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()

try: 
    # Get the current domain.
    api_response = api_instance.domain_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DomainApi->domainGet: %s\n" % e)

Parameters

Responses

Status: 200 - The domain name. If no domain exists the response will have an empty domain name.

Status: 500 - An unexpected error occured.

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

domainPost

Add and secure a domain.

Secure the given domain with certificate and add as a configuration.


/domain

Usage and SDK Samples

curl -X POST "http://localhost/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();
        AddDomain addDomain = ; // AddDomain | The Domain name and an email used for any renewal issue.

        try {
            apiInstance.domainPost(addDomain);
        } 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();
        AddDomain addDomain = ; // AddDomain | The Domain name and an email used for any renewal issue.

        try {
            apiInstance.domainPost(addDomain);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainPost");
            e.printStackTrace();
        }
    }
}
AddDomain *addDomain = ; // The Domain name and an email used for any renewal issue.


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

// Add and secure a domain.
[apiInstance domainPostWith:addDomain
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DomainApi()

var addDomain = ; // {AddDomain} The Domain name and an email used for any renewal issue.



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainPost(addDomain, 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 addDomain = new AddDomain(); // AddDomain | The Domain name and an email used for any renewal issue.


            try
            {
                // Add and secure a domain.
                apiInstance.domainPost(addDomain);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DomainApi();
$addDomain = ; // AddDomain | The Domain name and an email used for any renewal issue.


try {
    $api_instance->domainPost($addDomain);
} 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 $addDomain = WWW::SwaggerClient::Object::AddDomain->new(); # AddDomain | The Domain name and an email used for any renewal issue.


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

# create an instance of the API class
api_instance = swagger_client.DomainApi()
addDomain =  # AddDomain | The Domain name and an email used for any renewal issue.


try: 
    # Add and secure a domain.
    api_instance.domain_post(addDomain)
except ApiException as e:
    print("Exception when calling DomainApi->domainPost: %s\n" % e)

Parameters

Body parameters
Name Description
addDomain *

Responses

Status: 202 - Successfully initiated adding and securing the domain

Status: 500 - Could not decrypt the message

{code=500, message=crypto/rsa decryption error.}

Flavors

flavorsFlavorIdDelete

Delete the flavor.


/flavors/{flavor_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/flavors/{flavor_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        UUID flavorId = ; // UUID | The flavor id.
        try {
            apiInstance.flavorsFlavorIdDelete(flavorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsFlavorIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        UUID flavorId = ; // UUID | The flavor id.
        try {
            apiInstance.flavorsFlavorIdDelete(flavorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsFlavorIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *flavorId = ; // The flavor id.

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

// Delete the flavor.
[apiInstance flavorsFlavorIdDeleteWith:flavorId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.FlavorsApi()

var flavorId = ; // {UUID} The flavor id.


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

namespace Example
{
    public class flavorsFlavorIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new FlavorsApi();
            var flavorId = new UUID(); // UUID | The flavor id.

            try
            {
                // Delete the flavor.
                apiInstance.flavorsFlavorIdDelete(flavorId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.flavorsFlavorIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FlavorsApi();
$flavorId = ; // UUID | The flavor id.

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

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $flavorId = ; # UUID | The flavor id.

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

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
flavorId =  # UUID | The flavor id.

try: 
    # Delete the flavor.
    api_instance.flavors_flavor_id_delete(flavorId)
except ApiException as e:
    print("Exception when calling FlavorsApi->flavorsFlavorIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
flavor_id*
UUID (uuid)
The flavor id.
Required

Responses

Status: 204 - Flavor successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

flavorsFlavorIdGet

Get the flavor.


/flavors/{flavor_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/flavors/{flavor_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        UUID flavorId = ; // UUID | The flavor id.
        try {
            Flavor result = apiInstance.flavorsFlavorIdGet(flavorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsFlavorIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        UUID flavorId = ; // UUID | The flavor id.
        try {
            Flavor result = apiInstance.flavorsFlavorIdGet(flavorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsFlavorIdGet");
            e.printStackTrace();
        }
    }
}
UUID *flavorId = ; // The flavor id.

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

// Get the flavor.
[apiInstance flavorsFlavorIdGetWith:flavorId
              completionHandler: ^(Flavor output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.FlavorsApi()

var flavorId = ; // {UUID} The flavor id.


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

namespace Example
{
    public class flavorsFlavorIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new FlavorsApi();
            var flavorId = new UUID(); // UUID | The flavor id.

            try
            {
                // Get the flavor.
                Flavor result = apiInstance.flavorsFlavorIdGet(flavorId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.flavorsFlavorIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FlavorsApi();
$flavorId = ; // UUID | The flavor id.

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

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $flavorId = ; # UUID | The flavor id.

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

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
flavorId =  # UUID | The flavor id.

try: 
    # Get the flavor.
    api_response = api_instance.flavors_flavor_id_get(flavorId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->flavorsFlavorIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
flavor_id*
UUID (uuid)
The flavor id.
Required

Responses

Status: 200 - Shows the flavor.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

flavorsGet

Get the list of flavors.


/flavors

Usage and SDK Samples

curl -X GET "http://localhost/api/flavors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

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

public class FlavorsApiExample {

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

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

// Get the list of flavors.
[apiInstance flavorsGetWithCompletionHandler: 
              ^(array[Flavor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.FlavorsApi()

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

namespace Example
{
    public class flavorsGetExample
    {
        public void main()
        {
            
            var apiInstance = new FlavorsApi();

            try
            {
                // Get the list of flavors.
                array[Flavor] result = apiInstance.flavorsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.flavorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FlavorsApi();

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

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

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

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

try: 
    # Get the list of flavors.
    api_response = api_instance.flavors_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->flavorsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of flavors.

Status: 500 - An unexpected error occured.

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

flavorsPost

Create the flavor.

The following scenarios will fail with a validation error * Memory must be over 0 (422) * VCPUs must be over 0 (422) * Flavor with the same name exists already (422)


/flavors

Usage and SDK Samples

curl -X POST "http://localhost/api/flavors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FlavorsApi;

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        NewFlavor flavor = ; // NewFlavor | The flavor to create.
        try {
            Flavor result = apiInstance.flavorsPost(flavor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        NewFlavor flavor = ; // NewFlavor | The flavor to create.
        try {
            Flavor result = apiInstance.flavorsPost(flavor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsPost");
            e.printStackTrace();
        }
    }
}
NewFlavor *flavor = ; // The flavor to create. (optional)

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

// Create the flavor.
[apiInstance flavorsPostWith:flavor
              completionHandler: ^(Flavor output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.FlavorsApi()

var opts = { 
  'flavor':  // {NewFlavor} The flavor to create.
};

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

namespace Example
{
    public class flavorsPostExample
    {
        public void main()
        {
            
            var apiInstance = new FlavorsApi();
            var flavor = new NewFlavor(); // NewFlavor | The flavor to create. (optional) 

            try
            {
                // Create the flavor.
                Flavor result = apiInstance.flavorsPost(flavor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.flavorsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FlavorsApi();
$flavor = ; // NewFlavor | The flavor to create.

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

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $flavor = WWW::SwaggerClient::Object::NewFlavor->new(); # NewFlavor | The flavor to create.

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

# create an instance of the API class
api_instance = swagger_client.FlavorsApi()
flavor =  # NewFlavor | The flavor to create. (optional)

try: 
    # Create the flavor.
    api_response = api_instance.flavors_post(flavor=flavor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->flavorsPost: %s\n" % e)

Parameters

Body parameters
Name Description
flavor

Responses

Status: 201 - Flavor is successfully created.

Status: 500 - An unexpected error occured.

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

Images

imagesGet

Get list of images.


/images

Usage and SDK Samples

curl -X GET "http://localhost/api/images"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

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

public class ImagesApiExample {

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

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

// Get list of images.
[apiInstance imagesGetWithCompletionHandler: 
              ^(array[InstanceImage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

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

namespace Example
{
    public class imagesGetExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();

            try
            {
                // Get list of images.
                array[InstanceImage] result = apiInstance.imagesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();

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

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

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

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

try: 
    # Get list of images.
    api_response = api_instance.images_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of images.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

imagesImageIdDelete

Delete an image.


/images/{image_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDelete(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDelete(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.

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

// Delete an image.
[apiInstance imagesImageIdDeleteWith:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.


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

namespace Example
{
    public class imagesImageIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.

            try
            {
                // Delete an image.
                apiInstance.imagesImageIdDelete(imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.

try: 
    # Delete an image.
    api_instance.images_image_id_delete(imageId)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required

Responses

Status: 204 - Image successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

imagesImageIdDisablePut

Disable a local template.

Disable a local template in order to not be visible from the instance creation. The following scenarios will result in a *failed* response * The image is in error state (422) * The image is in downloading state (422)


/images/{image_id}/disable

Usage and SDK Samples

curl -X PUT "http://localhost/api/images/{image_id}/disable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDisablePut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDisablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDisablePut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDisablePut");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.

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

// Disable a local template.
[apiInstance imagesImageIdDisablePutWith:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.


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

namespace Example
{
    public class imagesImageIdDisablePutExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.

            try
            {
                // Disable a local template.
                apiInstance.imagesImageIdDisablePut(imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdDisablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.

try: 
    # Disable a local template.
    api_instance.images_image_id_disable_put(imageId)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdDisablePut: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required

Responses

Status: 202 - Image disabled successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

imagesImageIdDownloadPut

Download template image from server.

Download the template image that exists on public server. The following scenarios will result in a *failed* response: * The image does not exist on server (404) * The image exists locally (422)


/images/{image_id}/download

Usage and SDK Samples

curl -X PUT "http://localhost/api/images/{image_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDownloadPut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdDownloadPut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.

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

// Download template image from server.
[apiInstance imagesImageIdDownloadPutWith:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.


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

namespace Example
{
    public class imagesImageIdDownloadPutExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.

            try
            {
                // Download template image from server.
                apiInstance.imagesImageIdDownloadPut(imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.

try: 
    # Download template image from server.
    api_instance.images_image_id_download_put(imageId)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required

Responses

Status: 202 - Image downloaded successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

imagesImageIdEnablePut

Enable a local template.

Enable a local template in order to be visible from the instance creation. The following scenarios will result in a *failed* response * The image does not exist locally(404) * The image is in error state(422) * The image is in downloading state(422)


/images/{image_id}/enable

Usage and SDK Samples

curl -X PUT "http://localhost/api/images/{image_id}/enable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdEnablePut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdEnablePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            apiInstance.imagesImageIdEnablePut(imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdEnablePut");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.

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

// Enable a local template.
[apiInstance imagesImageIdEnablePutWith:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.


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

namespace Example
{
    public class imagesImageIdEnablePutExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.

            try
            {
                // Enable a local template.
                apiInstance.imagesImageIdEnablePut(imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdEnablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.

try: 
    # Enable a local template.
    api_instance.images_image_id_enable_put(imageId)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdEnablePut: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required

Responses

Status: 202 - Image enabled successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

imagesImageIdGet

Get an image.


/images/{image_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            InstanceImage result = apiInstance.imagesImageIdGet(imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        try {
            InstanceImage result = apiInstance.imagesImageIdGet(imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdGet");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.

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

// Get an image.
[apiInstance imagesImageIdGetWith:imageId
              completionHandler: ^(InstanceImage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.


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

namespace Example
{
    public class imagesImageIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.

            try
            {
                // Get an image.
                InstanceImage result = apiInstance.imagesImageIdGet(imageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.

try: 
    # Get an image.
    api_response = api_instance.images_image_id_get(imageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required

Responses

Status: 200 - Succesfully got an image.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

imagesImageIdRenamePut

Rename an existingimage.

Updates the friendly name of an existing image record.


/images/{image_id}/rename

Usage and SDK Samples

curl -X PUT "http://localhost/api/images/{image_id}/rename"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        RenameImage file = ; // RenameImage | 
        try {
            InstanceImage result = apiInstance.imagesImageIdRenamePut(imageId, file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdRenamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        RenameImage file = ; // RenameImage | 
        try {
            InstanceImage result = apiInstance.imagesImageIdRenamePut(imageId, file);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdRenamePut");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.
RenameImage *file = ; //  (optional)

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

// Rename an existingimage.
[apiInstance imagesImageIdRenamePutWith:imageId
    file:file
              completionHandler: ^(InstanceImage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.

var opts = { 
  'file':  // {RenameImage} 
};

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

namespace Example
{
    public class imagesImageIdRenamePutExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.
            var file = new RenameImage(); // RenameImage |  (optional) 

            try
            {
                // Rename an existingimage.
                InstanceImage result = apiInstance.imagesImageIdRenamePut(imageId, file);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdRenamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.
$file = ; // RenameImage | 

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.
my $file = WWW::SwaggerClient::Object::RenameImage->new(); # RenameImage | 

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.
file =  # RenameImage |  (optional)

try: 
    # Rename an existingimage.
    api_response = api_instance.images_image_id_rename_put(imageId, file=file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdRenamePut: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required
Body parameters
Name Description
file

Responses

Status: 200 - Succesfully rename the image.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

imagesImageIdUploadPost

Upload an image file.

Uploads binary image data for the specific image record.


/images/{image_id}/upload

Usage and SDK Samples

curl -X POST "http://localhost/api/images/{image_id}/upload"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        File file = /path/to/file.txt; // File | The uploaded file data
        try {
            apiInstance.imagesImageIdUploadPost(imageId, file);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdUploadPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        Integer imageId = 56; // Integer | The image id.
        File file = /path/to/file.txt; // File | The uploaded file data
        try {
            apiInstance.imagesImageIdUploadPost(imageId, file);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesImageIdUploadPost");
            e.printStackTrace();
        }
    }
}
Integer *imageId = 56; // The image id.
File *file = /path/to/file.txt; // The uploaded file data

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

// Upload an image file.
[apiInstance imagesImageIdUploadPostWith:imageId
    file:file
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var imageId = 56; // {Integer} The image id.

var file = /path/to/file.txt; // {File} The uploaded file data


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

namespace Example
{
    public class imagesImageIdUploadPostExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var imageId = 56;  // Integer | The image id.
            var file = new File(); // File | The uploaded file data

            try
            {
                // Upload an image file.
                apiInstance.imagesImageIdUploadPost(imageId, file);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesImageIdUploadPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$imageId = 56; // Integer | The image id.
$file = /path/to/file.txt; // File | The uploaded file data

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $imageId = 56; # Integer | The image id.
my $file = /path/to/file.txt; # File | The uploaded file data

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
imageId = 56 # Integer | The image id.
file = /path/to/file.txt # File | The uploaded file data

try: 
    # Upload an image file.
    api_instance.images_image_id_upload_post(imageId, file)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesImageIdUploadPost: %s\n" % e)

Parameters

Path parameters
Name Description
image_id*
Integer (uint)
The image id.
Required
Form parameters
Name Description
file*
File
The uploaded file data
Required

Responses

Status: 202 - Succesfully uploaded the file.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

imagesPost

Create an image.

Creates a catalog record for an operating system disk image. The following update scenarios will fail with a validation error (422) * If filename is empty will fail. * If container_format is empty will fail. * If disk_format is empty will fail. * If os_version is empty will fail. * If os_distro is empty will fail. * If provider is empty will fail. * If location is empty will fail. * If architecture is empty will fail. * If cluster_type is empty or it does not exist, will fail.


/images

Usage and SDK Samples

curl -X POST "http://localhost/api/images"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        
        ImagesApi apiInstance = new ImagesApi();
        NewInstanceImage image = ; // NewInstanceImage | The image to create.
        try {
            InstanceImage result = apiInstance.imagesPost(image);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        NewInstanceImage image = ; // NewInstanceImage | The image to create.
        try {
            InstanceImage result = apiInstance.imagesPost(image);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#imagesPost");
            e.printStackTrace();
        }
    }
}
NewInstanceImage *image = ; // The image to create. (optional)

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

// Create an image.
[apiInstance imagesPostWith:image
              completionHandler: ^(InstanceImage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

var opts = { 
  'image':  // {NewInstanceImage} The image to create.
};

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

namespace Example
{
    public class imagesPostExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();
            var image = new NewInstanceImage(); // NewInstanceImage | The image to create. (optional) 

            try
            {
                // Create an image.
                InstanceImage result = apiInstance.imagesPost(image);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();
$image = ; // NewInstanceImage | The image to create.

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

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $image = WWW::SwaggerClient::Object::NewInstanceImage->new(); # NewInstanceImage | The image to create.

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

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
image =  # NewInstanceImage | The image to create. (optional)

try: 
    # Create an image.
    api_response = api_instance.images_post(image=image)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImagesApi->imagesPost: %s\n" % e)

Parameters

Body parameters
Name Description
image

Responses

Status: 201 - Image succesfully created.

Status: 400 - Image couldn't have been created.

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 occured.

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

imagesPut

Refresh template list from the repo.

Refresh the template list from the repo. The following scenarios will result in a *failed* response:


/images

Usage and SDK Samples

curl -X PUT "http://localhost/api/images"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

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

public class ImagesApiExample {

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

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

// Refresh template list from the repo.
[apiInstance imagesPutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ImagesApi()

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

namespace Example
{
    public class imagesPutExample
    {
        public void main()
        {
            
            var apiInstance = new ImagesApi();

            try
            {
                // Refresh template list from the repo.
                apiInstance.imagesPut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.imagesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ImagesApi();

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

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

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

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

try: 
    # Refresh template list from the repo.
    api_instance.images_put()
except ApiException as e:
    print("Exception when calling ImagesApi->imagesPut: %s\n" % e)

Parameters

Responses

Status: 202 - Images refreshed successfully.

Status: 500 - An unexpected error occured.

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

Instances

instancesInstanceIdAttachCdromPut

Attach a CD-ROM to the instance.

The following scenarios will result in a *failed* response * The instance does not exists (404) * There is not enough space for the CD-ROM in the datastore (422) * The image is not in 'iso' disk format (422)


/instances/{instance_id}/attach_cdrom

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/attach_cdrom"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceCDROMAttachment instance = ; // InstanceCDROMAttachment | The instance to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdAttachCdromPut(instanceId, instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdAttachCdromPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceCDROMAttachment instance = ; // InstanceCDROMAttachment | The instance to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdAttachCdromPut(instanceId, instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdAttachCdromPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
InstanceCDROMAttachment *instance = ; // The instance to attach. (optional)

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

// Attach a CD-ROM to the instance.
[apiInstance instancesInstanceIdAttachCdromPutWith:instanceId
    instance:instance
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'instance':  // {InstanceCDROMAttachment} The instance to attach.
};

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

namespace Example
{
    public class instancesInstanceIdAttachCdromPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var instance = new InstanceCDROMAttachment(); // InstanceCDROMAttachment | The instance to attach. (optional) 

            try
            {
                // Attach a CD-ROM to the instance.
                Instance result = apiInstance.instancesInstanceIdAttachCdromPut(instanceId, instance);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdAttachCdromPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$instance = ; // InstanceCDROMAttachment | The instance to attach.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $instance = WWW::SwaggerClient::Object::InstanceCDROMAttachment->new(); # InstanceCDROMAttachment | The instance to attach.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
instance =  # InstanceCDROMAttachment | The instance to attach. (optional)

try: 
    # Attach a CD-ROM to the instance.
    api_response = api_instance.instances_instance_id_attach_cdrom_put(instanceId, instance=instance)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdAttachCdromPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
instance

Responses

Status: 202 - The CD-ROM attached.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdCredentialsGet

Get the username and password to login into the instance via SSH or VNC.


/instances/{instance_id}/credentials

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/credentials"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            InstanceRootCredentials result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            InstanceRootCredentials result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Get the username and password to login into the instance via SSH or VNC.

[apiInstance instancesInstanceIdCredentialsGetWith:instanceId
              completionHandler: ^(InstanceRootCredentials output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdCredentialsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Get the username and password to login into the instance via SSH or VNC.

                InstanceRootCredentials result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCredentialsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Get the username and password to login into the instance via SSH or VNC.

    api_response = api_instance.instances_instance_id_credentials_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCredentialsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - Instance's username and password.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdCredentialsPut

Update the credentials of the instance with a new random password.

Upon hitting this endpoint, given no errors, a new password will be *generated* and set as the new password of the instance. The following scenarios will result in a *failed* response * The instance does not exists. (404) * The instance is not shutdown. (422)


/instances/{instance_id}/credentials

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/credentials"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdCredentialsPut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdCredentialsPut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdCredentialsPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Update the credentials of the instance with a new random password.
[apiInstance instancesInstanceIdCredentialsPutWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdCredentialsPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Update the credentials of the instance with a new random password.
                apiInstance.instancesInstanceIdCredentialsPut(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCredentialsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Update the credentials of the instance with a new random password.
    api_instance.instances_instance_id_credentials_put(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCredentialsPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 202 - The root password is updated succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdDemotePut

Demote the instance from manager to worker.

This action is applicable on a *manager* instance that belongs in a *docker swarm* cluster. On success, the instance will be transformed to a *worker* instance. The following scenarios will result in a *failed* response * The instance does not exists (404) * The instance is not in a cluster (422) * The instance is not in a cluster with cluster type 'swarm' (422) * The instance is not active (422) * The instance is not a manager (422) * The instance is the leader (422)


/instances/{instance_id}/demote

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/demote"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdDemotePut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDemotePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdDemotePut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDemotePut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Demote the instance from manager to worker.
[apiInstance instancesInstanceIdDemotePutWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdDemotePutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Demote the instance from manager to worker.
                apiInstance.instancesInstanceIdDemotePut(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdDemotePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Demote the instance from manager to worker.
    api_instance.instances_instance_id_demote_put(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdDemotePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 202 - Docker demoted succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdDetachCdromPut

Detaches the CD-ROM from the instance.

The following scenarios will result in a *failed* response: * The instance does not exists (404) * The instance does not contain a CD-ROM (422)


/instances/{instance_id}/detach_cdrom

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/detach_cdrom"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdDetachCdromPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDetachCdromPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdDetachCdromPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdDetachCdromPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Detaches the CD-ROM from the instance.
[apiInstance instancesInstanceIdDetachCdromPutWith:instanceId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdDetachCdromPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Detaches the CD-ROM from the instance.
                Instance result = apiInstance.instancesInstanceIdDetachCdromPut(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdDetachCdromPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Detaches the CD-ROM from the instance.
    api_response = api_instance.instances_instance_id_detach_cdrom_put(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdDetachCdromPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 202 - The CD-ROM detached.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdInterfacesGet

Return the list of virtual network interfaces attached to the instance.

Return the list of virtual network interfaces attached to the instance. The action will fail on these scenarios * The instance does not exist. (404)


/instances/{instance_id}/interfaces

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/interfaces"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.instancesInstanceIdInterfacesGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.instancesInstanceIdInterfacesGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Return the list of virtual network interfaces attached to the instance.

[apiInstance instancesInstanceIdInterfacesGetWith:instanceId
              completionHandler: ^(array[VirtualNetworkInterface] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdInterfacesGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Return the list of virtual network interfaces attached to the instance.

                array[VirtualNetworkInterface] result = apiInstance.instancesInstanceIdInterfacesGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Return the list of virtual network interfaces attached to the instance.

    api_response = api_instance.instances_instance_id_interfaces_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - A list of virtual network interfaces.

[{id=1, network_id=10, ip=100.100.36.19, mac=fa:16:3e:78:12:a8, instance_id=19, vif=1}, {id=2, network_id=12, ip=100.200.0.200, mac=fe80:9e4e:3e96:78:12:a8, vif=2}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdInterfacesInterfaceIdDelete

Remove a virtual interface from an instance based on their IDs.

Remove a virtual interface from an instance based on their IDs. It can remove all the interfaces. The action will fail on these scenarios: * The instance does not exist. (404) * The interface does not exist. (404)


/instances/{instance_id}/interfaces/{interface_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/instances/{instance_id}/interfaces/{interface_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        try {
            apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        try {
            apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Integer *interfaceId = 56; // The interface id.

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

// Remove a virtual interface from an instance based on their IDs.
[apiInstance instancesInstanceIdInterfacesInterfaceIdDeleteWith:instanceId
    interfaceId:interfaceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var interfaceId = 56; // {Integer} The interface id.


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

namespace Example
{
    public class instancesInstanceIdInterfacesInterfaceIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var interfaceId = 56;  // Integer | The interface id.

            try
            {
                // Remove a virtual interface from an instance based on their IDs.
                apiInstance.instancesInstanceIdInterfacesInterfaceIdDelete(instanceId, interfaceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesInterfaceIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$interfaceId = 56; // Integer | The interface id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $interfaceId = 56; # Integer | The interface id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
interfaceId = 56 # Integer | The interface id.

try: 
    # Remove a virtual interface from an instance based on their IDs.
    api_instance.instances_instance_id_interfaces_interface_id_delete(instanceId, interfaceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
interface_id*
Integer (uint)
The interface id.
Required

Responses

Status: 204 - The interface was removed successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdInterfacesInterfaceIdGet

Return a network interface attached to an instance based on their IDs.

Return a network interface attached to an instance based on their IDs. The action will fail on these scenarios * The instance does not exist. (404) * The interface does not exist. (404)


/instances/{instance_id}/interfaces/{interface_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/interfaces/{interface_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdGet(instanceId, interfaceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdGet(instanceId, interfaceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Integer *interfaceId = 56; // The interface id.

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

// Return a network interface attached to an instance based on their IDs.

[apiInstance instancesInstanceIdInterfacesInterfaceIdGetWith:instanceId
    interfaceId:interfaceId
              completionHandler: ^(VirtualNetworkInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var interfaceId = 56; // {Integer} The interface id.


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

namespace Example
{
    public class instancesInstanceIdInterfacesInterfaceIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var interfaceId = 56;  // Integer | The interface id.

            try
            {
                // Return a network interface attached to an instance based on their IDs.

                VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdGet(instanceId, interfaceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesInterfaceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$interfaceId = 56; // Integer | The interface id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $interfaceId = 56; # Integer | The interface id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
interfaceId = 56 # Integer | The interface id.

try: 
    # Return a network interface attached to an instance based on their IDs.

    api_response = api_instance.instances_instance_id_interfaces_interface_id_get(instanceId, interfaceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
interface_id*
Integer (uint)
The interface id.
Required

Responses

Status: 200 - The interface.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdInterfacesInterfaceIdPut

Update the IP of an interface.

Update the IP of an interface. The action will fail on these scenarios * The instance does not exist. (404) * The interface does not exist. (404) * The instance is not shutdown. (422) * The IP is empty. (422) * The IP is not in a valid format. (422) * The IP is not in the range of IPs based on the network. (422) * The IP is taken by another instance. (422) * The IP of the interface can not be changed if the network is external DHCP. (422)


/instances/{instance_id}/interfaces/{interface_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/interfaces/{interface_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        UpdateVirtualNetworkInterface updateInterface = ; // UpdateVirtualNetworkInterface | The new IP of the interface.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPut(instanceId, interfaceId, updateInterface);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer interfaceId = 56; // Integer | The interface id.
        UpdateVirtualNetworkInterface updateInterface = ; // UpdateVirtualNetworkInterface | The new IP of the interface.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPut(instanceId, interfaceId, updateInterface);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesInterfaceIdPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Integer *interfaceId = 56; // The interface id.
UpdateVirtualNetworkInterface *updateInterface = ; // The new IP of the interface. (optional)

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

// Update the IP of an interface.
[apiInstance instancesInstanceIdInterfacesInterfaceIdPutWith:instanceId
    interfaceId:interfaceId
    updateInterface:updateInterface
              completionHandler: ^(VirtualNetworkInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var interfaceId = 56; // {Integer} The interface id.

var opts = { 
  'updateInterface':  // {UpdateVirtualNetworkInterface} The new IP of the interface.
};

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

namespace Example
{
    public class instancesInstanceIdInterfacesInterfaceIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var interfaceId = 56;  // Integer | The interface id.
            var updateInterface = new UpdateVirtualNetworkInterface(); // UpdateVirtualNetworkInterface | The new IP of the interface. (optional) 

            try
            {
                // Update the IP of an interface.
                VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesInterfaceIdPut(instanceId, interfaceId, updateInterface);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesInterfaceIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$interfaceId = 56; // Integer | The interface id.
$updateInterface = ; // UpdateVirtualNetworkInterface | The new IP of the interface.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $interfaceId = 56; # Integer | The interface id.
my $updateInterface = WWW::SwaggerClient::Object::UpdateVirtualNetworkInterface->new(); # UpdateVirtualNetworkInterface | The new IP of the interface.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
interfaceId = 56 # Integer | The interface id.
updateInterface =  # UpdateVirtualNetworkInterface | The new IP of the interface. (optional)

try: 
    # Update the IP of an interface.
    api_response = api_instance.instances_instance_id_interfaces_interface_id_put(instanceId, interfaceId, updateInterface=updateInterface)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesInterfaceIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
interface_id*
Integer (uint)
The interface id.
Required
Body parameters
Name Description
updateInterface

Responses

Status: 200 - The updated interface.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdInterfacesPost

Attach new network interface to the instance.

Attach new network interface to the instance. The action will fail on these scenarios * The instance does not exist. (404). * The network_id does not exist (422). * The network_id is not in the resource group of the instance. (422) * The instance is not shutdown. (422).


/instances/{instance_id}/interfaces

Usage and SDK Samples

curl -X POST "http://localhost/api/instances/{instance_id}/interfaces"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        NewVirtualNetworkInterface newInterface = ; // NewVirtualNetworkInterface | The new interface.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesPost(instanceId, newInterface);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        NewVirtualNetworkInterface newInterface = ; // NewVirtualNetworkInterface | The new interface.
        try {
            VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesPost(instanceId, newInterface);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInterfacesPost");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
NewVirtualNetworkInterface *newInterface = ; // The new interface. (optional)

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

// Attach new network interface to the instance.
[apiInstance instancesInstanceIdInterfacesPostWith:instanceId
    newInterface:newInterface
              completionHandler: ^(VirtualNetworkInterface output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'newInterface':  // {NewVirtualNetworkInterface} The new interface.
};

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

namespace Example
{
    public class instancesInstanceIdInterfacesPostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var newInterface = new NewVirtualNetworkInterface(); // NewVirtualNetworkInterface | The new interface. (optional) 

            try
            {
                // Attach new network interface to the instance.
                VirtualNetworkInterface result = apiInstance.instancesInstanceIdInterfacesPost(instanceId, newInterface);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInterfacesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$newInterface = ; // NewVirtualNetworkInterface | The new interface.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $newInterface = WWW::SwaggerClient::Object::NewVirtualNetworkInterface->new(); # NewVirtualNetworkInterface | The new interface.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
newInterface =  # NewVirtualNetworkInterface | The new interface. (optional)

try: 
    # Attach new network interface to the instance.
    api_response = api_instance.instances_instance_id_interfaces_post(instanceId, newInterface=newInterface)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInterfacesPost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
newInterface

Responses

Status: 200 - The new interface.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdLogsGet

Return the logs of the specified instance

Return the list of the Logs of the specified instance.


/instances/{instance_id}/logs

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/logs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[InstanceLog] result = apiInstance.instancesInstanceIdLogsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdLogsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[InstanceLog] result = apiInstance.instancesInstanceIdLogsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdLogsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Return the logs of the specified instance
[apiInstance instancesInstanceIdLogsGetWith:instanceId
              completionHandler: ^(array[InstanceLog] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdLogsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Return the logs of the specified instance
                array[InstanceLog] result = apiInstance.instancesInstanceIdLogsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdLogsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Return the logs of the specified instance
    api_response = api_instance.instances_instance_id_logs_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdLogsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - A list of Instance Logs.

Status: 500 - An unexpected error occured.

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

instancesInstanceIdMigrateNexvisorsGet

Return the list of Nexvisors that can accomodate the instance.

Return the list of Nexvisors that can accomodate the migration of the instance on the same resource group. Also includes the state of the storage optimization it will have. The process will fail on these scenarios * the instance is already on the node (422). * the node is not active (422). * the node does not have enough memory to migrate the instance (422). * the resource group does not have enough cores from node (422).


/instances/{instance_id}/migrate/nexvisors

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/migrate/nexvisors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[PossibleNexvisorForMigration] result = apiInstance.instancesInstanceIdMigrateNexvisorsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigrateNexvisorsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            array[PossibleNexvisorForMigration] result = apiInstance.instancesInstanceIdMigrateNexvisorsGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigrateNexvisorsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Return the list of Nexvisors that can accomodate the instance.
[apiInstance instancesInstanceIdMigrateNexvisorsGetWith:instanceId
              completionHandler: ^(array[PossibleNexvisorForMigration] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdMigrateNexvisorsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Return the list of Nexvisors that can accomodate the instance.
                array[PossibleNexvisorForMigration] result = apiInstance.instancesInstanceIdMigrateNexvisorsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMigrateNexvisorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Return the list of Nexvisors that can accomodate the instance.
    api_response = api_instance.instances_instance_id_migrate_nexvisors_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMigrateNexvisorsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - A list of possible Nexvisors for migration

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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

instancesInstanceIdMigratePut

Migrate an instance

The migration will fail on these scenarios * the nexvisor does not exist in the group (422). * the instance is not in the state of 'active' or 'shutdown' (422).


/instances/{instance_id}/migrate

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/migrate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceMigration instance = ; // InstanceMigration | The instance to migrate.
        try {
            apiInstance.instancesInstanceIdMigratePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigratePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceMigration instance = ; // InstanceMigration | The instance to migrate.
        try {
            apiInstance.instancesInstanceIdMigratePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMigratePut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
InstanceMigration *instance = ; // The instance to migrate. (optional)

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

// Migrate an instance
[apiInstance instancesInstanceIdMigratePutWith:instanceId
    instance:instance
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'instance':  // {InstanceMigration} The instance to migrate.
};

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

namespace Example
{
    public class instancesInstanceIdMigratePutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var instance = new InstanceMigration(); // InstanceMigration | The instance to migrate. (optional) 

            try
            {
                // Migrate an instance
                apiInstance.instancesInstanceIdMigratePut(instanceId, instance);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMigratePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$instance = ; // InstanceMigration | The instance to migrate.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $instance = WWW::SwaggerClient::Object::InstanceMigration->new(); # InstanceMigration | The instance to migrate.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
instance =  # InstanceMigration | The instance to migrate. (optional)

try: 
    # Migrate an instance
    api_instance.instances_instance_id_migrate_put(instanceId, instance=instance)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMigratePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
instance

Responses

Status: 202 - Instance migrated succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdPcidevsDelete

Detach PCI devices from the instance.

The following scenarios will result in a *failed* response * The instance does not exist (404) * A PCI device is not attached to the instance (500) * The instance is not in SHUTOFF state (500)


/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X DELETE "http://localhost/api/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        PCIDevsArray ids = ; // PCIDevsArray | The PCI devices to detach.
        try {
            Instance result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        PCIDevsArray ids = ; // PCIDevsArray | The PCI devices to detach.
        try {
            Instance result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
PCIDevsArray *ids = ; // The PCI devices to detach.

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

// Detach PCI devices from the instance.
[apiInstance instancesInstanceIdPcidevsDeleteWith:instanceId
    ids:ids
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var ids = ; // {PCIDevsArray} The PCI devices to detach.


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

namespace Example
{
    public class instancesInstanceIdPcidevsDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var ids = new PCIDevsArray(); // PCIDevsArray | The PCI devices to detach.

            try
            {
                // Detach PCI devices from the instance.
                Instance result = apiInstance.instancesInstanceIdPcidevsDelete(instanceId, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPcidevsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$ids = ; // PCIDevsArray | The PCI devices to detach.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $ids = WWW::SwaggerClient::Object::PCIDevsArray->new(); # PCIDevsArray | The PCI devices to detach.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
ids =  # PCIDevsArray | The PCI devices to detach.

try: 
    # Detach PCI devices from the instance.
    api_response = api_instance.instances_instance_id_pcidevs_delete(instanceId, ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPcidevsDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
ids *

Responses

Status: 200 - The instance

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

instancesInstanceIdPcidevsGet

Return the list of PCI devices either attached or available and compatible to be attached to the instance.

Return the list of PCI devices either attached or available and compatible to be attached to the instance. The action will fail on these scenarios * The instance does not exist. (404)


/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/pcidevs?get_unassigned_compatible="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Boolean getUnassignedCompatible = true; // Boolean | Available and compatible PCI devices
        try {
            array[PCIDev] result = apiInstance.instancesInstanceIdPcidevsGet(instanceId, getUnassignedCompatible);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Boolean getUnassignedCompatible = true; // Boolean | Available and compatible PCI devices
        try {
            array[PCIDev] result = apiInstance.instancesInstanceIdPcidevsGet(instanceId, getUnassignedCompatible);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Boolean *getUnassignedCompatible = true; // Available and compatible PCI devices (optional)

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

// Return the list of PCI devices either attached or available and compatible to be attached to the instance.
[apiInstance instancesInstanceIdPcidevsGetWith:instanceId
    getUnassignedCompatible:getUnassignedCompatible
              completionHandler: ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'getUnassignedCompatible': true // {Boolean} Available and compatible PCI devices
};

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

namespace Example
{
    public class instancesInstanceIdPcidevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var getUnassignedCompatible = true;  // Boolean | Available and compatible PCI devices (optional) 

            try
            {
                // Return the list of PCI devices either attached or available and compatible to be attached to the instance.
                array[PCIDev] result = apiInstance.instancesInstanceIdPcidevsGet(instanceId, getUnassignedCompatible);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPcidevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$getUnassignedCompatible = true; // Boolean | Available and compatible PCI devices

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $getUnassignedCompatible = true; # Boolean | Available and compatible PCI devices

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
getUnassignedCompatible = true # Boolean | Available and compatible PCI devices (optional)

try: 
    # Return the list of PCI devices either attached or available and compatible to be attached to the instance.
    api_response = api_instance.instances_instance_id_pcidevs_get(instanceId, getUnassignedCompatible=getUnassignedCompatible)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPcidevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Query parameters
Name Description
get_unassigned_compatible
Boolean
Available and compatible PCI devices

Responses

Status: 200 - A list of PCI devices.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

instancesInstanceIdPcidevsPost

Attach PCI devices to the instance.

The following scenarios will result in a *failed* response * The instance does not exist (404) * The PCI device does not exist (422) * A PCI device is reserved (422) * The instance is not in SHUTOFF state (500)


/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X POST "http://localhost/api/instances/{instance_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        PCIDevsArray ids = ; // PCIDevsArray | The PCI devices to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdPcidevsPost(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        PCIDevsArray ids = ; // PCIDevsArray | The PCI devices to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdPcidevsPost(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
PCIDevsArray *ids = ; // The PCI devices to attach.

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

// Attach PCI devices to the instance.
[apiInstance instancesInstanceIdPcidevsPostWith:instanceId
    ids:ids
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var ids = ; // {PCIDevsArray} The PCI devices to attach.


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

namespace Example
{
    public class instancesInstanceIdPcidevsPostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var ids = new PCIDevsArray(); // PCIDevsArray | The PCI devices to attach.

            try
            {
                // Attach PCI devices to the instance.
                Instance result = apiInstance.instancesInstanceIdPcidevsPost(instanceId, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPcidevsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$ids = ; // PCIDevsArray | The PCI devices to attach.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $ids = WWW::SwaggerClient::Object::PCIDevsArray->new(); # PCIDevsArray | The PCI devices to attach.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
ids =  # PCIDevsArray | The PCI devices to attach.

try: 
    # Attach PCI devices to the instance.
    api_response = api_instance.instances_instance_id_pcidevs_post(instanceId, ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPcidevsPost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
ids *

Responses

Status: 200 - The instance.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdPromotePut

Promote the instance from worker to manager.

This action is applicable on a *worker* instance that belongs in a *docker swarm* cluster. On success, the instance will be transformed to a *manager* instance. The following scenarios will result in a *failed* response * The instance does not exists (404) * The instance is not in a cluster (422) * The instance is not in a cluster with cluster type 'swarm' (422) * The instance is not active (422) * The instance is not a worker (422) * The instance is the leader (422)


/instances/{instance_id}/promote

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/promote"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdPromotePut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPromotePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdPromotePut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPromotePut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Promote the instance from worker to manager.
[apiInstance instancesInstanceIdPromotePutWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdPromotePutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Promote the instance from worker to manager.
                apiInstance.instancesInstanceIdPromotePut(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPromotePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Promote the instance from worker to manager.
    api_instance.instances_instance_id_promote_put(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPromotePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 202 - Docker promoted succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdRenamePut

Rename an instance

Calling this endpoint and providing a string, a user can modify an instance name to their preference.


/instances/{instance_id}/rename

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/rename"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceRename instance = ; // InstanceRename | The instance to rename.
        try {
            apiInstance.instancesInstanceIdRenamePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceRename instance = ; // InstanceRename | The instance to rename.
        try {
            apiInstance.instancesInstanceIdRenamePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
InstanceRename *instance = ; // The instance to rename. (optional)

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

// Rename an instance
[apiInstance instancesInstanceIdRenamePutWith:instanceId
    instance:instance
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'instance':  // {InstanceRename} The instance to rename.
};

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

namespace Example
{
    public class instancesInstanceIdRenamePutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var instance = new InstanceRename(); // InstanceRename | The instance to rename. (optional) 

            try
            {
                // Rename an instance
                apiInstance.instancesInstanceIdRenamePut(instanceId, instance);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdRenamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$instance = ; // InstanceRename | The instance to rename.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $instance = WWW::SwaggerClient::Object::InstanceRename->new(); # InstanceRename | The instance to rename.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
instance =  # InstanceRename | The instance to rename. (optional)

try: 
    # Rename an instance
    api_instance.instances_instance_id_rename_put(instanceId, instance=instance)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdRenamePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
instance

Responses

Status: 202 - Instance renamed succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdResizeDatastoresFlavorIdGet

Get list of available datastores of instance for new extra disks will be used on resize.

Return the datastores that can accommodate the new virtual disks based on the given flavor ID. The action will fail on these scenarios: * The instance does not exist. (404) * The flavor does not exist. (404)


/instances/{instance_id}/resize/datastores/{flavor_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/resize/datastores/{flavor_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        UUID flavorId = ; // UUID | The flavor id.
        try {
            inline_response_200_7 result = apiInstance.instancesInstanceIdResizeDatastoresFlavorIdGet(instanceId, flavorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresFlavorIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        UUID flavorId = ; // UUID | The flavor id.
        try {
            inline_response_200_7 result = apiInstance.instancesInstanceIdResizeDatastoresFlavorIdGet(instanceId, flavorId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresFlavorIdGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
UUID *flavorId = ; // The flavor id.

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

// Get list of available datastores of instance for new extra disks will be
used on resize.

[apiInstance instancesInstanceIdResizeDatastoresFlavorIdGetWith:instanceId
    flavorId:flavorId
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var flavorId = ; // {UUID} The flavor id.


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

namespace Example
{
    public class instancesInstanceIdResizeDatastoresFlavorIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var flavorId = new UUID(); // UUID | The flavor id.

            try
            {
                // Get list of available datastores of instance for new extra disks will be
used on resize.

                inline_response_200_7 result = apiInstance.instancesInstanceIdResizeDatastoresFlavorIdGet(instanceId, flavorId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizeDatastoresFlavorIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$flavorId = ; // UUID | The flavor id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $flavorId = ; # UUID | The flavor id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
flavorId =  # UUID | The flavor id.

try: 
    # Get list of available datastores of instance for new extra disks will be
used on resize.

    api_response = api_instance.instances_instance_id_resize_datastores_flavor_id_get(instanceId, flavorId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresFlavorIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
flavor_id*
UUID (uuid)
The flavor id.
Required

Responses

Status: 200 - A list of datastores for extra disk 1 and 2.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet

Get the list of flavors available for the given id of instance.

Returns the flavors available for resizing the instance with the given id. When extra_disk_1_ds or extra_disk_2_ds options are used then the available for resize flavors are returned, where it is checked if the extra disk 1 or extra disk 2 fits for resize by replacing the datastore of root (default) for the selected instance id. Given empty values for extra_disk_1_ds, extra_disk_2_ds then it is checked if the datastore of root has the space for accommodating the new disks. The action will fail on these scenarios * The instance does not exist. (404)


/instances/{instance_id}/resize/flavors/{extra_disk_1_ds}/{extra_disk_2_ds}

Usage and SDK Samples

curl -X GET "http://localhost/api/instances/{instance_id}/resize/flavors/{extra_disk_1_ds}/{extra_disk_2_ds}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        UUID extraDisk1Ds = ; // UUID | The datastore id of extra disk (1).
        UUID extraDisk2Ds = ; // UUID | The datastore id of extra disk (2).
        try {
            array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet(instanceId, extraDisk1Ds, extraDisk2Ds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        UUID extraDisk1Ds = ; // UUID | The datastore id of extra disk (1).
        UUID extraDisk2Ds = ; // UUID | The datastore id of extra disk (2).
        try {
            array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet(instanceId, extraDisk1Ds, extraDisk2Ds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
UUID *extraDisk1Ds = ; // The datastore id of extra disk (1).
UUID *extraDisk2Ds = ; // The datastore id of extra disk (2).

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

// Get the list of flavors available for the given id of instance.
[apiInstance instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGetWith:instanceId
    extraDisk1Ds:extraDisk1Ds
    extraDisk2Ds:extraDisk2Ds
              completionHandler: ^(array[Flavor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var extraDisk1Ds = ; // {UUID} The datastore id of extra disk (1).

var extraDisk2Ds = ; // {UUID} The datastore id of extra disk (2).


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

namespace Example
{
    public class instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var extraDisk1Ds = new UUID(); // UUID | The datastore id of extra disk (1).
            var extraDisk2Ds = new UUID(); // UUID | The datastore id of extra disk (2).

            try
            {
                // Get the list of flavors available for the given id of instance.
                array[Flavor] result = apiInstance.instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet(instanceId, extraDisk1Ds, extraDisk2Ds);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$extraDisk1Ds = ; // UUID | The datastore id of extra disk (1).
$extraDisk2Ds = ; // UUID | The datastore id of extra disk (2).

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $extraDisk1Ds = ; # UUID | The datastore id of extra disk (1).
my $extraDisk2Ds = ; # UUID | The datastore id of extra disk (2).

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
extraDisk1Ds =  # UUID | The datastore id of extra disk (1).
extraDisk2Ds =  # UUID | The datastore id of extra disk (2).

try: 
    # Get the list of flavors available for the given id of instance.
    api_response = api_instance.instances_instance_id_resize_flavors_extra_disk1_ds_extra_disk2_ds_get(instanceId, extraDisk1Ds, extraDisk2Ds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizeFlavorsExtraDisk1DsExtraDisk2DsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
extra_disk_1_ds*
UUID (uuid)
The datastore id of extra disk (1).
Required
extra_disk_2_ds*
UUID (uuid)
The datastore id of extra disk (2).
Required

Responses

Status: 200 - A list of flavors.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

instancesInstanceIdResizePut

Resize the characteristics (flavor) of an instance

The resize will fail on these scenarios * The instance does not exist. (404) * Timeout occured while waiting for finishing the resize of instance. (408) * The flavor is already active for instance. (422) * The cores of flavor are more than the available cores of instance node. (422) * The memory of flavor of instance node is greater than the available memory. (422) * The memory of flavor is less than the minimum mem. of instance's image. (422) * The disk size of flavor is less than the minimum disk size of instance's image. (422) * The disk size of flavor is less than the disk size of instance. We permit only disk expansion. (422) * No extra disk 1 or 2 is required for windows instance. (422)


/instances/{instance_id}/resize

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/resize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceResize instance = ; // InstanceResize | The instance to resize.
        try {
            apiInstance.instancesInstanceIdResizePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        InstanceResize instance = ; // InstanceResize | The instance to resize.
        try {
            apiInstance.instancesInstanceIdResizePut(instanceId, instance);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
InstanceResize *instance = ; // The instance to resize. (optional)

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

// Resize the characteristics (flavor) of an instance
[apiInstance instancesInstanceIdResizePutWith:instanceId
    instance:instance
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'instance':  // {InstanceResize} The instance to resize.
};

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

namespace Example
{
    public class instancesInstanceIdResizePutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var instance = new InstanceResize(); // InstanceResize | The instance to resize. (optional) 

            try
            {
                // Resize the characteristics (flavor) of an instance
                apiInstance.instancesInstanceIdResizePut(instanceId, instance);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$instance = ; // InstanceResize | The instance to resize.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $instance = WWW::SwaggerClient::Object::InstanceResize->new(); # InstanceResize | The instance to resize.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
instance =  # InstanceResize | The instance to resize. (optional)

try: 
    # Resize the characteristics (flavor) of an instance
    api_instance.instances_instance_id_resize_put(instanceId, instance=instance)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizePut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
instance

Responses

Status: 202 - Instance resized succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 408 - Request Timeout.

{code=408}

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 occured.

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

instancesInstanceIdRestartDockerPut

Restart the docker engine of an instance.

This action is applicable on an instance that belongs in a *docker* or *docker swarm* cluster type. The docker engine will be restarted. The following scenarios will result in a *failed* response * The instance does not exists (404) * The instance is not in a cluster (422) * The instance is not in a cluster with cluster type 'docker' or 'swarm' (422) * The instance is not active (422)


/instances/{instance_id}/restart_docker

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/restart_docker"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdRestartDockerPut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRestartDockerPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdRestartDockerPut(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdRestartDockerPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Restart the docker engine of an instance.
[apiInstance instancesInstanceIdRestartDockerPutWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdRestartDockerPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Restart the docker engine of an instance.
                apiInstance.instancesInstanceIdRestartDockerPut(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdRestartDockerPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Restart the docker engine of an instance.
    api_instance.instances_instance_id_restart_docker_put(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdRestartDockerPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 202 - Docker engine restarted succesfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdVncExposeDelete

Conceal an instance's VNC to a connected SIM.

Conceal an instance's VNC to a connected SIM. The action will fail on these scenarios: * The instance does not exist. (404). * The instance's VNC is not exposed (422).


/instances/{instance_id}/vnc/expose

Usage and SDK Samples

curl -X DELETE "http://localhost/api/instances/{instance_id}/vnc/expose"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdVncExposeDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncExposeDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            apiInstance.instancesInstanceIdVncExposeDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncExposeDelete");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Conceal an instance's VNC to a connected SIM.
[apiInstance instancesInstanceIdVncExposeDeleteWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.


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

namespace Example
{
    public class instancesInstanceIdVncExposeDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Conceal an instance's VNC to a connected SIM.
                apiInstance.instancesInstanceIdVncExposeDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncExposeDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Conceal an instance's VNC to a connected SIM.
    api_instance.instances_instance_id_vnc_expose_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncExposeDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 204 - VNC consealed

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesInstanceIdVncExposePost

Expose an instance's VNC to a connected SIM.

Expose an instance's VNC to a connected SIM. The action will fail on these scenarios: * The provided IP or port is not valid. (422). * The instance does not exist. (404). * The instance is not an HVM (422). * The instance is not in active state (422). * The exported port is in use (409). * The exported ip does not belong to an active sim2 session (422).


/instances/{instance_id}/vnc/expose

Usage and SDK Samples

curl -X POST "http://localhost/api/instances/{instance_id}/vnc/expose"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        ExposeVNCParams exposeVnc = ; // ExposeVNCParams | The parameters used to expose the VNC.
        try {
            apiInstance.instancesInstanceIdVncExposePost(instanceId, exposeVnc);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncExposePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        ExposeVNCParams exposeVnc = ; // ExposeVNCParams | The parameters used to expose the VNC.
        try {
            apiInstance.instancesInstanceIdVncExposePost(instanceId, exposeVnc);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncExposePost");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
ExposeVNCParams *exposeVnc = ; // The parameters used to expose the VNC. (optional)

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

// Expose an instance's VNC to a connected SIM.
[apiInstance instancesInstanceIdVncExposePostWith:instanceId
    exposeVnc:exposeVnc
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var opts = { 
  'exposeVnc':  // {ExposeVNCParams} The parameters used to expose the VNC.
};

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

namespace Example
{
    public class instancesInstanceIdVncExposePostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var exposeVnc = new ExposeVNCParams(); // ExposeVNCParams | The parameters used to expose the VNC. (optional) 

            try
            {
                // Expose an instance's VNC to a connected SIM.
                apiInstance.instancesInstanceIdVncExposePost(instanceId, exposeVnc);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncExposePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$exposeVnc = ; // ExposeVNCParams | The parameters used to expose the VNC.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $exposeVnc = WWW::SwaggerClient::Object::ExposeVNCParams->new(); # ExposeVNCParams | The parameters used to expose the VNC.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
exposeVnc =  # ExposeVNCParams | The parameters used to expose the VNC. (optional)

try: 
    # Expose an instance's VNC to a connected SIM.
    api_instance.instances_instance_id_vnc_expose_post(instanceId, exposeVnc=exposeVnc)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncExposePost: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Body parameters
Name Description
exposeVnc

Responses

Status: 204 - Instance's VNC exposed

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

instancesPost

Create instance.

If everything is ok then a response will be issued. It contains an instanc object with some of the properties filled. The whole creation proces may take some time (minutes) to complete. So a successful response does not mean, in any case, that the instance has been created. The following scenarios will result in a *failed* response * The hostname is not properly written. (422) * The resource group does not exists. (404) * The keypair does not exists. (404) * The image is not found. (404) * The image is not active. It means that does not have anything uploaded. (422) * The flavor is not found. (404) * The datastore's ID is missing for the disk. (422) * The datastore's ID for any type is not found. (404) * The datastore does not have available space for the disk. (422) * The image's minimum disk size is not compatible with the flavor's size. (422) * The image's minimum memory is not compatible with the flavor's memory size. (422) * A network's ID is not found. (404) * A network's ID does not exists in the group. (404) * The 'cd_rom_image_id' is using image's ID is not found. (422) * The 'cd_rom_image_id' is using image's ID that is not iso. (422) * The 'cd_rom_image_id' is not submitted but the 'boot_from_cd_rom' is true. (422) * The 'cd_rom_image_id' is submitted, the 'image_id' is not submitted and 'boot_from_cd_rom' is false. (422) * There is not enough space to create the CD-ROM for the instance. (422) * The 'image_id' is PV type and 'cd_rom_image_id' is not empty, because the CD-ROM works only for HVM. (422) * The 'cd_rom_image_id' is not empty but the 'datastores.cdrom' is empty. (422) * Etc.


/instances

Usage and SDK Samples

curl -X POST "http://localhost/api/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        NewInstance instance = ; // NewInstance | The instance to create.
        try {
            Instance result = apiInstance.instancesPost(instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        NewInstance instance = ; // NewInstance | The instance to create.
        try {
            Instance result = apiInstance.instancesPost(instance);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesPost");
            e.printStackTrace();
        }
    }
}
NewInstance *instance = ; // The instance to create. (optional)

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

// Create instance.
[apiInstance instancesPostWith:instance
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var opts = { 
  'instance':  // {NewInstance} The instance to create.
};

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

namespace Example
{
    public class instancesPostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instance = new NewInstance(); // NewInstance | The instance to create. (optional) 

            try
            {
                // Create instance.
                Instance result = apiInstance.instancesPost(instance);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instance = ; // NewInstance | The instance to create.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instance = WWW::SwaggerClient::Object::NewInstance->new(); # NewInstance | The instance to create.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instance =  # NewInstance | The instance to create. (optional)

try: 
    # Create instance.
    api_response = api_instance.instances_post(instance=instance)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesPost: %s\n" % e)

Parameters

Body parameters
Name Description
instance

Responses

Status: 202 - The request accepted and the creation of instance is processing.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

Keypairs

keypairsGet

Get all the keypairs of the current logged in user.


/keypairs

Usage and SDK Samples

curl -X GET "http://localhost/api/keypairs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KeypairsApi;

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

public class KeypairsApiExample {

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

public class KeypairsApiExample {

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

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

// Get all the keypairs of the current logged in user.
[apiInstance keypairsGetWithCompletionHandler: 
              ^(array[Keypair] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.KeypairsApi()

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

namespace Example
{
    public class keypairsGetExample
    {
        public void main()
        {
            
            var apiInstance = new KeypairsApi();

            try
            {
                // Get all the keypairs of the current logged in user.
                array[Keypair] result = apiInstance.keypairsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KeypairsApi.keypairsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\KeypairsApi();

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

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

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

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

try: 
    # Get all the keypairs of the current logged in user.
    api_response = api_instance.keypairs_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KeypairsApi->keypairsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of key pairs.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 500 - An unexpected error occured.

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

keypairsKeypairNameDelete

Delete the keypair.


/keypairs/{keypair_name}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/keypairs/{keypair_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KeypairsApi;

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

public class KeypairsApiExample {

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

public class KeypairsApiExample {

    public static void main(String[] args) {
        KeypairsApi apiInstance = new KeypairsApi();
        String keypairName = keypairName_example; // String | 
        try {
            apiInstance.keypairsKeypairNameDelete(keypairName);
        } catch (ApiException e) {
            System.err.println("Exception when calling KeypairsApi#keypairsKeypairNameDelete");
            e.printStackTrace();
        }
    }
}
String *keypairName = keypairName_example; // 

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

// Delete the keypair.
[apiInstance keypairsKeypairNameDeleteWith:keypairName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.KeypairsApi()

var keypairName = keypairName_example; // {String} 


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

namespace Example
{
    public class keypairsKeypairNameDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new KeypairsApi();
            var keypairName = keypairName_example;  // String | 

            try
            {
                // Delete the keypair.
                apiInstance.keypairsKeypairNameDelete(keypairName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KeypairsApi.keypairsKeypairNameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\KeypairsApi();
$keypairName = keypairName_example; // String | 

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

my $api_instance = WWW::SwaggerClient::KeypairsApi->new();
my $keypairName = keypairName_example; # String | 

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

# create an instance of the API class
api_instance = swagger_client.KeypairsApi()
keypairName = keypairName_example # String | 

try: 
    # Delete the keypair.
    api_instance.keypairs_keypair_name_delete(keypairName)
except ApiException as e:
    print("Exception when calling KeypairsApi->keypairsKeypairNameDelete: %s\n" % e)

Parameters

Path parameters
Name Description
keypair_name*
String
Required

Responses

Status: 204 - Keypair successfully deleted.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

keypairsKeypairNameGet

Get a user keypair.

A single keypair will be retrieved based on the supplied name and the current logged in user. If the keypair does not exist or it exists but belongs to another user, then a 404 Not Found response will be returned.


/keypairs/{keypair_name}

Usage and SDK Samples

curl -X GET "http://localhost/api/keypairs/{keypair_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KeypairsApi;

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

public class KeypairsApiExample {

    public static void main(String[] args) {
        
        KeypairsApi apiInstance = new KeypairsApi();
        String keypairName = keypairName_example; // String | 
        try {
            Keypair result = apiInstance.keypairsKeypairNameGet(keypairName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KeypairsApi#keypairsKeypairNameGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KeypairsApi;

public class KeypairsApiExample {

    public static void main(String[] args) {
        KeypairsApi apiInstance = new KeypairsApi();
        String keypairName = keypairName_example; // String | 
        try {
            Keypair result = apiInstance.keypairsKeypairNameGet(keypairName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KeypairsApi#keypairsKeypairNameGet");
            e.printStackTrace();
        }
    }
}
String *keypairName = keypairName_example; // 

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

// Get a user keypair.
[apiInstance keypairsKeypairNameGetWith:keypairName
              completionHandler: ^(Keypair output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.KeypairsApi()

var keypairName = keypairName_example; // {String} 


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

namespace Example
{
    public class keypairsKeypairNameGetExample
    {
        public void main()
        {
            
            var apiInstance = new KeypairsApi();
            var keypairName = keypairName_example;  // String | 

            try
            {
                // Get a user keypair.
                Keypair result = apiInstance.keypairsKeypairNameGet(keypairName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KeypairsApi.keypairsKeypairNameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\KeypairsApi();
$keypairName = keypairName_example; // String | 

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

my $api_instance = WWW::SwaggerClient::KeypairsApi->new();
my $keypairName = keypairName_example; # String | 

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

# create an instance of the API class
api_instance = swagger_client.KeypairsApi()
keypairName = keypairName_example # String | 

try: 
    # Get a user keypair.
    api_response = api_instance.keypairs_keypair_name_get(keypairName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KeypairsApi->keypairsKeypairNameGet: %s\n" % e)

Parameters

Path parameters
Name Description
keypair_name*
String
Required

Responses

Status: 200 - Succesfully got a keypair.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

keypairsPost

Add a keypair for the current logged in user.

The API transmits the request to the controller, to import a new keypair. The following update scenarios will fail * The public key is empty or contains unwanted characters. (422) * The public key is invalid to generate fingerprint. (422) * The name or public key exists already. (409) * The name contains unsafe character. (422)


/keypairs

Usage and SDK Samples

curl -X POST "http://localhost/api/keypairs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KeypairsApi;

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

public class KeypairsApiExample {

    public static void main(String[] args) {
        
        KeypairsApi apiInstance = new KeypairsApi();
        NewKeypair keypair = ; // NewKeypair | The keypair to create.
        try {
            apiInstance.keypairsPost(keypair);
        } catch (ApiException e) {
            System.err.println("Exception when calling KeypairsApi#keypairsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KeypairsApi;

public class KeypairsApiExample {

    public static void main(String[] args) {
        KeypairsApi apiInstance = new KeypairsApi();
        NewKeypair keypair = ; // NewKeypair | The keypair to create.
        try {
            apiInstance.keypairsPost(keypair);
        } catch (ApiException e) {
            System.err.println("Exception when calling KeypairsApi#keypairsPost");
            e.printStackTrace();
        }
    }
}
NewKeypair *keypair = ; // The keypair to create. (optional)

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

// Add a keypair for the current logged in user.
[apiInstance keypairsPostWith:keypair
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.KeypairsApi()

var opts = { 
  'keypair':  // {NewKeypair} The keypair to create.
};

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

namespace Example
{
    public class keypairsPostExample
    {
        public void main()
        {
            
            var apiInstance = new KeypairsApi();
            var keypair = new NewKeypair(); // NewKeypair | The keypair to create. (optional) 

            try
            {
                // Add a keypair for the current logged in user.
                apiInstance.keypairsPost(keypair);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KeypairsApi.keypairsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\KeypairsApi();
$keypair = ; // NewKeypair | The keypair to create.

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

my $api_instance = WWW::SwaggerClient::KeypairsApi->new();
my $keypair = WWW::SwaggerClient::Object::NewKeypair->new(); # NewKeypair | The keypair to create.

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

# create an instance of the API class
api_instance = swagger_client.KeypairsApi()
keypair =  # NewKeypair | The keypair to create. (optional)

try: 
    # Add a keypair for the current logged in user.
    api_instance.keypairs_post(keypair=keypair)
except ApiException as e:
    print("Exception when calling KeypairsApi->keypairsPost: %s\n" % e)

Parameters

Body parameters
Name Description
keypair

Responses

Status: 202 - The keypair is created.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 409 - Status conflict.

{code=409}

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 occured.

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

Licenses

licenseDelete

Delete the license from the system.


/license

Usage and SDK Samples

curl -X DELETE "http://localhost/api/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

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

public class LicensesApiExample {

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

public class LicensesApiExample {

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

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

// Delete the license from the system.
[apiInstance licenseDeleteWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.LicensesApi()

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

namespace Example
{
    public class licenseDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new LicensesApi();

            try
            {
                // Delete the license from the system.
                apiInstance.licenseDelete();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.licenseDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LicensesApi();

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

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

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

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

try: 
    # Delete the license from the system.
    api_instance.license_delete()
except ApiException as e:
    print("Exception when calling LicensesApi->licenseDelete: %s\n" % e)

Parameters

Responses

Status: 204 - The license was deleted successfully.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

licenseGet

Get the current license.


/license

Usage and SDK Samples

curl -X GET "http://localhost/api/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

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

public class LicensesApiExample {

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

public class LicensesApiExample {

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

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

// Get the current license.
[apiInstance licenseGetWithCompletionHandler: 
              ^(License output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.LicensesApi()

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

namespace Example
{
    public class licenseGetExample
    {
        public void main()
        {
            
            var apiInstance = new LicensesApi();

            try
            {
                // Get the current license.
                License result = apiInstance.licenseGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.licenseGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LicensesApi();

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

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

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

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

try: 
    # Get the current license.
    api_response = api_instance.license_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicensesApi->licenseGet: %s\n" % e)

Parameters

Responses

Status: 200 - Got the license.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

licensePut

Add a new license that will replace the old if there is one.

Add a new license that will replace the old if there is one. The following scenarios will result in a *failed* response * The license is not correctly encoded (422) * The license's dates are not correct (422) * The public key does not verify the signature (422)


/license

Usage and SDK Samples

curl -X PUT "http://localhost/api/license"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicensesApi;

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

public class LicensesApiExample {

    public static void main(String[] args) {
        
        LicensesApi apiInstance = new LicensesApi();
        NewLicense license = ; // NewLicense | The license to add.
        try {
            apiInstance.licensePut(license);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#licensePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicensesApi;

public class LicensesApiExample {

    public static void main(String[] args) {
        LicensesApi apiInstance = new LicensesApi();
        NewLicense license = ; // NewLicense | The license to add.
        try {
            apiInstance.licensePut(license);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicensesApi#licensePut");
            e.printStackTrace();
        }
    }
}
NewLicense *license = ; // The license to add. (optional)

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

// Add a new license that will replace the old if there is one.
[apiInstance licensePutWith:license
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.LicensesApi()

var opts = { 
  'license':  // {NewLicense} The license to add.
};

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

namespace Example
{
    public class licensePutExample
    {
        public void main()
        {
            
            var apiInstance = new LicensesApi();
            var license = new NewLicense(); // NewLicense | The license to add. (optional) 

            try
            {
                // Add a new license that will replace the old if there is one.
                apiInstance.licensePut(license);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicensesApi.licensePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LicensesApi();
$license = ; // NewLicense | The license to add.

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

my $api_instance = WWW::SwaggerClient::LicensesApi->new();
my $license = WWW::SwaggerClient::Object::NewLicense->new(); # NewLicense | The license to add.

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

# create an instance of the API class
api_instance = swagger_client.LicensesApi()
license =  # NewLicense | The license to add. (optional)

try: 
    # Add a new license that will replace the old if there is one.
    api_instance.license_put(license=license)
except ApiException as e:
    print("Exception when calling LicensesApi->licensePut: %s\n" % e)

Parameters

Body parameters
Name Description
license

Responses

Status: 204 - The license was added successfully.

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 occured.

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

Logs

logsLogfilesGet

Get list of available log files


/logs/logfiles

Usage and SDK Samples

curl -X GET "http://localhost/api/logs/logfiles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

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

public class LogsApiExample {

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

public class LogsApiExample {

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

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

// Get list of available log files
[apiInstance logsLogfilesGetWithCompletionHandler: 
              ^(array[LogFile] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.LogsApi()

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

namespace Example
{
    public class logsLogfilesGetExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();

            try
            {
                // Get list of available log files
                array[LogFile] result = apiInstance.logsLogfilesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.logsLogfilesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();

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

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

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

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

try: 
    # Get list of available log files
    api_response = api_instance.logs_logfiles_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->logsLogfilesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list available Log Files.

Status: 500 - An unexpected error occured.

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

logsLogfilesLogIdNumberLinesNumberLinesGet

Get the content of the specified log file


/logs/logfiles/{log_id}/number_lines/{number_lines}

Usage and SDK Samples

curl -X GET "http://localhost/api/logs/logfiles/{log_id}/number_lines/{number_lines}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

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

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        String logId = logId_example; // String | The ID of the Log File.
        String numberLines = numberLines_example; // String | The number of lines of the Log File.
        try {
            inline_response_200_9 result = apiInstance.logsLogfilesLogIdNumberLinesNumberLinesGet(logId, numberLines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#logsLogfilesLogIdNumberLinesNumberLinesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        String logId = logId_example; // String | The ID of the Log File.
        String numberLines = numberLines_example; // String | The number of lines of the Log File.
        try {
            inline_response_200_9 result = apiInstance.logsLogfilesLogIdNumberLinesNumberLinesGet(logId, numberLines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#logsLogfilesLogIdNumberLinesNumberLinesGet");
            e.printStackTrace();
        }
    }
}
String *logId = logId_example; // The ID of the Log File.
String *numberLines = numberLines_example; // The number of lines of the Log File.

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

// Get the content of the specified log file
[apiInstance logsLogfilesLogIdNumberLinesNumberLinesGetWith:logId
    numberLines:numberLines
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.LogsApi()

var logId = logId_example; // {String} The ID of the Log File.

var numberLines = numberLines_example; // {String} The number of lines of the Log File.


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

namespace Example
{
    public class logsLogfilesLogIdNumberLinesNumberLinesGetExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var logId = logId_example;  // String | The ID of the Log File.
            var numberLines = numberLines_example;  // String | The number of lines of the Log File.

            try
            {
                // Get the content of the specified log file
                inline_response_200_9 result = apiInstance.logsLogfilesLogIdNumberLinesNumberLinesGet(logId, numberLines);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.logsLogfilesLogIdNumberLinesNumberLinesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$logId = logId_example; // String | The ID of the Log File.
$numberLines = numberLines_example; // String | The number of lines of the Log File.

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

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $logId = logId_example; # String | The ID of the Log File.
my $numberLines = numberLines_example; # String | The number of lines of the Log File.

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

# create an instance of the API class
api_instance = swagger_client.LogsApi()
logId = logId_example # String | The ID of the Log File.
numberLines = numberLines_example # String | The number of lines of the Log File.

try: 
    # Get the content of the specified log file
    api_response = api_instance.logs_logfiles_log_id_number_lines_number_lines_get(logId, numberLines)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->logsLogfilesLogIdNumberLinesNumberLinesGet: %s\n" % e)

Parameters

Path parameters
Name Description
log_id*
String
The ID of the Log File.
Required
number_lines*
String
The number of lines of the Log File.
Required

Responses

Status: 200 - A Log File details and contents.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

Mvgroups

mvgroupsGet

Get all NexVisor groups.


/mvgroups

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

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

public class MvgroupsApiExample {

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

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

// Get all NexVisor groups.
[apiInstance mvgroupsGetWithCompletionHandler: 
              ^(array[MvGroupWithNodeIDs] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

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

namespace Example
{
    public class mvgroupsGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();

            try
            {
                // Get all NexVisor groups.
                array[MvGroupWithNodeIDs] result = apiInstance.mvgroupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();

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

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

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

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

try: 
    # Get all NexVisor groups.
    api_response = api_instance.mvgroups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of NexVisor groups.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

mvgroupsMvgroupIdCoresGet

Get all the cores found in the nodes of a NexVisor group.


/mvgroups/{mvgroup_id}/cores

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups/{mvgroup_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

    public static void main(String[] args) {
        
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Core] result = apiInstance.mvgroupsMvgroupIdCoresGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdCoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MvgroupsApi;

public class MvgroupsApiExample {

    public static void main(String[] args) {
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Core] result = apiInstance.mvgroupsMvgroupIdCoresGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdCoresGet");
            e.printStackTrace();
        }
    }
}
UUID *mvgroupId = ; // The id of an NexVisor group.

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

// Get all the cores found in the nodes of a NexVisor group.
[apiInstance mvgroupsMvgroupIdCoresGetWith:mvgroupId
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

var mvgroupId = ; // {UUID} The id of an NexVisor group.


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

namespace Example
{
    public class mvgroupsMvgroupIdCoresGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();
            var mvgroupId = new UUID(); // UUID | The id of an NexVisor group.

            try
            {
                // Get all the cores found in the nodes of a NexVisor group.
                array[Core] result = apiInstance.mvgroupsMvgroupIdCoresGet(mvgroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsMvgroupIdCoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();
$mvgroupId = ; // UUID | The id of an NexVisor group.

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

my $api_instance = WWW::SwaggerClient::MvgroupsApi->new();
my $mvgroupId = ; # UUID | The id of an NexVisor group.

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

# create an instance of the API class
api_instance = swagger_client.MvgroupsApi()
mvgroupId =  # UUID | The id of an NexVisor group.

try: 
    # Get all the cores found in the nodes of a NexVisor group.
    api_response = api_instance.mvgroups_mvgroup_id_cores_get(mvgroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsMvgroupIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
mvgroup_id*
UUID (uuid)
The id of an NexVisor group.
Required

Responses

Status: 200 - A list of cores.

[{id=700702_0_0, number=0, mvgroup_id=vhhj342d, node_id=700702, resource_group_id=1}, {id=700702_0_1, number=1, mvgroup_id=12rfg2, node_id=700702, resource_group_id=1}, {id=700702_0_2, number=2, mvgroup_id=32t4yh2, node_id=700702, resource_group_id=1}, {id=700702_0_3, number=3, mvgroup_id=afh543er, node_id=700702, resource_group_id=1}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

mvgroupsMvgroupIdDisksGet

Get all the disks found in the NexVisor group.


/mvgroups/{mvgroup_id}/disks

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups/{mvgroup_id}/disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

    public static void main(String[] args) {
        
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Disk] result = apiInstance.mvgroupsMvgroupIdDisksGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MvgroupsApi;

public class MvgroupsApiExample {

    public static void main(String[] args) {
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Disk] result = apiInstance.mvgroupsMvgroupIdDisksGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdDisksGet");
            e.printStackTrace();
        }
    }
}
UUID *mvgroupId = ; // The id of an NexVisor group.

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

// Get all the disks found in the NexVisor group.
[apiInstance mvgroupsMvgroupIdDisksGetWith:mvgroupId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

var mvgroupId = ; // {UUID} The id of an NexVisor group.


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

namespace Example
{
    public class mvgroupsMvgroupIdDisksGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();
            var mvgroupId = new UUID(); // UUID | The id of an NexVisor group.

            try
            {
                // Get all the disks found in the NexVisor group.
                array[Disk] result = apiInstance.mvgroupsMvgroupIdDisksGet(mvgroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsMvgroupIdDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();
$mvgroupId = ; // UUID | The id of an NexVisor group.

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

my $api_instance = WWW::SwaggerClient::MvgroupsApi->new();
my $mvgroupId = ; # UUID | The id of an NexVisor group.

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

# create an instance of the API class
api_instance = swagger_client.MvgroupsApi()
mvgroupId =  # UUID | The id of an NexVisor group.

try: 
    # Get all the disks found in the NexVisor group.
    api_response = api_instance.mvgroups_mvgroup_id_disks_get(mvgroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsMvgroupIdDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
mvgroup_id*
UUID (uuid)
The id of an NexVisor group.
Required

Responses

Status: 200 - A list of disks.

[{id=1111-1111-demo-node, number=0, node_id=74265909, resource_group_id=1, used=100, total=8388608, vendor=Samsung}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

mvgroupsMvgroupIdGet

Get a NexVisor group including the NexVisors belonging to it.


/mvgroups/{mvgroup_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups/{mvgroup_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

    public static void main(String[] args) {
        
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            MvGroupWithEmbeddedNodes result = apiInstance.mvgroupsMvgroupIdGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MvgroupsApi;

public class MvgroupsApiExample {

    public static void main(String[] args) {
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            MvGroupWithEmbeddedNodes result = apiInstance.mvgroupsMvgroupIdGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdGet");
            e.printStackTrace();
        }
    }
}
UUID *mvgroupId = ; // The id of an NexVisor group.

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

// Get a NexVisor group including the NexVisors belonging to it.
[apiInstance mvgroupsMvgroupIdGetWith:mvgroupId
              completionHandler: ^(MvGroupWithEmbeddedNodes output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

var mvgroupId = ; // {UUID} The id of an NexVisor group.


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

namespace Example
{
    public class mvgroupsMvgroupIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();
            var mvgroupId = new UUID(); // UUID | The id of an NexVisor group.

            try
            {
                // Get a NexVisor group including the NexVisors belonging to it.
                MvGroupWithEmbeddedNodes result = apiInstance.mvgroupsMvgroupIdGet(mvgroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsMvgroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();
$mvgroupId = ; // UUID | The id of an NexVisor group.

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

my $api_instance = WWW::SwaggerClient::MvgroupsApi->new();
my $mvgroupId = ; # UUID | The id of an NexVisor group.

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

# create an instance of the API class
api_instance = swagger_client.MvgroupsApi()
mvgroupId =  # UUID | The id of an NexVisor group.

try: 
    # Get a NexVisor group including the NexVisors belonging to it.
    api_response = api_instance.mvgroups_mvgroup_id_get(mvgroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsMvgroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
mvgroup_id*
UUID (uuid)
The id of an NexVisor group.
Required

Responses

Status: 200 - A NexVisor group.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

mvgroupsMvgroupIdInstancesGet

Get all the instances groups that use cores of nodes belonging in the NexVisor group.


/mvgroups/{mvgroup_id}/instances

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups/{mvgroup_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

    public static void main(String[] args) {
        
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Instance] result = apiInstance.mvgroupsMvgroupIdInstancesGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MvgroupsApi;

public class MvgroupsApiExample {

    public static void main(String[] args) {
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[Instance] result = apiInstance.mvgroupsMvgroupIdInstancesGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdInstancesGet");
            e.printStackTrace();
        }
    }
}
UUID *mvgroupId = ; // The id of an NexVisor group.

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

// Get all the instances groups that use cores of nodes belonging in the
NexVisor group.

[apiInstance mvgroupsMvgroupIdInstancesGetWith:mvgroupId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

var mvgroupId = ; // {UUID} The id of an NexVisor group.


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

namespace Example
{
    public class mvgroupsMvgroupIdInstancesGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();
            var mvgroupId = new UUID(); // UUID | The id of an NexVisor group.

            try
            {
                // Get all the instances groups that use cores of nodes belonging in the
NexVisor group.

                array[Instance] result = apiInstance.mvgroupsMvgroupIdInstancesGet(mvgroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsMvgroupIdInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();
$mvgroupId = ; // UUID | The id of an NexVisor group.

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

my $api_instance = WWW::SwaggerClient::MvgroupsApi->new();
my $mvgroupId = ; # UUID | The id of an NexVisor group.

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

# create an instance of the API class
api_instance = swagger_client.MvgroupsApi()
mvgroupId =  # UUID | The id of an NexVisor group.

try: 
    # Get all the instances groups that use cores of nodes belonging in the
NexVisor group.

    api_response = api_instance.mvgroups_mvgroup_id_instances_get(mvgroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsMvgroupIdInstancesGet: %s\n" % e)

Parameters

Path parameters
Name Description
mvgroup_id*
UUID (uuid)
The id of an NexVisor group.
Required

Responses

Status: 200 - A list of resource groups.

[{name=yesenia.name.small-instance, id=27, domain_name=dny3NkG1faI8, node=74265909, resource_group_id=1, state=SHUTOFF, progress=instance_active, owner=Leonora_Goldner, root_disk_gb=3, memory_mb=384, vcpus=1, extra_disk_1_gb=0, extra_disk_2_gb=0, image={id=0a45078e-a582-50sm-b0e2-31e073787657, name=Ubuntu 16.04 x64, virtual_size=0, status=enabled, min_ram=0, min_disk=1, os_distro=Linux, provider=sunlight, location=local, os_version=16.04, architecture=x64}}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

mvgroupsMvgroupIdResourceGroupsGet

Get all the resource groups that are related in some way with the cores of the NexVisor group.


/mvgroups/{mvgroup_id}/resource_groups

Usage and SDK Samples

curl -X GET "http://localhost/api/mvgroups/{mvgroup_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MvgroupsApi;

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

public class MvgroupsApiExample {

    public static void main(String[] args) {
        
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[ResourceGroup] result = apiInstance.mvgroupsMvgroupIdResourceGroupsGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MvgroupsApi;

public class MvgroupsApiExample {

    public static void main(String[] args) {
        MvgroupsApi apiInstance = new MvgroupsApi();
        UUID mvgroupId = ; // UUID | The id of an NexVisor group.
        try {
            array[ResourceGroup] result = apiInstance.mvgroupsMvgroupIdResourceGroupsGet(mvgroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MvgroupsApi#mvgroupsMvgroupIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
UUID *mvgroupId = ; // The id of an NexVisor group.

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

// Get all the resource groups that are related in some way with the cores
of the NexVisor group.

[apiInstance mvgroupsMvgroupIdResourceGroupsGetWith:mvgroupId
              completionHandler: ^(array[ResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.MvgroupsApi()

var mvgroupId = ; // {UUID} The id of an NexVisor group.


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

namespace Example
{
    public class mvgroupsMvgroupIdResourceGroupsGetExample
    {
        public void main()
        {
            
            var apiInstance = new MvgroupsApi();
            var mvgroupId = new UUID(); // UUID | The id of an NexVisor group.

            try
            {
                // Get all the resource groups that are related in some way with the cores
of the NexVisor group.

                array[ResourceGroup] result = apiInstance.mvgroupsMvgroupIdResourceGroupsGet(mvgroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MvgroupsApi.mvgroupsMvgroupIdResourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MvgroupsApi();
$mvgroupId = ; // UUID | The id of an NexVisor group.

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

my $api_instance = WWW::SwaggerClient::MvgroupsApi->new();
my $mvgroupId = ; # UUID | The id of an NexVisor group.

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

# create an instance of the API class
api_instance = swagger_client.MvgroupsApi()
mvgroupId =  # UUID | The id of an NexVisor group.

try: 
    # Get all the resource groups that are related in some way with the cores
of the NexVisor group.

    api_response = api_instance.mvgroups_mvgroup_id_resource_groups_get(mvgroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MvgroupsApi->mvgroupsMvgroupIdResourceGroupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
mvgroup_id*
UUID (uuid)
The id of an NexVisor group.
Required

Responses

Status: 200 - A list of resource groups.

[{id=1, name=Data1, description=Data1, datastores=[90eb-e60e-76154e320], cores=[700702_0_0, 700702_0_1, 700702_0_2, 700702_0_3, 74265909_2_2, 74265909_2_3, 74265909_2_4, 74ea2721_3_2, 74ea2721_3_3], virtual_cores=0, real_cores=9, core_usage=28.125}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

Networks

networksDelete

Delete the provided networks.

The endpoint deletes the networks that are provided in a list with network IDs. It returns a list with networks ids that could not be deleted alongside a status code.


/networks

Usage and SDK Samples

curl -X DELETE "http://localhost/api/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        array[Long] networksIds = ; // array[Long] | A list of network ids to delete.
        try {
            apiInstance.networksDelete(networksIds);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        array[Long] networksIds = ; // array[Long] | A list of network ids to delete.
        try {
            apiInstance.networksDelete(networksIds);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksDelete");
            e.printStackTrace();
        }
    }
}
array[Long] *networksIds = ; // A list of network ids to delete. (optional)

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

// Delete the provided networks.
[apiInstance networksDeleteWith:networksIds
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var opts = { 
  'networksIds':  // {array[Long]} A list of network ids to delete.
};

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

namespace Example
{
    public class networksDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networksIds = new array[Long](); // array[Long] | A list of network ids to delete. (optional) 

            try
            {
                // Delete the provided networks.
                apiInstance.networksDelete(networksIds);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networksIds = ; // array[Long] | A list of network ids to delete.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networksIds = [WWW::SwaggerClient::Object::array[Long]->new()]; # array[Long] | A list of network ids to delete.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networksIds =  # array[Long] | A list of network ids to delete. (optional)

try: 
    # Delete the provided networks.
    api_instance.networks_delete(networksIds=networksIds)
except ApiException as e:
    print("Exception when calling NetworksApi->networksDelete: %s\n" % e)

Parameters

Body parameters
Name Description
networksIds

Responses

Status: 200 - All networks deleted successfully.

Status: 207 - A list of networks IDs that could not be deleted with the appropriate result status code.

[{id=122, status=404}, {id=123, status=400}]

Status: 500 - An unexpected error occured.

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

networksGet

Get all the networks.


/networks

Usage and SDK Samples

curl -X GET "http://localhost/api/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

// Get all the networks.
[apiInstance networksGetWithCompletionHandler: 
              ^(array[Network] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

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

namespace Example
{
    public class networksGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();

            try
            {
                // Get all the networks.
                array[Network] result = apiInstance.networksGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();

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

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

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

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

try: 
    # Get all the networks.
    api_response = api_instance.networks_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of networks.

{id=3, name=Private VNC network, active_nodes=[6b781600], is_external_gateway=false, is_fault_tolerance=false, is_hidden=false, is_mgt=false, is_private=true, is_routable=true, is_vlan=false, is_wire_vlan=false, nat_forwarding=false, netns_name=8cc9302d-30a7-4d2e-821e-8b124a1933b8, physical_paths=[0], resource_group_ids=[1], subnet={id=3, ip_version=4, network_id=3, allocation_pools=[{ip_start=11.1.1.3, ip_end=11.1.2.254}], cidr=11.1.1.0/16, dhcp_type=static, gateway_ip=11.1.1.1, ip_root_namespace=11.1.1.2}, vlan_tag=0, vnet_id=101}

Status: 500 - An unexpected error occured.

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

networksNetworkIdDelete

Delete a network.

The endpoint deletes a network. On the following scenarios, the endpoint will fail * If the network does not exists. (404) * The network is physical. (422) * The network is used by instances. (422)


/networks/{network_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            apiInstance.networksNetworkIdDelete(networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            apiInstance.networksNetworkIdDelete(networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *networkId = 56; // The network id.

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

// Delete a network.
[apiInstance networksNetworkIdDeleteWith:networkId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var networkId = 56; // {Integer} The network id.


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

namespace Example
{
    public class networksNetworkIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Delete a network.
                apiInstance.networksNetworkIdDelete(networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networkId = 56; // Integer | The network id.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networkId = 56; # Integer | The network id.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networkId = 56 # Integer | The network id.

try: 
    # Delete a network.
    api_instance.networks_network_id_delete(networkId)
except ApiException as e:
    print("Exception when calling NetworksApi->networksNetworkIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 204 - Network deleted succesfully.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 409 - Status conflict.

{code=409}

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 occured.

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

networksNetworkIdGet

Get a network.

The endpoint gets the network based on the ID. On the following scenarios, the endpoint will fail * If the network does not exists. (404) * If the ID is in a different type rather than integer or string. (500)


/networks/{network_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            Network result = apiInstance.networksNetworkIdGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            Network result = apiInstance.networksNetworkIdGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
Integer *networkId = 56; // The network id.

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

// Get a network.
[apiInstance networksNetworkIdGetWith:networkId
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var networkId = 56; // {Integer} The network id.


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

namespace Example
{
    public class networksNetworkIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Get a network.
                Network result = apiInstance.networksNetworkIdGet(networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksNetworkIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networkId = 56; // Integer | The network id.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networkId = 56; # Integer | The network id.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networkId = 56 # Integer | The network id.

try: 
    # Get a network.
    api_response = api_instance.networks_network_id_get(networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksNetworkIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 200 - Network send succesfully.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

networksNetworkIdIpsGet

Get the list of free and taken IPs of the network based on the ID.


/networks/{network_id}/ips

Usage and SDK Samples

curl -X GET "http://localhost/api/networks/{network_id}/ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            NetworkIPs result = apiInstance.networksNetworkIdIpsGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            NetworkIPs result = apiInstance.networksNetworkIdIpsGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdIpsGet");
            e.printStackTrace();
        }
    }
}
Integer *networkId = 56; // The network id.

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

// Get the list of free and taken IPs of the network based on the ID.
[apiInstance networksNetworkIdIpsGetWith:networkId
              completionHandler: ^(NetworkIPs output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var networkId = 56; // {Integer} The network id.


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

namespace Example
{
    public class networksNetworkIdIpsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Get the list of free and taken IPs of the network based on the ID.
                NetworkIPs result = apiInstance.networksNetworkIdIpsGet(networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksNetworkIdIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networkId = 56; // Integer | The network id.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networkId = 56; # Integer | The network id.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networkId = 56 # Integer | The network id.

try: 
    # Get the list of free and taken IPs of the network based on the ID.
    api_response = api_instance.networks_network_id_ips_get(networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksNetworkIdIpsGet: %s\n" % e)

Parameters

Path parameters
Name Description
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 200 - The list of IPs

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

networksNetworkIdPut

Edit a network.

The endpoint edits a network. On the following scenarios, the endpoint will fail * If the ID of the network does not exists. (422) * If the 'cidr' is missing. (422) * If the 'cidr' is not in the correct format like x.x.x.x/24 or x.x.x.x/16 (422) * If the 'ip_start' or 'ip_end' or 'gateway' spans beyond the 'cidr' (422) * If the 'gateway' is conflicting with any IP between 'ip_start' and 'ip_end' (422) * If the 'ip_start' is over the 'ip_end'. (422) * If the 'ip_version' is not 4 or 6 (422) * If the format of the IPs is not based on the IP Version (422) * If the 'dhcp_type' is not 'internal', 'static' or 'external' (422) * If the 'is_routable' is 'true' and the 'dhcp_type' is 'external'(422) * If the 'is_routable' is 'true' and the network is physical(422) * If the list of physical paths is empty. (422) * If one of the physical paths does not exists. (422) * If there are duplicates in the list of physical paths. (422) * If it fails to write the network in the DB. (500) * If the 'is_routable' is 'true', the 'dhcp_type' is 'internal' and the 'dhcp_server_ip' is empty (422) * If the 'dhcp_server_ip' is conficting with the 'gateway' or with any IP between 'ip_start' and 'ip_end' (422) * No network can edit the 'is_vlan' and other attributes about the VLAN. (422)


/networks/{network_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        NewNetwork network = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.networksNetworkIdPut(networkId, network);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        NewNetwork network = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.networksNetworkIdPut(networkId, network);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Integer *networkId = 56; // The network id.
NewNetwork *network = ; // The network to edit. (optional)

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

// Edit a network.
[apiInstance networksNetworkIdPutWith:networkId
    network:network
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var networkId = 56; // {Integer} The network id.

var opts = { 
  'network':  // {NewNetwork} The network to edit.
};

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

namespace Example
{
    public class networksNetworkIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networkId = 56;  // Integer | The network id.
            var network = new NewNetwork(); // NewNetwork | The network to edit. (optional) 

            try
            {
                // Edit a network.
                Network result = apiInstance.networksNetworkIdPut(networkId, network);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networkId = 56; // Integer | The network id.
$network = ; // NewNetwork | The network to edit.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networkId = 56; # Integer | The network id.
my $network = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to edit.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networkId = 56 # Integer | The network id.
network =  # NewNetwork | The network to edit. (optional)

try: 
    # Edit a network.
    api_response = api_instance.networks_network_id_put(networkId, network=network)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksNetworkIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
network_id*
Integer (uint)
The network id.
Required
Body parameters
Name Description
network

Responses

Status: 200 - Network edited.

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 occured.

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

networksNetworkIdVifsGet

Get the virtual network interfaces (VIFs) of a specific network.


/networks/{network_id}/vifs

Usage and SDK Samples

curl -X GET "http://localhost/api/networks/{network_id}/vifs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.networksNetworkIdVifsGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Integer networkId = 56; // Integer | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.networksNetworkIdVifsGet(networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
Integer *networkId = 56; // The network id.

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

// Get the virtual network interfaces (VIFs) of a specific network.
[apiInstance networksNetworkIdVifsGetWith:networkId
              completionHandler: ^(array[VirtualNetworkInterface] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var networkId = 56; // {Integer} The network id.


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

namespace Example
{
    public class networksNetworkIdVifsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Get the virtual network interfaces (VIFs) of a specific network.
                array[VirtualNetworkInterface] result = apiInstance.networksNetworkIdVifsGet(networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksNetworkIdVifsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$networkId = 56; // Integer | The network id.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $networkId = 56; # Integer | The network id.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
networkId = 56 # Integer | The network id.

try: 
    # Get the virtual network interfaces (VIFs) of a specific network.
    api_response = api_instance.networks_network_id_vifs_get(networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksNetworkIdVifsGet: %s\n" % e)

Parameters

Path parameters
Name Description
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 200 - A list of virtual network interfaces.

[{id=1, network_id=10, ip=100.100.36.19, mac=fa:16:3e:78:12:a8, instance_id=19, vif=1}, {id=2, network_id=12, ip=100.200.0.200, mac=fe80:9e4e:3e96:78:12:a8, vif=2}]

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

networksPost

Create new network.

The endpoint creates a new network. On the following scenarios, the endpoint will fail * If the 'cidr' is missing. (422) * If the 'cidr' is not in the correct format like x.x.x.x/24 or x.x.x.x/16 (422) * If the 'ip_start' or 'ip_end' or 'gateway' spans beyond the 'cidr' (422) * If the 'gateway' is conflicting with any IP between 'ip_start' and 'ip_end' (422) * If the 'ip_start' is over the 'ip_end'. (422) * If the 'ip_version' is not 4 or 6 (422) * If the format of the IPs is not based on the IP Version (422) * If the 'dhcp_type' is not 'internal', 'static' or 'external' (422) * If the 'is_routable' is 'true' and the 'dhcp_type' is 'external'(422) * If the list of physical paths is empty. (422) * If one of the physical paths does not exists. (422) * If there are duplicates in the list of physical paths. (422) * If it fails to write the network in the DB. (500) * If the 'is_routable' is 'true', the 'dhcp_type' is 'internal' and the 'dhcp_server_ip' is empty (422) * If the 'dhcp_server_ip' is conficting with the 'gateway' or with any IP between 'ip_start' and 'ip_end' (422) * If the 'is_vlan' is enabled the 'vlan_tag' can not be under 1 or over 4094. (422) * If the 'is_vlan' is enabled then the list of physical paths contains more than one path (422) * If the 'is_fault_tolerance' is enabled then the list of physical paths needs to contain more than one path (422)


/networks

Usage and SDK Samples

curl -X POST "http://localhost/api/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        NewNetwork network = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.networksPost(network);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        NewNetwork network = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.networksPost(network);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#networksPost");
            e.printStackTrace();
        }
    }
}
NewNetwork *network = ; // The network to create. (optional)

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

// Create new network.
[apiInstance networksPostWith:network
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

var opts = { 
  'network':  // {NewNetwork} The network to create.
};

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

namespace Example
{
    public class networksPostExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();
            var network = new NewNetwork(); // NewNetwork | The network to create. (optional) 

            try
            {
                // Create new network.
                Network result = apiInstance.networksPost(network);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.networksPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();
$network = ; // NewNetwork | The network to create.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $network = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to create.

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

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
network =  # NewNetwork | The network to create. (optional)

try: 
    # Create new network.
    api_response = api_instance.networks_post(network=network)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->networksPost: %s\n" % e)

Parameters

Body parameters
Name Description
network

Responses

Status: 200 - Network created.

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 occured.

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

physicalPathsGet

Get the common physical paths for all the nodes.


/physical_paths

Usage and SDK Samples

curl -X GET "http://localhost/api/physical_paths"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

// Get the common physical paths for all the nodes.
[apiInstance physicalPathsGetWithCompletionHandler: 
              ^(array[Long] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworksApi()

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

namespace Example
{
    public class physicalPathsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworksApi();

            try
            {
                // Get the common physical paths for all the nodes.
                array[Long] result = apiInstance.physicalPathsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.physicalPathsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NetworksApi();

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

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

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

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

try: 
    # Get the common physical paths for all the nodes.
    api_response = api_instance.physical_paths_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->physicalPathsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Get a list of numbers that represents the physical paths.

Status: 500 - An unexpected error occured.

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

Nodes

nodesGet

Get all nodes.

Get all nodes of the system.


/nodes

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes?refresh=&nexvisor="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Boolean refresh = true; // Boolean | Refresh the resources of nodes before getting the list.
        Boolean nexvisor = true; // Boolean | Get all NexVisor nodes (Exclude Photon nodes).
        try {
            array[Node] result = apiInstance.nodesGet(refresh, nexvisor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Boolean refresh = true; // Boolean | Refresh the resources of nodes before getting the list.
        Boolean nexvisor = true; // Boolean | Get all NexVisor nodes (Exclude Photon nodes).
        try {
            array[Node] result = apiInstance.nodesGet(refresh, nexvisor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesGet");
            e.printStackTrace();
        }
    }
}
Boolean *refresh = true; // Refresh the resources of nodes before getting the list. (optional)
Boolean *nexvisor = true; // Get all NexVisor nodes (Exclude Photon nodes). (optional)

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

// Get all nodes.
[apiInstance nodesGetWith:refresh
    nexvisor:nexvisor
              completionHandler: ^(array[Node] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var opts = { 
  'refresh': true, // {Boolean} Refresh the resources of nodes before getting the list.
  'nexvisor': true // {Boolean} Get all NexVisor nodes (Exclude Photon nodes).
};

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

namespace Example
{
    public class nodesGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var refresh = true;  // Boolean | Refresh the resources of nodes before getting the list. (optional) 
            var nexvisor = true;  // Boolean | Get all NexVisor nodes (Exclude Photon nodes). (optional) 

            try
            {
                // Get all nodes.
                array[Node] result = apiInstance.nodesGet(refresh, nexvisor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$refresh = true; // Boolean | Refresh the resources of nodes before getting the list.
$nexvisor = true; // Boolean | Get all NexVisor nodes (Exclude Photon nodes).

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

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $refresh = true; # Boolean | Refresh the resources of nodes before getting the list.
my $nexvisor = true; # Boolean | Get all NexVisor nodes (Exclude Photon nodes).

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

# create an instance of the API class
api_instance = swagger_client.NodesApi()
refresh = true # Boolean | Refresh the resources of nodes before getting the list. (optional)
nexvisor = true # Boolean | Get all NexVisor nodes (Exclude Photon nodes). (optional)

try: 
    # Get all nodes.
    api_response = api_instance.nodes_get(refresh=refresh, nexvisor=nexvisor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesGet: %s\n" % e)

Parameters

Query parameters
Name Description
refresh
Boolean
Refresh the resources of nodes before getting the list.
nexvisor
Boolean
Get all NexVisor nodes (Exclude Photon nodes).

Responses

Status: 200 - Successful, return an array of nodes.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

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

nodesNodeIdActionPut

Executes an action to a specific node.

The endpoint executes an action on the selected NexVisor. The following actions are supported * 'reboot', reboot the given node id. * 'activate_fomaster', activate failover master for a specific slave node. * 'deactivate_fomaster', deactivate failover master for a specific slave node. On the following scenarios, the endpoint will fail * The node does not exists. (404) * The action does not exists. (422) * The action does not supported for the current node. (422) * If the node is not in the state of ACTIVE. (422) * The master failover functionality is already activated on the current node. (422) * We don't allow more than one master failover nodes on the system. (422) * The requirements for the master failover functionality are not valid. (422) * No master failover node found on the system to deactivate. (422) * The (de)activation of automate master failover failed. (500)


/nodes/{node_id}/action

Usage and SDK Samples

curl -X PUT "http://localhost/api/nodes/{node_id}/action"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        ActionForNexvisor action = ; // ActionForNexvisor | The action to execute.
        try {
            apiInstance.nodesNodeIdActionPut(nodeId, action);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        ActionForNexvisor action = ; // ActionForNexvisor | The action to execute.
        try {
            apiInstance.nodesNodeIdActionPut(nodeId, action);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdActionPut");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.
ActionForNexvisor *action = ; // The action to execute. (optional)

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

// Executes an action to a specific node.
[apiInstance nodesNodeIdActionPutWith:nodeId
    action:action
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.

var opts = { 
  'action':  // {ActionForNexvisor} The action to execute.
};

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

namespace Example
{
    public class nodesNodeIdActionPutExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.
            var action = new ActionForNexvisor(); // ActionForNexvisor | The action to execute. (optional) 

            try
            {
                // Executes an action to a specific node.
                apiInstance.nodesNodeIdActionPut(nodeId, action);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.
$action = ; // ActionForNexvisor | The action to execute.

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

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.
my $action = WWW::SwaggerClient::Object::ActionForNexvisor->new(); # ActionForNexvisor | The action to execute.

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

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.
action =  # ActionForNexvisor | The action to execute. (optional)

try: 
    # Executes an action to a specific node.
    api_instance.nodes_node_id_action_put(nodeId, action=action)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required
Body parameters
Name Description
action

Responses

Status: 204 - Node started executing successfully the action, no content returned.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

nodesNodeIdCoresGet

Get the cores for the given node.

Return all the cores on that node based on given node id.


/nodes/{node_id}/cores

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Core] result = apiInstance.nodesNodeIdCoresGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdCoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Core] result = apiInstance.nodesNodeIdCoresGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdCoresGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

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

// Get the cores for the given node.
[apiInstance nodesNodeIdCoresGetWith:nodeId
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


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

namespace Example
{
    public class nodesNodeIdCoresGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the cores for the given node.
                array[Core] result = apiInstance.nodesNodeIdCoresGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdCoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

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

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

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

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get the cores for the given node.
    api_response = api_instance.nodes_node_id_cores_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - A list of cores.

[{id=700702_0_0, number=0, mvgroup_id=vhhj342d, node_id=700702, resource_group_id=1}, {id=700702_0_1, number=1, mvgroup_id=12rfg2, node_id=700702, resource_group_id=1}, {id=700702_0_2, number=2, mvgroup_id=32t4yh2, node_id=700702, resource_group_id=1}, {id=700702_0_3, number=3, mvgroup_id=afh543er, node_id=700702, resource_group_id=1}]

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

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

nodesNodeIdCoresPut

Update the cores of a specific node.

Only the property **resource_group_id** can be updated under some restrictions. In order to remove a core from a resource group, then the property **resource_group_id** must have a value of zero. The following update scenarios will fail with a validation error (422) * A core is removed from a **reserved** resource group. * A core is removed from a resource group that has instances and no matter for their state. * A core is removed from a resource group and it is the only core that group contains.


/nodes/{node_id}/cores

Usage and SDK Samples

curl -X PUT "http://localhost/api/nodes/{node_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

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

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        array[body] body = ; // array[body] | 
        try {
            array[Core] result = apiInstance.nodesNodeIdCoresPut(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdCoresPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        array[body] body = ; // array[body] | 
        try {
            array[Core] result = apiInstance.nodesNodeIdCoresPut(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdCoresPut");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.
array[body] *body = ; //  (optional)

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

// Update the cores of a specific node.
[apiInstance nodesNodeIdCoresPutWith:nodeId
    body:body
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.

var opts = { 
  'body':  // {array[body]} 
};

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

namespace Example
{
    public class nodesNodeIdCoresPutExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.
            var body = new array[body](); // array[body] |  (optional) 

            try
            {
                // Update the cores of a specific node.
                array[Core] result = apiInstance.nodesNodeIdCoresPut(nodeId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdCoresPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.
$body = ; // array[body] | 

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

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.
my $body = [WWW::SwaggerClient::Object::array[body]->new()]; # array[body] | 

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

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.
body =  # array[body] |  (optional)

try: 
    # Update the cores of a specific node.
    api_response = api_instance.nodes_node_id_cores_put(nodeId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdCoresPut: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - A list of cores.

[{id=700702_0_0, number=0, mvgroup_id=vhhj342d, node_id=700702, resource_group_id=1}, {id=700702_0_1, number=1, mvgroup_id=12rfg2, node_id=700702, resource_group_id=1}, {id=700702_0_2, number=2, mvgroup_id=32t4yh2, node_id=700702, resource_group_id=1}, {id=700702_0_3, number=3, mvgroup_id=afh543er, node_id=700702, resource_group_id=1}]

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdDelete

Delete the current node based on the given id.

Delete the current node corresponding to the given id.


/nodes/{node_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/nodes/{node_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            apiInstance.nodesNodeIdDelete(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            apiInstance.nodesNodeIdDelete(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Delete the current node based on the given id.
[apiInstance nodesNodeIdDeleteWith:nodeId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.nodesNodeIdDelete(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Delete the current node based on the given id.
                apiInstance.nodesNodeIdDelete(nodeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $api_instance->nodesNodeIdDelete($nodeId);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    $api_instance->nodesNodeIdDelete(nodeId => $nodeId);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Delete the current node based on the given id.
    api_instance.nodes_node_id_delete(nodeId)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 204 - Successful Removal of node, no content returned.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdGet

Get specific node info based on the given id.

Get specific node corresponding to given id in the current controller.


/nodes/{node_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            Node result = apiInstance.nodesNodeIdGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            Node result = apiInstance.nodesNodeIdGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get specific node info based on the given id.
[apiInstance nodesNodeIdGetWith:nodeId
              completionHandler: ^(Node output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get specific node info based on the given id.
                Node result = apiInstance.nodesNodeIdGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $result = $api_instance->nodesNodeIdGet($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    my $result = $api_instance->nodesNodeIdGet(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get specific node info based on the given id.
    api_response = api_instance.nodes_node_id_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - Successful, return information about this node.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdInstancesGet

Get the instances for the given node.


/nodes/{node_id}/instances

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Instance] result = apiInstance.nodesNodeIdInstancesGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Instance] result = apiInstance.nodesNodeIdInstancesGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdInstancesGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get the instances for the given node.
[apiInstance nodesNodeIdInstancesGetWith:nodeId
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdInstancesGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdInstancesGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the instances for the given node.
                array[Instance] result = apiInstance.nodesNodeIdInstancesGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $result = $api_instance->nodesNodeIdInstancesGet($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdInstancesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    my $result = $api_instance->nodesNodeIdInstancesGet(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdInstancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get the instances for the given node.
    api_response = api_instance.nodes_node_id_instances_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdInstancesGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - Instances for the current node.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdPathsGet

Get the physical paths for the given node.


/nodes/{node_id}/paths

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}/paths"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[PhysicalPathByNode] result = apiInstance.nodesNodeIdPathsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdPathsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[PhysicalPathByNode] result = apiInstance.nodesNodeIdPathsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdPathsGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get the physical paths for the given node.
[apiInstance nodesNodeIdPathsGetWith:nodeId
              completionHandler: ^(array[PhysicalPathByNode] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdPathsGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdPathsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the physical paths for the given node.
                array[PhysicalPathByNode] result = apiInstance.nodesNodeIdPathsGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdPathsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $result = $api_instance->nodesNodeIdPathsGet($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdPathsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    my $result = $api_instance->nodesNodeIdPathsGet(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdPathsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get the physical paths for the given node.
    api_response = api_instance.nodes_node_id_paths_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdPathsGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - Get a list of the physical paths.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdPut

Edit the current node based on the given id.

Edit the UnitID and the label of a specific node corresponding to given id in the current controller.


/nodes/{node_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/nodes/{node_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        PutNodeUnit putNode = ; // PutNodeUnit | The id and label of the node.
        try {
            NodeID result = apiInstance.nodesNodeIdPut(nodeId, putNode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        PutNodeUnit putNode = ; // PutNodeUnit | The id and label of the node.
        try {
            NodeID result = apiInstance.nodesNodeIdPut(nodeId, putNode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdPut");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.
PutNodeUnit *putNode = ; // The id and label of the node. (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Edit the current node based on the given id.
[apiInstance nodesNodeIdPutWith:nodeId
    putNode:putNode
              completionHandler: ^(NodeID output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.

var opts = { 
  'putNode':  // {PutNodeUnit} The id and label of the node.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdPut(nodeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.
            var putNode = new PutNodeUnit(); // PutNodeUnit | The id and label of the node. (optional) 

            try
            {
                // Edit the current node based on the given id.
                NodeID result = apiInstance.nodesNodeIdPut(nodeId, putNode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.
$putNode = ; // PutNodeUnit | The id and label of the node.

try {
    $result = $api_instance->nodesNodeIdPut($nodeId, $putNode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.
my $putNode = WWW::SwaggerClient::Object::PutNodeUnit->new(); # PutNodeUnit | The id and label of the node.

eval { 
    my $result = $api_instance->nodesNodeIdPut(nodeId => $nodeId, putNode => $putNode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.
putNode =  # PutNodeUnit | The id and label of the node. (optional)

try: 
    # Edit the current node based on the given id.
    api_response = api_instance.nodes_node_id_put(nodeId, putNode=putNode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required
Body parameters
Name Description
putNode

Responses

Status: 200 - Successful, the NexVisor info have been updated. The returned value is the ID of that node.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdResourceGroupsGet

Get the resource groups for the given node.


/nodes/{node_id}/resource_groups

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[NewResourceGroup] result = apiInstance.nodesNodeIdResourceGroupsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[NewResourceGroup] result = apiInstance.nodesNodeIdResourceGroupsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get the resource groups for the given node.
[apiInstance nodesNodeIdResourceGroupsGetWith:nodeId
              completionHandler: ^(array[NewResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdResourceGroupsGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdResourceGroupsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the resource groups for the given node.
                array[NewResourceGroup] result = apiInstance.nodesNodeIdResourceGroupsGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdResourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $result = $api_instance->nodesNodeIdResourceGroupsGet($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdResourceGroupsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    my $result = $api_instance->nodesNodeIdResourceGroupsGet(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdResourceGroupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get the resource groups for the given node.
    api_response = api_instance.nodes_node_id_resource_groups_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdResourceGroupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - Resource groups for the node.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

nodesNodeIdSocketsGet

Get the sockets of a specific node.


/nodes/{node_id}/sockets

Usage and SDK Samples

curl -X GET "http://localhost/api/nodes/{node_id}/sockets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Socket] result = apiInstance.nodesNodeIdSocketsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdSocketsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            array[Socket] result = apiInstance.nodesNodeIdSocketsGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdSocketsGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get the sockets of a specific node.
[apiInstance nodesNodeIdSocketsGetWith:nodeId
              completionHandler: ^(array[Socket] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NodesApi()

var nodeId = ; // {UUID} The node id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodesNodeIdSocketsGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdSocketsGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the sockets of a specific node.
                array[Socket] result = apiInstance.nodesNodeIdSocketsGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdSocketsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $result = $api_instance->nodesNodeIdSocketsGet($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdSocketsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = ; # UUID | The node id.

eval { 
    my $result = $api_instance->nodesNodeIdSocketsGet(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdSocketsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId =  # UUID | The node id.

try: 
    # Get the sockets of a specific node.
    api_response = api_instance.nodes_node_id_sockets_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdSocketsGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - A list of sockets.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Pcidevs

pcidevsGet

Get all PCI devices.


/pcidevs

Usage and SDK Samples

curl -X GET "http://localhost/api/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PcidevsApi;

import java.io.File;
import java.util.*;

public class PcidevsApiExample {

    public static void main(String[] args) {
        
        PcidevsApi apiInstance = new PcidevsApi();
        try {
            array[PCIDev] result = apiInstance.pcidevsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PcidevsApi;

public class PcidevsApiExample {

    public static void main(String[] args) {
        PcidevsApi apiInstance = new PcidevsApi();
        try {
            array[PCIDev] result = apiInstance.pcidevsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsGet");
            e.printStackTrace();
        }
    }
}

PcidevsApi *apiInstance = [[PcidevsApi alloc] init];

// Get all PCI devices.
[apiInstance pcidevsGetWithCompletionHandler: 
              ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PcidevsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pcidevsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pcidevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new PcidevsApi();

            try
            {
                // Get all PCI devices.
                array[PCIDev] result = apiInstance.pcidevsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PcidevsApi.pcidevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PcidevsApi();

try {
    $result = $api_instance->pcidevsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PcidevsApi->pcidevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PcidevsApi;

my $api_instance = WWW::SwaggerClient::PcidevsApi->new();

eval { 
    my $result = $api_instance->pcidevsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PcidevsApi->pcidevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PcidevsApi()

try: 
    # Get all PCI devices.
    api_response = api_instance.pcidevs_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PcidevsApi->pcidevsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of PCI devices.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

pcidevsGpusGet

Get all GPUs from PCI devices.


/pcidevs/gpus

Usage and SDK Samples

curl -X GET "http://localhost/api/pcidevs/gpus"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PcidevsApi;

import java.io.File;
import java.util.*;

public class PcidevsApiExample {

    public static void main(String[] args) {
        
        PcidevsApi apiInstance = new PcidevsApi();
        try {
            array[PCIDev] result = apiInstance.pcidevsGpusGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsGpusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PcidevsApi;

public class PcidevsApiExample {

    public static void main(String[] args) {
        PcidevsApi apiInstance = new PcidevsApi();
        try {
            array[PCIDev] result = apiInstance.pcidevsGpusGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsGpusGet");
            e.printStackTrace();
        }
    }
}

PcidevsApi *apiInstance = [[PcidevsApi alloc] init];

// Get all GPUs from PCI devices.
[apiInstance pcidevsGpusGetWithCompletionHandler: 
              ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PcidevsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pcidevsGpusGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pcidevsGpusGetExample
    {
        public void main()
        {
            
            var apiInstance = new PcidevsApi();

            try
            {
                // Get all GPUs from PCI devices.
                array[PCIDev] result = apiInstance.pcidevsGpusGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PcidevsApi.pcidevsGpusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PcidevsApi();

try {
    $result = $api_instance->pcidevsGpusGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PcidevsApi->pcidevsGpusGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PcidevsApi;

my $api_instance = WWW::SwaggerClient::PcidevsApi->new();

eval { 
    my $result = $api_instance->pcidevsGpusGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PcidevsApi->pcidevsGpusGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PcidevsApi()

try: 
    # Get all GPUs from PCI devices.
    api_response = api_instance.pcidevs_gpus_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PcidevsApi->pcidevsGpusGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of PCI devices.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

pcidevsPcidevIdGet

Get specific PCI device info based on the given id.


/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PcidevsApi;

import java.io.File;
import java.util.*;

public class PcidevsApiExample {

    public static void main(String[] args) {
        
        PcidevsApi apiInstance = new PcidevsApi();
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            PCIDev result = apiInstance.pcidevsPcidevIdGet(pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsPcidevIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PcidevsApi;

public class PcidevsApiExample {

    public static void main(String[] args) {
        PcidevsApi apiInstance = new PcidevsApi();
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            PCIDev result = apiInstance.pcidevsPcidevIdGet(pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PcidevsApi#pcidevsPcidevIdGet");
            e.printStackTrace();
        }
    }
}
Long *pcidevId = 789; // The PCI device id.

PcidevsApi *apiInstance = [[PcidevsApi alloc] init];

// Get specific PCI device info based on the given id.
[apiInstance pcidevsPcidevIdGetWith:pcidevId
              completionHandler: ^(PCIDev output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PcidevsApi()

var pcidevId = 789; // {Long} The PCI device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pcidevsPcidevIdGet(pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pcidevsPcidevIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new PcidevsApi();
            var pcidevId = 789;  // Long | The PCI device id.

            try
            {
                // Get specific PCI device info based on the given id.
                PCIDev result = apiInstance.pcidevsPcidevIdGet(pcidevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PcidevsApi.pcidevsPcidevIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PcidevsApi();
$pcidevId = 789; // Long | The PCI device id.

try {
    $result = $api_instance->pcidevsPcidevIdGet($pcidevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PcidevsApi->pcidevsPcidevIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PcidevsApi;

my $api_instance = WWW::SwaggerClient::PcidevsApi->new();
my $pcidevId = 789; # Long | The PCI device id.

eval { 
    my $result = $api_instance->pcidevsPcidevIdGet(pcidevId => $pcidevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PcidevsApi->pcidevsPcidevIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PcidevsApi()
pcidevId = 789 # Long | The PCI device id.

try: 
    # Get specific PCI device info based on the given id.
    api_response = api_instance.pcidevs_pcidev_id_get(pcidevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PcidevsApi->pcidevsPcidevIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
pcidev_id*
Long (int64)
The PCI device id.
Required

Responses

Status: 200 - A PCI device.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

PhysicalBlockdevs

physicalBlockdevsBdIdDelete

Remove a block device from the system.

Remove an initialized block device from the system. The following scenarios will result in a *failed* response * Not all required parameters provided(400) * The block device does not exist(404) * The block device is in use(422)


/physical_blockdevs/{bd_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/physical_blockdevs/{bd_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PhysicalBlockdevsApi;

import java.io.File;
import java.util.*;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdDelete(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PhysicalBlockdevsApi;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdDelete(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *bdId = ; // The block device id.

PhysicalBlockdevsApi *apiInstance = [[PhysicalBlockdevsApi alloc] init];

// Remove a block device from the system.
[apiInstance physicalBlockdevsBdIdDeleteWith:bdId
              completionHandler: ^(PhysicalBlockDevice output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PhysicalBlockdevsApi()

var bdId = ; // {UUID} The block device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.physicalBlockdevsBdIdDelete(bdId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class physicalBlockdevsBdIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new PhysicalBlockdevsApi();
            var bdId = new UUID(); // UUID | The block device id.

            try
            {
                // Remove a block device from the system.
                PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdDelete(bdId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PhysicalBlockdevsApi.physicalBlockdevsBdIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PhysicalBlockdevsApi();
$bdId = ; // UUID | The block device id.

try {
    $result = $api_instance->physicalBlockdevsBdIdDelete($bdId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PhysicalBlockdevsApi;

my $api_instance = WWW::SwaggerClient::PhysicalBlockdevsApi->new();
my $bdId = ; # UUID | The block device id.

eval { 
    my $result = $api_instance->physicalBlockdevsBdIdDelete(bdId => $bdId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PhysicalBlockdevsApi()
bdId =  # UUID | The block device id.

try: 
    # Remove a block device from the system.
    api_response = api_instance.physical_blockdevs_bd_id_delete(bdId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
bd_id*
UUID (uuid)
The block device id.
Required

Responses

Status: 200 - Block device successfuly removed.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

physicalBlockdevsBdIdGet

Get the physical block device based on the UUID.

A succesful response will return the specified physical block device.


/physical_blockdevs/{bd_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/physical_blockdevs/{bd_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PhysicalBlockdevsApi;

import java.io.File;
import java.util.*;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdGet(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PhysicalBlockdevsApi;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdGet(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdGet");
            e.printStackTrace();
        }
    }
}
UUID *bdId = ; // The block device id.

PhysicalBlockdevsApi *apiInstance = [[PhysicalBlockdevsApi alloc] init];

// Get the physical block device based on the UUID.
[apiInstance physicalBlockdevsBdIdGetWith:bdId
              completionHandler: ^(PhysicalBlockDevice output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PhysicalBlockdevsApi()

var bdId = ; // {UUID} The block device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.physicalBlockdevsBdIdGet(bdId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class physicalBlockdevsBdIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new PhysicalBlockdevsApi();
            var bdId = new UUID(); // UUID | The block device id.

            try
            {
                // Get the physical block device based on the UUID.
                PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdGet(bdId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PhysicalBlockdevsApi.physicalBlockdevsBdIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PhysicalBlockdevsApi();
$bdId = ; // UUID | The block device id.

try {
    $result = $api_instance->physicalBlockdevsBdIdGet($bdId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PhysicalBlockdevsApi;

my $api_instance = WWW::SwaggerClient::PhysicalBlockdevsApi->new();
my $bdId = ; # UUID | The block device id.

eval { 
    my $result = $api_instance->physicalBlockdevsBdIdGet(bdId => $bdId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PhysicalBlockdevsApi()
bdId =  # UUID | The block device id.

try: 
    # Get the physical block device based on the UUID.
    api_response = api_instance.physical_blockdevs_bd_id_get(bdId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
bd_id*
UUID (uuid)
The block device id.
Required

Responses

Status: 200 - A physical block device.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

physicalBlockdevsBdIdPost

Format and initialize a block device.

Completely remove all partitions and filesystems of a block device and make it ready for use. The following scenarios will result in a *failed* response * Not all required parameters provided(400) * The block device does not exist(404)


/physical_blockdevs/{bd_id}

Usage and SDK Samples

curl -X POST "http://localhost/api/physical_blockdevs/{bd_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PhysicalBlockdevsApi;

import java.io.File;
import java.util.*;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdPost(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PhysicalBlockdevsApi;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        UUID bdId = ; // UUID | The block device id.
        try {
            PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdPost(bdId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsBdIdPost");
            e.printStackTrace();
        }
    }
}
UUID *bdId = ; // The block device id.

PhysicalBlockdevsApi *apiInstance = [[PhysicalBlockdevsApi alloc] init];

// Format and initialize a block device.
[apiInstance physicalBlockdevsBdIdPostWith:bdId
              completionHandler: ^(PhysicalBlockDevice output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PhysicalBlockdevsApi()

var bdId = ; // {UUID} The block device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.physicalBlockdevsBdIdPost(bdId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class physicalBlockdevsBdIdPostExample
    {
        public void main()
        {
            
            var apiInstance = new PhysicalBlockdevsApi();
            var bdId = new UUID(); // UUID | The block device id.

            try
            {
                // Format and initialize a block device.
                PhysicalBlockDevice result = apiInstance.physicalBlockdevsBdIdPost(bdId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PhysicalBlockdevsApi.physicalBlockdevsBdIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PhysicalBlockdevsApi();
$bdId = ; // UUID | The block device id.

try {
    $result = $api_instance->physicalBlockdevsBdIdPost($bdId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PhysicalBlockdevsApi;

my $api_instance = WWW::SwaggerClient::PhysicalBlockdevsApi->new();
my $bdId = ; # UUID | The block device id.

eval { 
    my $result = $api_instance->physicalBlockdevsBdIdPost(bdId => $bdId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PhysicalBlockdevsApi()
bdId =  # UUID | The block device id.

try: 
    # Format and initialize a block device.
    api_response = api_instance.physical_blockdevs_bd_id_post(bdId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhysicalBlockdevsApi->physicalBlockdevsBdIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
bd_id*
UUID (uuid)
The block device id.
Required

Responses

Status: 200 - Block device successfuly initialized.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

physicalBlockdevsGet

Get all available physical block devices.

A succesful response will return all the physical block devices available for storage use, including certain information about them.


/physical_blockdevs

Usage and SDK Samples

curl -X GET "http://localhost/api/physical_blockdevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PhysicalBlockdevsApi;

import java.io.File;
import java.util.*;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        try {
            array[PhysicalBlockDevice] result = apiInstance.physicalBlockdevsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PhysicalBlockdevsApi;

public class PhysicalBlockdevsApiExample {

    public static void main(String[] args) {
        PhysicalBlockdevsApi apiInstance = new PhysicalBlockdevsApi();
        try {
            array[PhysicalBlockDevice] result = apiInstance.physicalBlockdevsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhysicalBlockdevsApi#physicalBlockdevsGet");
            e.printStackTrace();
        }
    }
}

PhysicalBlockdevsApi *apiInstance = [[PhysicalBlockdevsApi alloc] init];

// Get all available physical block devices.
[apiInstance physicalBlockdevsGetWithCompletionHandler: 
              ^(array[PhysicalBlockDevice] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PhysicalBlockdevsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.physicalBlockdevsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class physicalBlockdevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new PhysicalBlockdevsApi();

            try
            {
                // Get all available physical block devices.
                array[PhysicalBlockDevice] result = apiInstance.physicalBlockdevsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PhysicalBlockdevsApi.physicalBlockdevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PhysicalBlockdevsApi();

try {
    $result = $api_instance->physicalBlockdevsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PhysicalBlockdevsApi->physicalBlockdevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PhysicalBlockdevsApi;

my $api_instance = WWW::SwaggerClient::PhysicalBlockdevsApi->new();

eval { 
    my $result = $api_instance->physicalBlockdevsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PhysicalBlockdevsApi->physicalBlockdevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PhysicalBlockdevsApi()

try: 
    # Get all available physical block devices.
    api_response = api_instance.physical_blockdevs_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhysicalBlockdevsApi->physicalBlockdevsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of physical block devices.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Racks

racksGet

Get all available racks.

A succesful response will return all the racks including their mounted chassis. No data about the blades of each chassis will be included.


/racks

Usage and SDK Samples

curl -X GET "http://localhost/api/racks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        try {
            array[Rack] result = apiInstance.racksGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        try {
            array[Rack] result = apiInstance.racksGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksGet");
            e.printStackTrace();
        }
    }
}

RacksApi *apiInstance = [[RacksApi alloc] init];

// Get all available racks.
[apiInstance racksGetWithCompletionHandler: 
              ^(array[Rack] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.racksGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksGetExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();

            try
            {
                // Get all available racks.
                array[Rack] result = apiInstance.racksGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();

try {
    $result = $api_instance->racksGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();

eval { 
    my $result = $api_instance->racksGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacksApi->racksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()

try: 
    # Get all available racks.
    api_response = api_instance.racks_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacksApi->racksGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of racks.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

racksPost

Create a new rack.

Only the properties **limit_units** and **label** can be provided as initial values for the new rack. For the time being it is considered invalid to supply mounted chassis as well since this would complicate the validation logic.


/racks

Usage and SDK Samples

curl -X POST "http://localhost/api/racks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        NewRack rack = ; // NewRack | The rack to create.
        try {
            Rack result = apiInstance.racksPost(rack);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        NewRack rack = ; // NewRack | The rack to create.
        try {
            Rack result = apiInstance.racksPost(rack);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksPost");
            e.printStackTrace();
        }
    }
}
NewRack *rack = ; // The rack to create. (optional)

RacksApi *apiInstance = [[RacksApi alloc] init];

// Create a new rack.
[apiInstance racksPostWith:rack
              completionHandler: ^(Rack output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var opts = { 
  'rack':  // {NewRack} The rack to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.racksPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksPostExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();
            var rack = new NewRack(); // NewRack | The rack to create. (optional) 

            try
            {
                // Create a new rack.
                Rack result = apiInstance.racksPost(rack);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();
$rack = ; // NewRack | The rack to create.

try {
    $result = $api_instance->racksPost($rack);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();
my $rack = WWW::SwaggerClient::Object::NewRack->new(); # NewRack | The rack to create.

eval { 
    my $result = $api_instance->racksPost(rack => $rack);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacksApi->racksPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()
rack =  # NewRack | The rack to create. (optional)

try: 
    # Create a new rack.
    api_response = api_instance.racks_post(rack=rack)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacksApi->racksPost: %s\n" % e)

Parameters

Body parameters
Name Description
rack

Responses

Status: 201 - Rack succesfully created.

Name Type Format Description
Location String uri The full URI of the created chassis.

Status: 400 - Rack couldn't have been created.

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 occured.

{code=500, message=Operation X did something wrong during processing}

racksRackIdBladesGet

Get all the blades found in a specific rack.


/racks/{rack_id}/blades

Usage and SDK Samples

curl -X GET "http://localhost/api/racks/{rack_id}/blades"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            array[Blade] result = apiInstance.racksRackIdBladesGet(rackId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdBladesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            array[Blade] result = apiInstance.racksRackIdBladesGet(rackId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdBladesGet");
            e.printStackTrace();
        }
    }
}
Long *rackId = 789; // The rack id.

RacksApi *apiInstance = [[RacksApi alloc] init];

// Get all the blades found in a specific rack.
[apiInstance racksRackIdBladesGetWith:rackId
              completionHandler: ^(array[Blade] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var rackId = 789; // {Long} The rack id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.racksRackIdBladesGet(rackId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksRackIdBladesGetExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();
            var rackId = 789;  // Long | The rack id.

            try
            {
                // Get all the blades found in a specific rack.
                array[Blade] result = apiInstance.racksRackIdBladesGet(rackId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksRackIdBladesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();
$rackId = 789; // Long | The rack id.

try {
    $result = $api_instance->racksRackIdBladesGet($rackId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksRackIdBladesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();
my $rackId = 789; # Long | The rack id.

eval { 
    my $result = $api_instance->racksRackIdBladesGet(rackId => $rackId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacksApi->racksRackIdBladesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()
rackId = 789 # Long | The rack id.

try: 
    # Get all the blades found in a specific rack.
    api_response = api_instance.racks_rack_id_blades_get(rackId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacksApi->racksRackIdBladesGet: %s\n" % e)

Parameters

Path parameters
Name Description
rack_id*
Long (int64)
The rack id.
Required

Responses

Status: 200 - A list of blades.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

racksRackIdDelete

Delete a rack.

Given a rack id, this operation will delete it only if there aren't any mounted chassis. If that's not the case then this is considered a validation error and a 422 status response will be returned without performing the deletion.


/racks/{rack_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/racks/{rack_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            apiInstance.racksRackIdDelete(rackId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            apiInstance.racksRackIdDelete(rackId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdDelete");
            e.printStackTrace();
        }
    }
}
Long *rackId = 789; // The rack id.

RacksApi *apiInstance = [[RacksApi alloc] init];

// Delete a rack.
[apiInstance racksRackIdDeleteWith:rackId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var rackId = 789; // {Long} The rack id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.racksRackIdDelete(rackId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksRackIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();
            var rackId = 789;  // Long | The rack id.

            try
            {
                // Delete a rack.
                apiInstance.racksRackIdDelete(rackId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksRackIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();
$rackId = 789; // Long | The rack id.

try {
    $api_instance->racksRackIdDelete($rackId);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksRackIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();
my $rackId = 789; # Long | The rack id.

eval { 
    $api_instance->racksRackIdDelete(rackId => $rackId);
};
if ($@) {
    warn "Exception when calling RacksApi->racksRackIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()
rackId = 789 # Long | The rack id.

try: 
    # Delete a rack.
    api_instance.racks_rack_id_delete(rackId)
except ApiException as e:
    print("Exception when calling RacksApi->racksRackIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
rack_id*
Long (int64)
The rack id.
Required

Responses

Status: 204 - Rack successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

racksRackIdGet

Get the rack based on the ID.

A succesful response will return the rack including its mounted chassis. No data about the blades of each chassis will be included.


/racks/{rack_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/racks/{rack_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            Rack result = apiInstance.racksRackIdGet(rackId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        try {
            Rack result = apiInstance.racksRackIdGet(rackId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdGet");
            e.printStackTrace();
        }
    }
}
Long *rackId = 789; // The rack id.

RacksApi *apiInstance = [[RacksApi alloc] init];

// Get the rack based on the ID.
[apiInstance racksRackIdGetWith:rackId
              completionHandler: ^(Rack output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var rackId = 789; // {Long} The rack id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.racksRackIdGet(rackId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksRackIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();
            var rackId = 789;  // Long | The rack id.

            try
            {
                // Get the rack based on the ID.
                Rack result = apiInstance.racksRackIdGet(rackId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksRackIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();
$rackId = 789; // Long | The rack id.

try {
    $result = $api_instance->racksRackIdGet($rackId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksRackIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();
my $rackId = 789; # Long | The rack id.

eval { 
    my $result = $api_instance->racksRackIdGet(rackId => $rackId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacksApi->racksRackIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()
rackId = 789 # Long | The rack id.

try: 
    # Get the rack based on the ID.
    api_response = api_instance.racks_rack_id_get(rackId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacksApi->racksRackIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
rack_id*
Long (int64)
The rack id.
Required

Responses

Status: 200 - A rack.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

racksRackIdPut

Update a rack

Only the properties **limit_units**, **label** and **mounted_chassis** can be updated under some restrictions. * **limit_units** - This can be changed if and only if the rack does not contains any mounted chassis. If it does then this is considered a validation error and a 422 response will be returned. If in the same response, the body contains a *mounted_chassis* with an empty array as a value then this is a valid change. * **label** - There are no restrictions. It can be updated anytime. * **mounted_chassis** - This is an array containing pairs of chassis ids and start positions. This is meant to completely replace the existing mounted chassis list of the rack. For example, if the rack contains 3 chassis and the request has an empty array for mounted_chassis, that means that the user wants to remove all chassis from that rack. If one of the above properties is missing from the response body, this means that it will be neither updated nor deleted. Finally, in a succesful update, the updated rack will be included in the response body.


/racks/{rack_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/racks/{rack_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RacksApi;

import java.io.File;
import java.util.*;

public class RacksApiExample {

    public static void main(String[] args) {
        
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        UpdatedRack rack = ; // UpdatedRack | The data to update the specific chassis.
        try {
            Rack result = apiInstance.racksRackIdPut(rackId, rack);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RacksApi;

public class RacksApiExample {

    public static void main(String[] args) {
        RacksApi apiInstance = new RacksApi();
        Long rackId = 789; // Long | The rack id.
        UpdatedRack rack = ; // UpdatedRack | The data to update the specific chassis.
        try {
            Rack result = apiInstance.racksRackIdPut(rackId, rack);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacksApi#racksRackIdPut");
            e.printStackTrace();
        }
    }
}
Long *rackId = 789; // The rack id.
UpdatedRack *rack = ; // The data to update the specific chassis.

RacksApi *apiInstance = [[RacksApi alloc] init];

// Update a rack
[apiInstance racksRackIdPutWith:rackId
    rack:rack
              completionHandler: ^(Rack output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RacksApi()

var rackId = 789; // {Long} The rack id.

var rack = ; // {UpdatedRack} The data to update the specific chassis.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.racksRackIdPut(rackIdrack, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class racksRackIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new RacksApi();
            var rackId = 789;  // Long | The rack id.
            var rack = new UpdatedRack(); // UpdatedRack | The data to update the specific chassis.

            try
            {
                // Update a rack
                Rack result = apiInstance.racksRackIdPut(rackId, rack);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RacksApi.racksRackIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RacksApi();
$rackId = 789; // Long | The rack id.
$rack = ; // UpdatedRack | The data to update the specific chassis.

try {
    $result = $api_instance->racksRackIdPut($rackId, $rack);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacksApi->racksRackIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RacksApi;

my $api_instance = WWW::SwaggerClient::RacksApi->new();
my $rackId = 789; # Long | The rack id.
my $rack = WWW::SwaggerClient::Object::UpdatedRack->new(); # UpdatedRack | The data to update the specific chassis.

eval { 
    my $result = $api_instance->racksRackIdPut(rackId => $rackId, rack => $rack);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacksApi->racksRackIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RacksApi()
rackId = 789 # Long | The rack id.
rack =  # UpdatedRack | The data to update the specific chassis.

try: 
    # Update a rack
    api_response = api_instance.racks_rack_id_put(rackId, rack)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacksApi->racksRackIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
rack_id*
Long (int64)
The rack id.
Required
Body parameters
Name Description
rack *

Responses

Status: 200 - Rack successfully updated.

Status: 400 - Rack couldn't have been updated.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

Recipes

recipesGet

Get all the recipes.


/recipes

Usage and SDK Samples

curl -X GET "http://localhost/api/recipes"
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.recipesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesGet");
            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.recipesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesGet");
            e.printStackTrace();
        }
    }
}

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get all the recipes.
[apiInstance recipesGetWithCompletionHandler: 
              ^(array[Recipe] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();

            try
            {
                // Get all the recipes.
                array[Recipe] result = apiInstance.recipesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();

try {
    $result = $api_instance->recipesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesGet: ', $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->recipesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesGet: $@\n";
}
from __future__ import print_statement
import time
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 the recipes.
    api_response = api_instance.recipes_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of recipes.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesPost

Create a new recipe.


/recipes

Usage and SDK Samples

curl -X POST "http://localhost/api/recipes"
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();
        NewRecipe newRecipe = ; // NewRecipe | The recipe to create.
        try {
            apiInstance.recipesPost(newRecipe);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        NewRecipe newRecipe = ; // NewRecipe | The recipe to create.
        try {
            apiInstance.recipesPost(newRecipe);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesPost");
            e.printStackTrace();
        }
    }
}
NewRecipe *newRecipe = ; // The recipe to create. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Create a new recipe.
[apiInstance recipesPostWith:newRecipe
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var opts = { 
  'newRecipe':  // {NewRecipe} The recipe to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesPostExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();
            var newRecipe = new NewRecipe(); // NewRecipe | The recipe to create. (optional) 

            try
            {
                // Create a new recipe.
                apiInstance.recipesPost(newRecipe);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();
$newRecipe = ; // NewRecipe | The recipe to create.

try {
    $api_instance->recipesPost($newRecipe);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $newRecipe = WWW::SwaggerClient::Object::NewRecipe->new(); # NewRecipe | The recipe to create.

eval { 
    $api_instance->recipesPost(newRecipe => $newRecipe);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesPost: $@\n";
}
from __future__ import print_statement
import time
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()
newRecipe =  # NewRecipe | The recipe to create. (optional)

try: 
    # Create a new recipe.
    api_instance.recipes_post(newRecipe=newRecipe)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesPost: %s\n" % e)

Parameters

Body parameters
Name Description
newRecipe

Responses

Status: 202 - Succesfully initiated recipe creation.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - Status bad request.

{code=400}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesRecipeIdAnsibleLogsGet

Get a recipe's ansible logs.


/recipes/{recipe_id}/ansible_logs

Usage and SDK Samples

curl -X GET "http://localhost/api/recipes/{recipe_id}/ansible_logs?license="
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 recipeId = 56; // Integer | The recipe id.
        Integer license = 56; // Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines.
        try {
            inline_response_200_6 result = apiInstance.recipesRecipeIdAnsibleLogsGet(recipeId, license);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        Integer license = 56; // Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines.
        try {
            inline_response_200_6 result = apiInstance.recipesRecipeIdAnsibleLogsGet(recipeId, license);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeId = 56; // The recipe id.
Integer *license = 56; // The lines of logs to retrieve. If not set or 0 retrieves all lines. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get a recipe's ansible logs.
[apiInstance recipesRecipeIdAnsibleLogsGetWith:recipeId
    license:license
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var recipeId = 56; // {Integer} The recipe id.

var opts = { 
  'license': 56 // {Integer} The lines of logs to retrieve. If not set or 0 retrieves all lines.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRecipeIdAnsibleLogsGet(recipeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRecipeIdAnsibleLogsGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();
            var recipeId = 56;  // Integer | The recipe id.
            var license = 56;  // Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines. (optional) 

            try
            {
                // Get a recipe's ansible logs.
                inline_response_200_6 result = apiInstance.recipesRecipeIdAnsibleLogsGet(recipeId, license);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesRecipeIdAnsibleLogsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();
$recipeId = 56; // Integer | The recipe id.
$license = 56; // Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines.

try {
    $result = $api_instance->recipesRecipeIdAnsibleLogsGet($recipeId, $license);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesRecipeIdAnsibleLogsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeId = 56; # Integer | The recipe id.
my $license = 56; # Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines.

eval { 
    my $result = $api_instance->recipesRecipeIdAnsibleLogsGet(recipeId => $recipeId, license => $license);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesRecipeIdAnsibleLogsGet: $@\n";
}
from __future__ import print_statement
import time
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()
recipeId = 56 # Integer | The recipe id.
license = 56 # Integer | The lines of logs to retrieve. If not set or 0 retrieves all lines. (optional)

try: 
    # Get a recipe's ansible logs.
    api_response = api_instance.recipes_recipe_id_ansible_logs_get(recipeId, license=license)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesRecipeIdAnsibleLogsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_id*
Integer (uint)
The recipe id.
Required
Query parameters
Name Description
license
Integer
The lines of logs to retrieve. If not set or 0 retrieves all lines.

Responses

Status: 200 - Recipe's ansible logs.

Status: 400 - Status bad request.

{code=400}

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesRecipeIdDelete

Delete a recipe.


/recipes/{recipe_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/recipes/{recipe_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

import java.io.File;
import java.util.*;

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            apiInstance.recipesRecipeIdDelete(recipeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            apiInstance.recipesRecipeIdDelete(recipeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeId = 56; // The recipe id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Delete a recipe.
[apiInstance recipesRecipeIdDeleteWith:recipeId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var recipeId = 56; // {Integer} The recipe id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesRecipeIdDelete(recipeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRecipeIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();
            var recipeId = 56;  // Integer | The recipe id.

            try
            {
                // Delete a recipe.
                apiInstance.recipesRecipeIdDelete(recipeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesRecipeIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();
$recipeId = 56; // Integer | The recipe id.

try {
    $api_instance->recipesRecipeIdDelete($recipeId);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesRecipeIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeId = 56; # Integer | The recipe id.

eval { 
    $api_instance->recipesRecipeIdDelete(recipeId => $recipeId);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesRecipeIdDelete: $@\n";
}
from __future__ import print_statement
import time
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()
recipeId = 56 # Integer | The recipe id.

try: 
    # Delete a recipe.
    api_instance.recipes_recipe_id_delete(recipeId)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesRecipeIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_id*
Integer (uint)
The recipe id.
Required

Responses

Status: 204 - Recipe deleted.

Status: 400 - Status bad request.

{code=400}

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesRecipeIdGet

Get a recipe.


/recipes/{recipe_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/recipes/{recipe_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

import java.io.File;
import java.util.*;

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            inline_response_200_4 result = apiInstance.recipesRecipeIdGet(recipeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            inline_response_200_4 result = apiInstance.recipesRecipeIdGet(recipeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeId = 56; // The recipe id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get a recipe.
[apiInstance recipesRecipeIdGetWith:recipeId
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var recipeId = 56; // {Integer} The recipe id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRecipeIdGet(recipeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRecipeIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();
            var recipeId = 56;  // Integer | The recipe id.

            try
            {
                // Get a recipe.
                inline_response_200_4 result = apiInstance.recipesRecipeIdGet(recipeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesRecipeIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();
$recipeId = 56; // Integer | The recipe id.

try {
    $result = $api_instance->recipesRecipeIdGet($recipeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesRecipeIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeId = 56; # Integer | The recipe id.

eval { 
    my $result = $api_instance->recipesRecipeIdGet(recipeId => $recipeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesRecipeIdGet: $@\n";
}
from __future__ import print_statement
import time
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()
recipeId = 56 # Integer | The recipe id.

try: 
    # Get a recipe.
    api_response = api_instance.recipes_recipe_id_get(recipeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesRecipeIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_id*
Integer (uint)
The recipe id.
Required

Responses

Status: 200 - Recipe details.

Status: 400 - Status bad request.

{code=400}

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesRecipeIdStatusGet

Get a recipe's status.


/recipes/{recipe_id}/status

Usage and SDK Samples

curl -X GET "http://localhost/api/recipes/{recipe_id}/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

import java.io.File;
import java.util.*;

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            inline_response_200_5 result = apiInstance.recipesRecipeIdStatusGet(recipeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdStatusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeId = 56; // Integer | The recipe id.
        try {
            inline_response_200_5 result = apiInstance.recipesRecipeIdStatusGet(recipeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeIdStatusGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeId = 56; // The recipe id.

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get a recipe's status.
[apiInstance recipesRecipeIdStatusGetWith:recipeId
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var recipeId = 56; // {Integer} The recipe id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRecipeIdStatusGet(recipeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRecipeIdStatusGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();
            var recipeId = 56;  // Integer | The recipe id.

            try
            {
                // Get a recipe's status.
                inline_response_200_5 result = apiInstance.recipesRecipeIdStatusGet(recipeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesRecipeIdStatusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();
$recipeId = 56; // Integer | The recipe id.

try {
    $result = $api_instance->recipesRecipeIdStatusGet($recipeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesRecipeIdStatusGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeId = 56; # Integer | The recipe id.

eval { 
    my $result = $api_instance->recipesRecipeIdStatusGet(recipeId => $recipeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesRecipeIdStatusGet: $@\n";
}
from __future__ import print_statement
import time
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()
recipeId = 56 # Integer | The recipe id.

try: 
    # Get a recipe's status.
    api_response = api_instance.recipes_recipe_id_status_get(recipeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesRecipeIdStatusGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_id*
Integer (uint)
The recipe id.
Required

Responses

Status: 200 - Recipe status.

Status: 400 - Status bad request.

{code=400}

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesRecipeTemplatesGet

Get all the recipe templates.


/recipes/recipe_templates

Usage and SDK Samples

curl -X GET "http://localhost/api/recipes/recipe_templates"
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[RecipeTemplates] result = apiInstance.recipesRecipeTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeTemplatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        try {
            array[RecipeTemplates] result = apiInstance.recipesRecipeTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesRecipeTemplatesGet");
            e.printStackTrace();
        }
    }
}

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Get all the recipe templates.
[apiInstance recipesRecipeTemplatesGetWithCompletionHandler: 
              ^(array[RecipeTemplates] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesRecipeTemplatesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesRecipeTemplatesGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();

            try
            {
                // Get all the recipe templates.
                array[RecipeTemplates] result = apiInstance.recipesRecipeTemplatesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesRecipeTemplatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();

try {
    $result = $api_instance->recipesRecipeTemplatesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesRecipeTemplatesGet: ', $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->recipesRecipeTemplatesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesRecipeTemplatesGet: $@\n";
}
from __future__ import print_statement
import time
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 the recipe templates.
    api_response = api_instance.recipes_recipe_templates_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesRecipeTemplatesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of recipe tempaltes.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

recipesUpdateRecipeTemplatesPut

Update all the recipe templates.


/recipes/update_recipe_templates

Usage and SDK Samples

curl -X PUT "http://localhost/api/recipes/update_recipe_templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

import java.io.File;
import java.util.*;

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        try {
            apiInstance.recipesUpdateRecipeTemplatesPut();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesUpdateRecipeTemplatesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        try {
            apiInstance.recipesUpdateRecipeTemplatesPut();
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesUpdateRecipeTemplatesPut");
            e.printStackTrace();
        }
    }
}

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Update all the recipe templates.
[apiInstance recipesUpdateRecipeTemplatesPutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RecipesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesUpdateRecipeTemplatesPut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recipesUpdateRecipeTemplatesPutExample
    {
        public void main()
        {
            
            var apiInstance = new RecipesApi();

            try
            {
                // Update all the recipe templates.
                apiInstance.recipesUpdateRecipeTemplatesPut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesUpdateRecipeTemplatesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RecipesApi();

try {
    $api_instance->recipesUpdateRecipeTemplatesPut();
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->recipesUpdateRecipeTemplatesPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();

eval { 
    $api_instance->recipesUpdateRecipeTemplatesPut();
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesUpdateRecipeTemplatesPut: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Update all the recipe templates.
    api_instance.recipes_update_recipe_templates_put()
except ApiException as e:
    print("Exception when calling RecipesApi->recipesUpdateRecipeTemplatesPut: %s\n" % e)

Parameters

Responses

Status: 200 - Successfully update recipe templates.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Repositories

repositoriesGet

Get list of image repositories.


/repositories

Usage and SDK Samples

curl -X GET "http://localhost/api/repositories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        try {
            array[ImageRepo] result = apiInstance.repositoriesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        try {
            array[ImageRepo] result = apiInstance.repositoriesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesGet");
            e.printStackTrace();
        }
    }
}

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Get list of image repositories.
[apiInstance repositoriesGetWithCompletionHandler: 
              ^(array[ImageRepo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RepositoriesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.repositoriesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class repositoriesGetExample
    {
        public void main()
        {
            
            var apiInstance = new RepositoriesApi();

            try
            {
                // Get list of image repositories.
                array[ImageRepo] result = apiInstance.repositoriesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.repositoriesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RepositoriesApi();

try {
    $result = $api_instance->repositoriesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->repositoriesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();

eval { 
    my $result = $api_instance->repositoriesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->repositoriesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()

try: 
    # Get list of image repositories.
    api_response = api_instance.repositories_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->repositoriesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of Repos.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

repositoriesPost

Create a Repository.

Creates a catalog record for a repository. The following update scenarios will fail with a validation error (422), * If username is empty will fail. * If password is empty will fail. * If url is empty will fail. * If repository_name is empty will fail.


/repositories

Usage and SDK Samples

curl -X POST "http://localhost/api/repositories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        NewTemplate repository = ; // NewTemplate | The repository to create.
        try {
            ImageRepo result = apiInstance.repositoriesPost(repository);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        NewTemplate repository = ; // NewTemplate | The repository to create.
        try {
            ImageRepo result = apiInstance.repositoriesPost(repository);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesPost");
            e.printStackTrace();
        }
    }
}
NewTemplate *repository = ; // The repository to create. (optional)

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Create a Repository.
[apiInstance repositoriesPostWith:repository
              completionHandler: ^(ImageRepo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RepositoriesApi()

var opts = { 
  'repository':  // {NewTemplate} The repository to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.repositoriesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class repositoriesPostExample
    {
        public void main()
        {
            
            var apiInstance = new RepositoriesApi();
            var repository = new NewTemplate(); // NewTemplate | The repository to create. (optional) 

            try
            {
                // Create a Repository.
                ImageRepo result = apiInstance.repositoriesPost(repository);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.repositoriesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RepositoriesApi();
$repository = ; // NewTemplate | The repository to create.

try {
    $result = $api_instance->repositoriesPost($repository);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->repositoriesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $repository = WWW::SwaggerClient::Object::NewTemplate->new(); # NewTemplate | The repository to create.

eval { 
    my $result = $api_instance->repositoriesPost(repository => $repository);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->repositoriesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
repository =  # NewTemplate | The repository to create. (optional)

try: 
    # Create a Repository.
    api_response = api_instance.repositories_post(repository=repository)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->repositoriesPost: %s\n" % e)

Parameters

Body parameters
Name Description
repository

Responses

Status: 201 - Repository succesfully created.

Status: 400 - Repository couldn't have been created.

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 occured.

{code=500, message=Operation X did something wrong during processing}

repositoriesRepositoryIdDelete

Delete a Repository.


/repositories/{repository_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/repositories/{repository_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Integer repositoryId = 56; // Integer | The repository id.
        try {
            apiInstance.repositoriesRepositoryIdDelete(repositoryId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesRepositoryIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Integer repositoryId = 56; // Integer | The repository id.
        try {
            apiInstance.repositoriesRepositoryIdDelete(repositoryId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesRepositoryIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *repositoryId = 56; // The repository id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Delete a Repository.
[apiInstance repositoriesRepositoryIdDeleteWith:repositoryId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RepositoriesApi()

var repositoryId = 56; // {Integer} The repository id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.repositoriesRepositoryIdDelete(repositoryId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class repositoriesRepositoryIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new RepositoriesApi();
            var repositoryId = 56;  // Integer | The repository id.

            try
            {
                // Delete a Repository.
                apiInstance.repositoriesRepositoryIdDelete(repositoryId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.repositoriesRepositoryIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RepositoriesApi();
$repositoryId = 56; // Integer | The repository id.

try {
    $api_instance->repositoriesRepositoryIdDelete($repositoryId);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->repositoriesRepositoryIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $repositoryId = 56; # Integer | The repository id.

eval { 
    $api_instance->repositoriesRepositoryIdDelete(repositoryId => $repositoryId);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->repositoriesRepositoryIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
repositoryId = 56 # Integer | The repository id.

try: 
    # Delete a Repository.
    api_instance.repositories_repository_id_delete(repositoryId)
except ApiException as e:
    print("Exception when calling RepositoriesApi->repositoriesRepositoryIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
repository_id*
Integer (uint)
The repository id.
Required

Responses

Status: 204 - Repository successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

repositoriesRepositoryIdGet

Get a Repository.


/repositories/{repository_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/repositories/{repository_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Integer repositoryId = 56; // Integer | The repository id.
        try {
            ImageRepo result = apiInstance.repositoriesRepositoryIdGet(repositoryId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesRepositoryIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Integer repositoryId = 56; // Integer | The repository id.
        try {
            ImageRepo result = apiInstance.repositoriesRepositoryIdGet(repositoryId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#repositoriesRepositoryIdGet");
            e.printStackTrace();
        }
    }
}
Integer *repositoryId = 56; // The repository id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Get a Repository.
[apiInstance repositoriesRepositoryIdGetWith:repositoryId
              completionHandler: ^(ImageRepo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.RepositoriesApi()

var repositoryId = 56; // {Integer} The repository id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.repositoriesRepositoryIdGet(repositoryId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class repositoriesRepositoryIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new RepositoriesApi();
            var repositoryId = 56;  // Integer | The repository id.

            try
            {
                // Get a Repository.
                ImageRepo result = apiInstance.repositoriesRepositoryIdGet(repositoryId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.repositoriesRepositoryIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RepositoriesApi();
$repositoryId = 56; // Integer | The repository id.

try {
    $result = $api_instance->repositoriesRepositoryIdGet($repositoryId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->repositoriesRepositoryIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $repositoryId = 56; # Integer | The repository id.

eval { 
    my $result = $api_instance->repositoriesRepositoryIdGet(repositoryId => $repositoryId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->repositoriesRepositoryIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.RepositoriesApi()
repositoryId = 56 # Integer | The repository id.

try: 
    # Get a Repository.
    api_response = api_instance.repositories_repository_id_get(repositoryId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->repositoriesRepositoryIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
repository_id*
Integer (uint)
The repository id.
Required

Responses

Status: 200 - Succesfully got an repository.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

ResourceGroups

instancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be one of: stop|start|restart|destroy|factory_reset.


/instances/{instance_id}/{action}

Usage and SDK Samples

curl -X PUT "http://localhost/api/instances/{instance_id}/{action}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer instanceId = 56; // Integer | The instance id.
        String action = action_example; // String | The action to perform.
        try {
            Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#instancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer instanceId = 56; // Integer | The instance id.
        String action = action_example; // String | The action to perform.
        try {
            Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#instancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
String *action = action_example; // The action to perform.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Apply action to specific instance.
[apiInstance instancesInstanceIdActionPutWith:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var instanceId = 56; // {Integer} The instance id.

var action = action_example; // {String} The action to perform.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.instancesInstanceIdActionPut(instanceId, action, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdActionPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var instanceId = 56;  // Integer | The instance id.
            var action = action_example;  // String | The action to perform.

            try
            {
                // Apply action to specific instance.
                Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.instancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$instanceId = 56; // Integer | The instance id.
$action = action_example; // String | The action to perform.

try {
    $result = $api_instance->instancesInstanceIdActionPut($instanceId, $action);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->instancesInstanceIdActionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $instanceId = 56; # Integer | The instance id.
my $action = action_example; # String | The action to perform.

eval { 
    my $result = $api_instance->instancesInstanceIdActionPut(instanceId => $instanceId, action => $action);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->instancesInstanceIdActionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
instanceId = 56 # Integer | The instance id.
action = action_example # String | The action to perform.

try: 
    # Apply action to specific instance.
    api_response = api_instance.instances_instance_id_action_put(instanceId, action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->instancesInstanceIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
action*
String
The action to perform.
Required

Responses

Status: 202 - Successfully applied action from instance.

Status: 400 - Status bad request.

{code=400}

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsPost

Create a new resource group.

The endpoint creates a new resource group. On the following scenarios, the endpoint will fail with 422 * The name can not be empty. * No core ids are assigned. * No datastore ids are assigned. * No network ids are assigned. * Unknown core, datastore or network ids are given. * The cpu_overcommit value is less than 1. * The cpu_overcommit value is greater than 8. * The CPU pinning is enabled and the cpu_overcommit is over 1.


/resource_groups

Usage and SDK Samples

curl -X POST "http://localhost/api/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        NewResourceGroup resourceGroup = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsPost(resourceGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        NewResourceGroup resourceGroup = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsPost(resourceGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsPost");
            e.printStackTrace();
        }
    }
}
NewResourceGroup *resourceGroup = ; // The resource group to create. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Create a new resource group.
[apiInstance resourceGroupsPostWith:resourceGroup
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var opts = { 
  'resourceGroup':  // {NewResourceGroup} The resource group to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsPostExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroup = new NewResourceGroup(); // NewResourceGroup | The resource group to create. (optional) 

            try
            {
                // Create a new resource group.
                ResourceGroup result = apiInstance.resourceGroupsPost(resourceGroup);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroup = ; // NewResourceGroup | The resource group to create.

try {
    $result = $api_instance->resourceGroupsPost($resourceGroup);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroup = WWW::SwaggerClient::Object::NewResourceGroup->new(); # NewResourceGroup | The resource group to create.

eval { 
    my $result = $api_instance->resourceGroupsPost(resourceGroup => $resourceGroup);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroup =  # NewResourceGroup | The resource group to create. (optional)

try: 
    # Create a new resource group.
    api_response = api_instance.resource_groups_post(resourceGroup=resourceGroup)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsPost: %s\n" % e)

Parameters

Body parameters
Name Description
resourceGroup

Responses

Status: 200 - Resource group succesfully created.

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 occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdCoresCoreIdDelete

Remove a core from a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/resource_groups/{resource_group_id}/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID coreId = ; // UUID | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID coreId = ; // UUID | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
UUID *coreId = ; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a core from a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdDeleteWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var coreId = ; // {UUID} The core id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var coreId = new UUID(); // UUID | The core id.

            try
            {
                // Remove a core from a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$coreId = ; // UUID | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $coreId = ; # UUID | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
coreId =  # UUID | The core id.

try: 
    # Remove a core from a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_delete(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
core_id*
UUID (uuid)
The core id.
Required

Responses

Status: 204 - Core successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdCoresCoreIdPut

Add a core to a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/resource_groups/{resource_group_id}/cores/{core_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID coreId = ; // UUID | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID coreId = ; // UUID | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
UUID *coreId = ; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a core to a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdPutWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var coreId = ; // {UUID} The core id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var coreId = new UUID(); // UUID | The core id.

            try
            {
                // Add a core to a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$coreId = ; // UUID | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $coreId = ; # UUID | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
coreId =  # UUID | The core id.

try: 
    # Add a core to a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_put(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
core_id*
UUID (uuid)
The core id.
Required

Responses

Status: 204 - Core is successfully added to the resource group.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete

Remove a datastore from a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/resource_groups/{resource_group_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
UUID *datastoreId = ; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a datastore from a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var datastoreId = ; // {UUID} The datastore id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var datastoreId = new UUID(); // UUID | The datastore id.

            try
            {
                // Remove a datastore from a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$datastoreId = ; // UUID | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $datastoreId = ; # UUID | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
datastoreId =  # UUID | The datastore id.

try: 
    # Remove a datastore from a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_delete(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 204 - Datastore successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdDatastoresDatastoreIdPut

Add a datastore to a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/resource_groups/{resource_group_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
UUID *datastoreId = ; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a datastore to a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdPutWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var datastoreId = ; // {UUID} The datastore id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var datastoreId = new UUID(); // UUID | The datastore id.

            try
            {
                // Add a datastore to a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$datastoreId = ; // UUID | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $datastoreId = ; # UUID | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
datastoreId =  # UUID | The datastore id.

try: 
    # Add a datastore to a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_put(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 204 - Datastore is successfully added to the resource group.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdNetworksNetworkIdDelete

Remove a network from a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/resource_groups/{resource_group_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Integer networkId = 56; // Integer | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Integer networkId = 56; // Integer | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Integer *networkId = 56; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a network from a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdDeleteWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var networkId = 56; // {Integer} The network id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Remove a network from a resource group.
                apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$networkId = 56; // Integer | The network id.

try {
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete($resourceGroupId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $networkId = 56; # Integer | The network id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId => $resourceGroupId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
networkId = 56 # Integer | The network id.

try: 
    # Remove a network from a resource group.
    api_instance.resource_groups_resource_group_id_networks_network_id_delete(resourceGroupId, networkId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 204 - Network successfully removed.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdNetworksNetworkIdPut

Add a network to a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/resource_groups/{resource_group_id}/networks/{network_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Integer networkId = 56; // Integer | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Integer networkId = 56; // Integer | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Integer *networkId = 56; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a network to a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdPutWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var networkId = 56; // {Integer} The network id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var networkId = 56;  // Integer | The network id.

            try
            {
                // Add a network to a resource group.
                Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$networkId = 56; // Integer | The network id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut($resourceGroupId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $networkId = 56; # Integer | The network id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId => $resourceGroupId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
networkId = 56 # Integer | The network id.

try: 
    # Add a network to a resource group.
    api_response = api_instance.resource_groups_resource_group_id_networks_network_id_put(resourceGroupId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
network_id*
Integer (uint)
The network id.
Required

Responses

Status: 204 - Network is successfully added to the resource group.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdPcidevsGet

Get all PCI devices from the given resource group.


/resource_groups/{resource_group_id}/pcidevs

Usage and SDK Samples

curl -X GET "http://localhost/api/resource_groups/{resource_group_id}/pcidevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        try {
            array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        try {
            array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all PCI devices from the given resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsGetWith:resourceGroupId
              completionHandler: ^(array[PCIDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} 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.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, , callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.

            try
            {
                // Get all PCI devices from the given resource group.
                array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPcidevsGet($resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.

try: 
    # Get all PCI devices from the given resource group.
    api_response = api_instance.resource_groups_resource_group_id_pcidevs_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required

Responses

Status: 200 - A list of PCI devices.

Status: 400 - Status bad request.

{code=400}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdPcidevsPcidevIdDelete

Remove a PCI device from a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Long *pcidevId = 789; // The PCI device id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a PCI device from a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var pcidevId = 789; // {Long} The PCI device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var pcidevId = 789;  // Long | The PCI device id.

            try
            {
                // Remove a PCI device from a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$pcidevId = 789; // Long | The PCI device id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $pcidevId = 789; # Long | The PCI device id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
pcidevId = 789 # Long | The PCI device id.

try: 
    # Remove a PCI device from a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_delete(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
pcidev_id*
Long (int64)
The PCI device id.
Required

Responses

Status: 204 - PCI device successfully removed from the resource group.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdPcidevsPcidevIdPut

Add a PCI device to a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pcidevId = 789; // Long | The PCI device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Long *pcidevId = 789; // The PCI device id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a PCI device to a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdPutWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var pcidevId = 789; // {Long} The PCI device id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var pcidevId = 789;  // Long | The PCI device id.

            try
            {
                // Add a PCI device to a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$pcidevId = 789; // Long | The PCI device id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $pcidevId = 789; # Long | The PCI device id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
pcidevId = 789 # Long | The PCI device id.

try: 
    # Add a PCI device to a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_put(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
pcidev_id*
Long (int64)
The PCI device id.
Required

Responses

Status: 204 - PCI device successfully added to the resource group.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

resourceGroupsResourceGroupIdPut

Edit a resource group based on its ID.

The endpoint will edit the resource group. On the following scenarios, the endpoint will fail * The name can not be empty. (422) * No core ids are assigned. (422) * No datastore ids are assigned. (422) * No network ids are assigned. (422) * Unknown core, datastore or network ids are given. (422) * Used core, datastore or network ids from the resource group but are not given. (422) * The cpu overcommit value is less than 1. (422) * The cpu overcommit value is greater than 8. (422) * The CPU pinning is enabled and the cpu_overcommit is over 1. (422)


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X PUT "http://localhost/api/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        NewResourceGroup resourceGroup = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, resourceGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        NewResourceGroup resourceGroup = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, resourceGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
NewResourceGroup *resourceGroup = ; // The resource group to create. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Edit a resource group based on its ID.
[apiInstance resourceGroupsResourceGroupIdPutWith:resourceGroupId
    resourceGroup:resourceGroup
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ResourceGroupsApi()

var resourceGroupId = 56; // {Integer} The resource group id.

var opts = { 
  'resourceGroup':  // {NewResourceGroup} The resource group to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPut(resourceGroupId, , opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var resourceGroup = new NewResourceGroup(); // NewResourceGroup | The resource group to create. (optional) 

            try
            {
                // Edit a resource group based on its ID.
                ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, resourceGroup);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$resourceGroup = ; // NewResourceGroup | The resource group to create.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPut($resourceGroupId, $resourceGroup);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $resourceGroup = WWW::SwaggerClient::Object::NewResourceGroup->new(); # NewResourceGroup | The resource group to create.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPut(resourceGroupId => $resourceGroupId, resourceGroup => $resourceGroup);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
resourceGroup =  # NewResourceGroup | The resource group to create. (optional)

try: 
    # Edit a resource group based on its ID.
    api_response = api_instance.resource_groups_resource_group_id_put(resourceGroupId, resourceGroup=resourceGroup)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
Body parameters
Name Description
resourceGroup

Responses

Status: 200 - Resource group succesfully updated.

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 occured.

{code=500, message=Operation X did something wrong during processing}

Sim

simConnectPost

Connect to a sim.

Creates a reverse ssh to a SIM from a controller.


/sim/connect

Usage and SDK Samples

curl -X POST "http://localhost/api/sim/connect"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        SimInfo encryptedSimInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".

        try {
            SimSession result = apiInstance.simConnectPost(encryptedSimInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simConnectPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        SimInfo encryptedSimInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".

        try {
            SimSession result = apiInstance.simConnectPost(encryptedSimInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simConnectPost");
            e.printStackTrace();
        }
    }
}
SimInfo *encryptedSimInfo = ; // The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".


SimApi *apiInstance = [[SimApi alloc] init];

// Connect to a sim.
[apiInstance simConnectPostWith:encryptedSimInfo
              completionHandler: ^(SimSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var encryptedSimInfo = ; // {SimInfo} The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.simConnectPost(encryptedSimInfo, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simConnectPostExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();
            var encryptedSimInfo = new SimInfo(); // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".


            try
            {
                // Connect to a sim.
                SimSession result = apiInstance.simConnectPost(encryptedSimInfo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simConnectPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();
$encryptedSimInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".


try {
    $result = $api_instance->simConnectPost($encryptedSimInfo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simConnectPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();
my $encryptedSimInfo = WWW::SwaggerClient::Object::SimInfo->new(); # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".


eval { 
    my $result = $api_instance->simConnectPost(encryptedSimInfo => $encryptedSimInfo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SimApi->simConnectPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()
encryptedSimInfo =  # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller plus the public key of the SIM,
i.e. ":SIM_public_key".


try: 
    # Connect to a sim.
    api_response = api_instance.sim_connect_post(encryptedSimInfo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SimApi->simConnectPost: %s\n" % e)

Parameters

Body parameters
Name Description
encryptedSimInfo *

Responses

Status: 200 - successful tunnel

Status: 500 - Could not decrypt the message

{code=500, message=crypto/rsa decryption error.}

simControllerPubkeyPost

Get the controller public key of a SIM session.


/sim/controller_pubkey

Usage and SDK Samples

curl -X POST "http://localhost/api/sim/controller_pubkey"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            inline_response_200_1 result = apiInstance.simControllerPubkeyPost(simInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simControllerPubkeyPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            inline_response_200_1 result = apiInstance.simControllerPubkeyPost(simInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simControllerPubkeyPost");
            e.printStackTrace();
        }
    }
}
SimInfo *simInfo = ; // The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

SimApi *apiInstance = [[SimApi alloc] init];

// Get the controller public key of a SIM session.
[apiInstance simControllerPubkeyPostWith:simInfo
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var opts = { 
  'simInfo':  // {SimInfo} The IP and the port as a json object encrypted with the public key
of the controller.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.simControllerPubkeyPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simControllerPubkeyPostExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();
            var simInfo = new SimInfo(); // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional) 

            try
            {
                // Get the controller public key of a SIM session.
                inline_response_200_1 result = apiInstance.simControllerPubkeyPost(simInfo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simControllerPubkeyPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();
$simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


try {
    $result = $api_instance->simControllerPubkeyPost($simInfo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simControllerPubkeyPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();
my $simInfo = WWW::SwaggerClient::Object::SimInfo->new(); # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


eval { 
    my $result = $api_instance->simControllerPubkeyPost(simInfo => $simInfo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SimApi->simControllerPubkeyPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()
simInfo =  # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

try: 
    # Get the controller public key of a SIM session.
    api_response = api_instance.sim_controller_pubkey_post(simInfo=simInfo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SimApi->simControllerPubkeyPost: %s\n" % e)

Parameters

Body parameters
Name Description
simInfo

Responses

Status: 200 - json object describing the status of a sim session.

Status: 500 - error when parsing json array


simDisconnectPost

Disconnect from a sim.

Removes reverse tunnel of the controller of a sim.


/sim/disconnect

Usage and SDK Samples

curl -X POST "http://localhost/api/sim/disconnect"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            apiInstance.simDisconnectPost(simInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simDisconnectPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            apiInstance.simDisconnectPost(simInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simDisconnectPost");
            e.printStackTrace();
        }
    }
}
SimInfo *simInfo = ; // The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

SimApi *apiInstance = [[SimApi alloc] init];

// Disconnect from a sim.
[apiInstance simDisconnectPostWith:simInfo
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var opts = { 
  'simInfo':  // {SimInfo} The IP and the port as a json object encrypted with the public key
of the controller.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.simDisconnectPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simDisconnectPostExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();
            var simInfo = new SimInfo(); // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional) 

            try
            {
                // Disconnect from a sim.
                apiInstance.simDisconnectPost(simInfo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simDisconnectPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();
$simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


try {
    $api_instance->simDisconnectPost($simInfo);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simDisconnectPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();
my $simInfo = WWW::SwaggerClient::Object::SimInfo->new(); # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


eval { 
    $api_instance->simDisconnectPost(simInfo => $simInfo);
};
if ($@) {
    warn "Exception when calling SimApi->simDisconnectPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()
simInfo =  # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

try: 
    # Disconnect from a sim.
    api_instance.sim_disconnect_post(simInfo=simInfo)
except ApiException as e:
    print("Exception when calling SimApi->simDisconnectPost: %s\n" % e)

Parameters

Body parameters
Name Description
simInfo

Responses

Status: 200 - successfully removed the tunnel

Status: 500 - Could not decrypt the message

{code=500, message=crypto/rsa decryption error.}

simGet

Get all active SIM sessions.


/sim

Usage and SDK Samples

curl -X GET "http://localhost/api/sim"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        try {
            array[SimSession] result = apiInstance.simGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        try {
            array[SimSession] result = apiInstance.simGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simGet");
            e.printStackTrace();
        }
    }
}

SimApi *apiInstance = [[SimApi alloc] init];

// Get all active SIM sessions.
[apiInstance simGetWithCompletionHandler: 
              ^(array[SimSession] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.simGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simGetExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();

            try
            {
                // Get all active SIM sessions.
                array[SimSession] result = apiInstance.simGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();

try {
    $result = $api_instance->simGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();

eval { 
    my $result = $api_instance->simGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SimApi->simGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()

try: 
    # Get all active SIM sessions.
    api_response = api_instance.sim_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SimApi->simGet: %s\n" % e)

Parameters

Responses

Status: 200 - json array of all active sim sessions.

Status: 500 - error when parsing json array


simReconnectPost

Retry to connect to a sim.

Reinitialize the connection to a sim after the session is expired.


/sim/reconnect

Usage and SDK Samples

curl -X POST "http://localhost/api/sim/reconnect"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            apiInstance.simReconnectPost(simInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simReconnectPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            apiInstance.simReconnectPost(simInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simReconnectPost");
            e.printStackTrace();
        }
    }
}
SimInfo *simInfo = ; // The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

SimApi *apiInstance = [[SimApi alloc] init];

// Retry to connect to a sim.
[apiInstance simReconnectPostWith:simInfo
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var opts = { 
  'simInfo':  // {SimInfo} The IP and the port as a json object encrypted with the public key
of the controller.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.simReconnectPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simReconnectPostExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();
            var simInfo = new SimInfo(); // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional) 

            try
            {
                // Retry to connect to a sim.
                apiInstance.simReconnectPost(simInfo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simReconnectPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();
$simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


try {
    $api_instance->simReconnectPost($simInfo);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simReconnectPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();
my $simInfo = WWW::SwaggerClient::Object::SimInfo->new(); # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


eval { 
    $api_instance->simReconnectPost(simInfo => $simInfo);
};
if ($@) {
    warn "Exception when calling SimApi->simReconnectPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()
simInfo =  # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

try: 
    # Retry to connect to a sim.
    api_instance.sim_reconnect_post(simInfo=simInfo)
except ApiException as e:
    print("Exception when calling SimApi->simReconnectPost: %s\n" % e)

Parameters

Body parameters
Name Description
simInfo

Responses

Status: 200 - Successfully reinitiated the connection to the sim.

Status: 500 - Could not decrypt the message

{code=500, message=crypto/rsa decryption error.}

simStatusPost

Get the status of a SIM session.


/sim/status

Usage and SDK Samples

curl -X POST "http://localhost/api/sim/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SimApi;

import java.io.File;
import java.util.*;

public class SimApiExample {

    public static void main(String[] args) {
        
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            inline_response_200 result = apiInstance.simStatusPost(simInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simStatusPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SimApi;

public class SimApiExample {

    public static void main(String[] args) {
        SimApi apiInstance = new SimApi();
        SimInfo simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.

        try {
            inline_response_200 result = apiInstance.simStatusPost(simInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SimApi#simStatusPost");
            e.printStackTrace();
        }
    }
}
SimInfo *simInfo = ; // The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

SimApi *apiInstance = [[SimApi alloc] init];

// Get the status of a SIM session.
[apiInstance simStatusPostWith:simInfo
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SimApi()

var opts = { 
  'simInfo':  // {SimInfo} The IP and the port as a json object encrypted with the public key
of the controller.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.simStatusPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class simStatusPostExample
    {
        public void main()
        {
            
            var apiInstance = new SimApi();
            var simInfo = new SimInfo(); // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional) 

            try
            {
                // Get the status of a SIM session.
                inline_response_200 result = apiInstance.simStatusPost(simInfo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SimApi.simStatusPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SimApi();
$simInfo = ; // SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


try {
    $result = $api_instance->simStatusPost($simInfo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SimApi->simStatusPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SimApi;

my $api_instance = WWW::SwaggerClient::SimApi->new();
my $simInfo = WWW::SwaggerClient::Object::SimInfo->new(); # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.


eval { 
    my $result = $api_instance->simStatusPost(simInfo => $simInfo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SimApi->simStatusPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SimApi()
simInfo =  # SimInfo | The IP and the port as a json object encrypted with the public key
of the controller.
 (optional)

try: 
    # Get the status of a SIM session.
    api_response = api_instance.sim_status_post(simInfo=simInfo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SimApi->simStatusPost: %s\n" % e)

Parameters

Body parameters
Name Description
simInfo

Responses

Status: 200 - json object describing the status of a sim session.

Status: 500 - error when parsing json array


Sim2

sim2Get

Retrieve SIM2 listing

Retrieves information of the SIM2 active connections


/sim2

Usage and SDK Samples

curl -X GET "http://localhost/api/sim2"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Sim2Api;

import java.io.File;
import java.util.*;

public class Sim2ApiExample {

    public static void main(String[] args) {
        
        Sim2Api apiInstance = new Sim2Api();
        try {
            array[Sim2Session] result = apiInstance.sim2Get();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2Get");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Sim2Api;

public class Sim2ApiExample {

    public static void main(String[] args) {
        Sim2Api apiInstance = new Sim2Api();
        try {
            array[Sim2Session] result = apiInstance.sim2Get();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2Get");
            e.printStackTrace();
        }
    }
}

Sim2Api *apiInstance = [[Sim2Api alloc] init];

// Retrieve SIM2 listing
[apiInstance sim2GetWithCompletionHandler: 
              ^(array[Sim2Session] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.Sim2Api()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sim2Get(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sim2GetExample
    {
        public void main()
        {
            
            var apiInstance = new Sim2Api();

            try
            {
                // Retrieve SIM2 listing
                array[Sim2Session] result = apiInstance.sim2Get();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Sim2Api.sim2Get: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Sim2Api();

try {
    $result = $api_instance->sim2Get();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Sim2Api->sim2Get: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Sim2Api;

my $api_instance = WWW::SwaggerClient::Sim2Api->new();

eval { 
    my $result = $api_instance->sim2Get();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Sim2Api->sim2Get: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Sim2Api()

try: 
    # Retrieve SIM2 listing
    api_response = api_instance.sim2_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Sim2Api->sim2Get: %s\n" % e)

Parameters

Responses

Status: 200 - successful retrieval

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

sim2IdDelete

Delete a sim2 Session

Deletes a SIM2 session


/sim2/{id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/sim2/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Sim2Api;

import java.io.File;
import java.util.*;

public class Sim2ApiExample {

    public static void main(String[] args) {
        
        Sim2Api apiInstance = new Sim2Api();
        Long id = 789; // Long | The sim2 ID
        try {
            apiInstance.sim2IdDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2IdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Sim2Api;

public class Sim2ApiExample {

    public static void main(String[] args) {
        Sim2Api apiInstance = new Sim2Api();
        Long id = 789; // Long | The sim2 ID
        try {
            apiInstance.sim2IdDelete(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2IdDelete");
            e.printStackTrace();
        }
    }
}
Long *id = 789; // The sim2 ID

Sim2Api *apiInstance = [[Sim2Api alloc] init];

// Delete a sim2 Session
[apiInstance sim2IdDeleteWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.Sim2Api()

var id = 789; // {Long} The sim2 ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.sim2IdDelete(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sim2IdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new Sim2Api();
            var id = 789;  // Long | The sim2 ID

            try
            {
                // Delete a sim2 Session
                apiInstance.sim2IdDelete(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Sim2Api.sim2IdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Sim2Api();
$id = 789; // Long | The sim2 ID

try {
    $api_instance->sim2IdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling Sim2Api->sim2IdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Sim2Api;

my $api_instance = WWW::SwaggerClient::Sim2Api->new();
my $id = 789; # Long | The sim2 ID

eval { 
    $api_instance->sim2IdDelete(id => $id);
};
if ($@) {
    warn "Exception when calling Sim2Api->sim2IdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Sim2Api()
id = 789 # Long | The sim2 ID

try: 
    # Delete a sim2 Session
    api_instance.sim2_id_delete(id)
except ApiException as e:
    print("Exception when calling Sim2Api->sim2IdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
The sim2 ID
Required

Responses

Status: 204 - successful deleted

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

sim2IdGet

Retrieve SIM2 info

Retrieves information of the sim2 connection with the pub_key


/sim2/{id}

Usage and SDK Samples

curl -X GET "http://localhost/api/sim2/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Sim2Api;

import java.io.File;
import java.util.*;

public class Sim2ApiExample {

    public static void main(String[] args) {
        
        Sim2Api apiInstance = new Sim2Api();
        Long id = 789; // Long | The sim2 ID
        try {
            Sim2Session result = apiInstance.sim2IdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2IdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Sim2Api;

public class Sim2ApiExample {

    public static void main(String[] args) {
        Sim2Api apiInstance = new Sim2Api();
        Long id = 789; // Long | The sim2 ID
        try {
            Sim2Session result = apiInstance.sim2IdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2IdGet");
            e.printStackTrace();
        }
    }
}
Long *id = 789; // The sim2 ID

Sim2Api *apiInstance = [[Sim2Api alloc] init];

// Retrieve SIM2 info
[apiInstance sim2IdGetWith:id
              completionHandler: ^(Sim2Session output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.Sim2Api()

var id = 789; // {Long} The sim2 ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sim2IdGet(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sim2IdGetExample
    {
        public void main()
        {
            
            var apiInstance = new Sim2Api();
            var id = 789;  // Long | The sim2 ID

            try
            {
                // Retrieve SIM2 info
                Sim2Session result = apiInstance.sim2IdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Sim2Api.sim2IdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Sim2Api();
$id = 789; // Long | The sim2 ID

try {
    $result = $api_instance->sim2IdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Sim2Api->sim2IdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Sim2Api;

my $api_instance = WWW::SwaggerClient::Sim2Api->new();
my $id = 789; # Long | The sim2 ID

eval { 
    my $result = $api_instance->sim2IdGet(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Sim2Api->sim2IdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Sim2Api()
id = 789 # Long | The sim2 ID

try: 
    # Retrieve SIM2 info
    api_response = api_instance.sim2_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Sim2Api->sim2IdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
The sim2 ID
Required

Responses

Status: 200 - successful retrieval

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

sim2Post

Create a SIM2 Session

Creates a reverse ssh to a SIM2 from a controller


/sim2

Usage and SDK Samples

curl -X POST "http://localhost/api/sim2"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Sim2Api;

import java.io.File;
import java.util.*;

public class Sim2ApiExample {

    public static void main(String[] args) {
        
        Sim2Api apiInstance = new Sim2Api();
        Sim2Info sim2Info = ; // Sim2Info | The IP and the port of the SIM2

        try {
            Sim2Session result = apiInstance.sim2Post(sim2Info);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2Post");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.Sim2Api;

public class Sim2ApiExample {

    public static void main(String[] args) {
        Sim2Api apiInstance = new Sim2Api();
        Sim2Info sim2Info = ; // Sim2Info | The IP and the port of the SIM2

        try {
            Sim2Session result = apiInstance.sim2Post(sim2Info);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling Sim2Api#sim2Post");
            e.printStackTrace();
        }
    }
}
Sim2Info *sim2Info = ; // The IP and the port of the SIM2


Sim2Api *apiInstance = [[Sim2Api alloc] init];

// Create a SIM2 Session
[apiInstance sim2PostWith:sim2Info
              completionHandler: ^(Sim2Session output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.Sim2Api()

var sim2Info = ; // {Sim2Info} The IP and the port of the SIM2



var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sim2Post(sim2Info, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sim2PostExample
    {
        public void main()
        {
            
            var apiInstance = new Sim2Api();
            var sim2Info = new Sim2Info(); // Sim2Info | The IP and the port of the SIM2


            try
            {
                // Create a SIM2 Session
                Sim2Session result = apiInstance.sim2Post(sim2Info);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling Sim2Api.sim2Post: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\Sim2Api();
$sim2Info = ; // Sim2Info | The IP and the port of the SIM2


try {
    $result = $api_instance->sim2Post($sim2Info);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Sim2Api->sim2Post: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Sim2Api;

my $api_instance = WWW::SwaggerClient::Sim2Api->new();
my $sim2Info = WWW::SwaggerClient::Object::Sim2Info->new(); # Sim2Info | The IP and the port of the SIM2


eval { 
    my $result = $api_instance->sim2Post(sim2Info => $sim2Info);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling Sim2Api->sim2Post: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.Sim2Api()
sim2Info =  # Sim2Info | The IP and the port of the SIM2


try: 
    # Create a SIM2 Session
    api_response = api_instance.sim2_post(sim2Info)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Sim2Api->sim2Post: %s\n" % e)

Parameters

Body parameters
Name Description
sim2Info *

Responses

Status: 200 - successful creation

Status: 400 - 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: 409 - Status conflict.

{code=409}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Status: 503 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Statistics

statsResourcesGet

Get general stats for virtual resources present in the system.


/stats/resources

Usage and SDK Samples

curl -X GET "http://localhost/api/stats/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StatisticsApi;

import java.io.File;
import java.util.*;

public class StatisticsApiExample {

    public static void main(String[] args) {
        
        StatisticsApi apiInstance = new StatisticsApi();
        try {
            inline_response_200_8 result = apiInstance.statsResourcesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatisticsApi#statsResourcesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StatisticsApi;

public class StatisticsApiExample {

    public static void main(String[] args) {
        StatisticsApi apiInstance = new StatisticsApi();
        try {
            inline_response_200_8 result = apiInstance.statsResourcesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatisticsApi#statsResourcesGet");
            e.printStackTrace();
        }
    }
}

StatisticsApi *apiInstance = [[StatisticsApi alloc] init];

// Get general stats for virtual resources present in the system.
[apiInstance statsResourcesGetWithCompletionHandler: 
              ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StatisticsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.statsResourcesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class statsResourcesGetExample
    {
        public void main()
        {
            
            var apiInstance = new StatisticsApi();

            try
            {
                // Get general stats for virtual resources present in the system.
                inline_response_200_8 result = apiInstance.statsResourcesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatisticsApi.statsResourcesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StatisticsApi();

try {
    $result = $api_instance->statsResourcesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StatisticsApi->statsResourcesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StatisticsApi;

my $api_instance = WWW::SwaggerClient::StatisticsApi->new();

eval { 
    my $result = $api_instance->statsResourcesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StatisticsApi->statsResourcesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StatisticsApi()

try: 
    # Get general stats for virtual resources present in the system.
    api_response = api_instance.stats_resources_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatisticsApi->statsResourcesGet: %s\n" % e)

Parameters

Responses

Status: 200 - Overall stats for mvgroups, physical_disks, networks, datatores, instances and clusters.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

statsTotalUsageGet

Get general stats for the overall usage of the system.


/stats/total_usage

Usage and SDK Samples

curl -X GET "http://localhost/api/stats/total_usage"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StatisticsApi;

import java.io.File;
import java.util.*;

public class StatisticsApiExample {

    public static void main(String[] args) {
        
        StatisticsApi apiInstance = new StatisticsApi();
        try {
            OverallUsageStatistics result = apiInstance.statsTotalUsageGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatisticsApi#statsTotalUsageGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StatisticsApi;

public class StatisticsApiExample {

    public static void main(String[] args) {
        StatisticsApi apiInstance = new StatisticsApi();
        try {
            OverallUsageStatistics result = apiInstance.statsTotalUsageGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StatisticsApi#statsTotalUsageGet");
            e.printStackTrace();
        }
    }
}

StatisticsApi *apiInstance = [[StatisticsApi alloc] init];

// Get general stats for the overall usage of the system.
[apiInstance statsTotalUsageGetWithCompletionHandler: 
              ^(OverallUsageStatistics output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StatisticsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.statsTotalUsageGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class statsTotalUsageGetExample
    {
        public void main()
        {
            
            var apiInstance = new StatisticsApi();

            try
            {
                // Get general stats for the overall usage of the system.
                OverallUsageStatistics result = apiInstance.statsTotalUsageGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatisticsApi.statsTotalUsageGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StatisticsApi();

try {
    $result = $api_instance->statsTotalUsageGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StatisticsApi->statsTotalUsageGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StatisticsApi;

my $api_instance = WWW::SwaggerClient::StatisticsApi->new();

eval { 
    my $result = $api_instance->statsTotalUsageGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StatisticsApi->statsTotalUsageGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StatisticsApi()

try: 
    # Get general stats for the overall usage of the system.
    api_response = api_instance.stats_total_usage_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatisticsApi->statsTotalUsageGet: %s\n" % e)

Parameters

Responses

Status: 200 - Overall system usage statistics.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

StorageProvider

storageProviderDelete

Delete the available storage provider if exists.


/storage_provider

Usage and SDK Samples

curl -X DELETE "http://localhost/api/storage_provider"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            apiInstance.storageProviderDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            apiInstance.storageProviderDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderDelete");
            e.printStackTrace();
        }
    }
}

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Delete the available storage provider if exists.
[apiInstance storageProviderDeleteWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.storageProviderDelete(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();

            try
            {
                // Delete the available storage provider if exists.
                apiInstance.storageProviderDelete();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();

try {
    $api_instance->storageProviderDelete();
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();

eval { 
    $api_instance->storageProviderDelete();
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()

try: 
    # Delete the available storage provider if exists.
    api_instance.storage_provider_delete()
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderDelete: %s\n" % e)

Parameters

Responses

Status: 204 - Successfully deleted the storage provider. In case of NFS the storage has been unmounted.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

storageProviderGet

Get the available storage provider's details if exists.


/storage_provider

Usage and SDK Samples

curl -X GET "http://localhost/api/storage_provider"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            inline_response_200_2 result = apiInstance.storageProviderGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            inline_response_200_2 result = apiInstance.storageProviderGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderGet");
            e.printStackTrace();
        }
    }
}

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Get the available storage provider's details if exists.
[apiInstance storageProviderGetWithCompletionHandler: 
              ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.storageProviderGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderGetExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();

            try
            {
                // Get the available storage provider's details if exists.
                inline_response_200_2 result = apiInstance.storageProviderGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();

try {
    $result = $api_instance->storageProviderGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();

eval { 
    my $result = $api_instance->storageProviderGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()

try: 
    # Get the available storage provider's details if exists.
    api_response = api_instance.storage_provider_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderGet: %s\n" % e)

Parameters

Responses

Status: 200 - The details of the existing storage provider.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

storageProviderPost

Create a new storage provider.


/storage_provider

Usage and SDK Samples

curl -X POST "http://localhost/api/storage_provider"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        NewStorageProvider storageProvider = ; // NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.

        try {
            inline_response_200_2 result = apiInstance.storageProviderPost(storageProvider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        NewStorageProvider storageProvider = ; // NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.

        try {
            inline_response_200_2 result = apiInstance.storageProviderPost(storageProvider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderPost");
            e.printStackTrace();
        }
    }
}
NewStorageProvider *storageProvider = ; // The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.
 (optional)

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Create a new storage provider.
[apiInstance storageProviderPostWith:storageProvider
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var opts = { 
  'storageProvider':  // {NewStorageProvider} The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.storageProviderPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderPostExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();
            var storageProvider = new NewStorageProvider(); // NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.
 (optional) 

            try
            {
                // Create a new storage provider.
                inline_response_200_2 result = apiInstance.storageProviderPost(storageProvider);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();
$storageProvider = ; // NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.


try {
    $result = $api_instance->storageProviderPost($storageProvider);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();
my $storageProvider = WWW::SwaggerClient::Object::NewStorageProvider->new(); # NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.


eval { 
    my $result = $api_instance->storageProviderPost(storageProvider => $storageProvider);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()
storageProvider =  # NewStorageProvider | The storage provider to create.
In case of NFS type required details are nfs_server_ip and nfs_server_path.
In case of S3 type required details are bucket, username and password.
 (optional)

try: 
    # Create a new storage provider.
    api_response = api_instance.storage_provider_post(storageProvider=storageProvider)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderPost: %s\n" % e)

Parameters

Body parameters
Name Description
storageProvider

Responses

Status: 201 - The details of the existing storage provider.

Status: 400 - Status bad request.

{code=400}

Status: 409 - Status conflict.

{code=409}

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 occured.

{code=500, message=Operation X did something wrong during processing}

storageProviderTemplatesGet

Get the available storage provider's templates.


/storage_provider/templates

Usage and SDK Samples

curl -X GET "http://localhost/api/storage_provider/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            array[Object] result = apiInstance.storageProviderTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        try {
            array[Object] result = apiInstance.storageProviderTemplatesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesGet");
            e.printStackTrace();
        }
    }
}

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Get the available storage provider's templates.
[apiInstance storageProviderTemplatesGetWithCompletionHandler: 
              ^(array[Object] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.storageProviderTemplatesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderTemplatesGetExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();

            try
            {
                // Get the available storage provider's templates.
                array[Object] result = apiInstance.storageProviderTemplatesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderTemplatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();

try {
    $result = $api_instance->storageProviderTemplatesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderTemplatesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();

eval { 
    my $result = $api_instance->storageProviderTemplatesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderTemplatesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()

try: 
    # Get the available storage provider's templates.
    api_response = api_instance.storage_provider_templates_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderTemplatesGet: %s\n" % e)

Parameters

Responses

Status: 200 - The templates of the existing storage provider.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

storageProviderTemplatesUuidDelete

Delete the template of the storage provider.


/storage_provider/templates/{uuid}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/storage_provider/templates/{uuid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        String uuid = uuid_example; // String | The uuid of the template.
        try {
            apiInstance.storageProviderTemplatesUuidDelete(uuid);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesUuidDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        String uuid = uuid_example; // String | The uuid of the template.
        try {
            apiInstance.storageProviderTemplatesUuidDelete(uuid);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesUuidDelete");
            e.printStackTrace();
        }
    }
}
String *uuid = uuid_example; // The uuid of the template.

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Delete the template of the storage provider.
[apiInstance storageProviderTemplatesUuidDeleteWith:uuid
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var uuid = uuid_example; // {String} The uuid of the template.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.storageProviderTemplatesUuidDelete(uuid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderTemplatesUuidDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();
            var uuid = uuid_example;  // String | The uuid of the template.

            try
            {
                // Delete the template of the storage provider.
                apiInstance.storageProviderTemplatesUuidDelete(uuid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderTemplatesUuidDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();
$uuid = uuid_example; // String | The uuid of the template.

try {
    $api_instance->storageProviderTemplatesUuidDelete($uuid);
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderTemplatesUuidDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();
my $uuid = uuid_example; # String | The uuid of the template.

eval { 
    $api_instance->storageProviderTemplatesUuidDelete(uuid => $uuid);
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderTemplatesUuidDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()
uuid = uuid_example # String | The uuid of the template.

try: 
    # Delete the template of the storage provider.
    api_instance.storage_provider_templates_uuid_delete(uuid)
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderTemplatesUuidDelete: %s\n" % e)

Parameters

Path parameters
Name Description
uuid*
String
The uuid of the template.
Required

Responses

Status: 204 - Template removed from local storage and from the storage provider.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

storageProviderTemplatesUuidGet

Get the request template of the storage provider.


/storage_provider/templates/{uuid}

Usage and SDK Samples

curl -X GET "http://localhost/api/storage_provider/templates/{uuid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.StorageProviderApi;

import java.io.File;
import java.util.*;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        
        StorageProviderApi apiInstance = new StorageProviderApi();
        String uuid = uuid_example; // String | The uuid of the template.
        try {
            inline_response_200_3 result = apiInstance.storageProviderTemplatesUuidGet(uuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesUuidGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.StorageProviderApi;

public class StorageProviderApiExample {

    public static void main(String[] args) {
        StorageProviderApi apiInstance = new StorageProviderApi();
        String uuid = uuid_example; // String | The uuid of the template.
        try {
            inline_response_200_3 result = apiInstance.storageProviderTemplatesUuidGet(uuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling StorageProviderApi#storageProviderTemplatesUuidGet");
            e.printStackTrace();
        }
    }
}
String *uuid = uuid_example; // The uuid of the template.

StorageProviderApi *apiInstance = [[StorageProviderApi alloc] init];

// Get the request template of the storage provider.
[apiInstance storageProviderTemplatesUuidGetWith:uuid
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.StorageProviderApi()

var uuid = uuid_example; // {String} The uuid of the template.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.storageProviderTemplatesUuidGet(uuid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class storageProviderTemplatesUuidGetExample
    {
        public void main()
        {
            
            var apiInstance = new StorageProviderApi();
            var uuid = uuid_example;  // String | The uuid of the template.

            try
            {
                // Get the request template of the storage provider.
                inline_response_200_3 result = apiInstance.storageProviderTemplatesUuidGet(uuid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StorageProviderApi.storageProviderTemplatesUuidGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\StorageProviderApi();
$uuid = uuid_example; // String | The uuid of the template.

try {
    $result = $api_instance->storageProviderTemplatesUuidGet($uuid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageProviderApi->storageProviderTemplatesUuidGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StorageProviderApi;

my $api_instance = WWW::SwaggerClient::StorageProviderApi->new();
my $uuid = uuid_example; # String | The uuid of the template.

eval { 
    my $result = $api_instance->storageProviderTemplatesUuidGet(uuid => $uuid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling StorageProviderApi->storageProviderTemplatesUuidGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.StorageProviderApi()
uuid = uuid_example # String | The uuid of the template.

try: 
    # Get the request template of the storage provider.
    api_response = api_instance.storage_provider_templates_uuid_get(uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StorageProviderApi->storageProviderTemplatesUuidGet: %s\n" % e)

Parameters

Path parameters
Name Description
uuid*
String
The uuid of the template.
Required

Responses

Status: 200 - The requested storage provider's template details.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

SupportSession

supportSessionDelete

Delete the support session from the system.


/support_session

Usage and SDK Samples

curl -X DELETE "http://localhost/api/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            apiInstance.supportSessionDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            apiInstance.supportSessionDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionDelete");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Delete the support session from the system.
[apiInstance supportSessionDeleteWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.supportSessionDelete(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Delete the support session from the system.
                apiInstance.supportSessionDelete();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $api_instance->supportSessionDelete();
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    $api_instance->supportSessionDelete();
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Delete the support session from the system.
    api_instance.support_session_delete()
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionDelete: %s\n" % e)

Parameters

Responses

Status: 204 - The support session was deleted successfully.


supportSessionGet

Get the current support session.


/support_session

Usage and SDK Samples

curl -X GET "http://localhost/api/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionGet");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Get the current support session.
[apiInstance supportSessionGetWithCompletionHandler: 
              ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.supportSessionGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionGetExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Get the current support session.
                SupportSession result = apiInstance.supportSessionGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $result = $api_instance->supportSessionGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    my $result = $api_instance->supportSessionGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Get the current support session.
    api_response = api_instance.support_session_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionGet: %s\n" % e)

Parameters

Responses

Status: 200 - Get the current support session.


supportSessionOptOutDelete

Disable the opt-out of the support session.

Disable the opt-out of the support session. The following scenarios will result in a *failed* response: * Failed to enable the permanent support session. (503) * Failed to disable the opt-out. (503) * Failed to create a new session field on the DB. (500) * Failed to connect to the support server. (503) * Failed to get the port number. (503)


/support_session/opt_out

Usage and SDK Samples

curl -X DELETE "http://localhost/api/support_session/opt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionOptOutDelete();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionOptOutDelete();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutDelete");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Disable the opt-out of the support session.
[apiInstance supportSessionOptOutDeleteWithCompletionHandler: 
              ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.supportSessionOptOutDelete(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionOptOutDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Disable the opt-out of the support session.
                SupportSession result = apiInstance.supportSessionOptOutDelete();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionOptOutDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $result = $api_instance->supportSessionOptOutDelete();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionOptOutDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    my $result = $api_instance->supportSessionOptOutDelete();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionOptOutDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Disable the opt-out of the support session.
    api_response = api_instance.support_session_opt_out_delete()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionOptOutDelete: %s\n" % e)

Parameters

Responses

Status: 200 - The opt-out option disabled successfully.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Status: 503 - Server is unable to handle the request due to a temporary overloading or maintenance of the server.

{code=503, message=Server failed to retrieve port number.}

supportSessionOptOutGet

Disable the opt-out of the support session.

Get the opt-out of the support session (if it is enabled or not).


/support_session/opt_out

Usage and SDK Samples

curl -X GET "http://localhost/api/support_session/opt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            OptOut result = apiInstance.supportSessionOptOutGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            OptOut result = apiInstance.supportSessionOptOutGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutGet");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Disable the opt-out of the support session.
[apiInstance supportSessionOptOutGetWithCompletionHandler: 
              ^(OptOut output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.supportSessionOptOutGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionOptOutGetExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Disable the opt-out of the support session.
                OptOut result = apiInstance.supportSessionOptOutGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionOptOutGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $result = $api_instance->supportSessionOptOutGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionOptOutGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    my $result = $api_instance->supportSessionOptOutGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionOptOutGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Disable the opt-out of the support session.
    api_response = api_instance.support_session_opt_out_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionOptOutGet: %s\n" % e)

Parameters

Responses

Status: 200 - If the opt-out is enabled, return true, else false.


supportSessionOptOutPost

Enable the opt-out of the support session.

Enable the opt-out of the support session. The following scenarios will result in a *failed* response: * Failed to disable the permanent support session. (503) * Failed to enable the opt-out. (503)


/support_session/opt_out

Usage and SDK Samples

curl -X POST "http://localhost/api/support_session/opt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            apiInstance.supportSessionOptOutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            apiInstance.supportSessionOptOutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionOptOutPost");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Enable the opt-out of the support session.
[apiInstance supportSessionOptOutPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.supportSessionOptOutPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionOptOutPostExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Enable the opt-out of the support session.
                apiInstance.supportSessionOptOutPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionOptOutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $api_instance->supportSessionOptOutPost();
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionOptOutPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    $api_instance->supportSessionOptOutPost();
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionOptOutPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Enable the opt-out of the support session.
    api_instance.support_session_opt_out_post()
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionOptOutPost: %s\n" % e)

Parameters

Responses

Status: 204 - The opt-out option enabled successfully.

Status: 503 - Server is unable to handle the request due to a temporary overloading or maintenance of the server.

{code=503, message=Server failed to retrieve port number.}

supportSessionPost

Add a new support session.

Add a new support session. The following scenarios will result in a *failed* response: * If you try to create a new support session, while there is already another active one. (422) * Failed to create a new session field on the DB. (500) * Failed to connect to the support server. (503) * Failed to get the port number. (503)


/support_session

Usage and SDK Samples

curl -X POST "http://localhost/api/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionPost");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Add a new support session.
[apiInstance supportSessionPostWithCompletionHandler: 
              ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.supportSessionPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionPostExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                // Add a new support session.
                SupportSession result = apiInstance.supportSessionPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $result = $api_instance->supportSessionPost();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    my $result = $api_instance->supportSessionPost();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    # Add a new support session.
    api_response = api_instance.support_session_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionPost: %s\n" % e)

Parameters

Responses

Status: 201 - A new support session created successfully.

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 occured.

{code=500, message=Operation X did something wrong during processing}

Status: 503 - Server is unable to handle the request due to a temporary overloading or maintenance of the server.

{code=503, message=Server failed to retrieve port number.}

supportSessionPut

Update a support session. The following scenarios will result in a *failed* response: * If you try to create a new support session, while there is already another active one. (422) * Failed to update a session field on the DB. (500) * Failed to connect to the support server. (503)


/support_session

Usage and SDK Samples

curl -X PUT "http://localhost/api/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionPut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        try {
            SupportSession result = apiInstance.supportSessionPut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#supportSessionPut");
            e.printStackTrace();
        }
    }
}

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

[apiInstance supportSessionPutWithCompletionHandler: 
              ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SupportSessionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.supportSessionPut(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class supportSessionPutExample
    {
        public void main()
        {
            
            var apiInstance = new SupportSessionApi();

            try
            {
                SupportSession result = apiInstance.supportSessionPut();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.supportSessionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SupportSessionApi();

try {
    $result = $api_instance->supportSessionPut();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->supportSessionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();

eval { 
    my $result = $api_instance->supportSessionPut();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->supportSessionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SupportSessionApi()

try: 
    api_response = api_instance.support_session_put()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->supportSessionPut: %s\n" % e)

Parameters

Responses

Status: 201 - The support session updated successfully.

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 occured.

{code=500, message=Operation X did something wrong during processing}

Status: 503 - Server is unable to handle the request due to a temporary overloading or maintenance of the server.

{code=503, message=Server failed to retrieve port number.}

SystemInfo

systemInfoGet

Get system information.


/system_info

Usage and SDK Samples

curl -X GET "http://localhost/api/system_info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemInfoApi;

import java.io.File;
import java.util.*;

public class SystemInfoApiExample {

    public static void main(String[] args) {
        
        SystemInfoApi apiInstance = new SystemInfoApi();
        try {
            inline_response_200_10 result = apiInstance.systemInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemInfoApi#systemInfoGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemInfoApi;

public class SystemInfoApiExample {

    public static void main(String[] args) {
        SystemInfoApi apiInstance = new SystemInfoApi();
        try {
            inline_response_200_10 result = apiInstance.systemInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemInfoApi#systemInfoGet");
            e.printStackTrace();
        }
    }
}

SystemInfoApi *apiInstance = [[SystemInfoApi alloc] init];

// Get system information.
[apiInstance systemInfoGetWithCompletionHandler: 
              ^(inline_response_200_10 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.SystemInfoApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.systemInfoGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class systemInfoGetExample
    {
        public void main()
        {
            
            var apiInstance = new SystemInfoApi();

            try
            {
                // Get system information.
                inline_response_200_10 result = apiInstance.systemInfoGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemInfoApi.systemInfoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemInfoApi();

try {
    $result = $api_instance->systemInfoGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemInfoApi->systemInfoGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemInfoApi;

my $api_instance = WWW::SwaggerClient::SystemInfoApi->new();

eval { 
    my $result = $api_instance->systemInfoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemInfoApi->systemInfoGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemInfoApi()

try: 
    # Get system information.
    api_response = api_instance.system_info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemInfoApi->systemInfoGet: %s\n" % e)

Parameters

Responses

Status: 200 - Global properties about the system and the infrastructure. These are static properties set during system configuration and will not change from that time on.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Users

loginPost

Authenticate a user to get a cookie and a JWT.

Authenticate a user to get a cookie and a JWT. The following update scenarios will fail: * The username or password is not correct (401)


/login

Usage and SDK Samples

curl -X POST "http://localhost/api/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Credentials credentials = ; // Credentials | The crendentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(credentials);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#loginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Credentials credentials = ; // Credentials | The crendentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(credentials);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#loginPost");
            e.printStackTrace();
        }
    }
}
Credentials *credentials = ; // The crendentials to authenticate the user. (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Authenticate a user to get a cookie and a JWT.
[apiInstance loginPostWith:credentials
              completionHandler: ^(AuthenticatedUser output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var opts = { 
  'credentials':  // {Credentials} The crendentials 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 UsersApi();
            var credentials = new Credentials(); // Credentials | The crendentials to authenticate the user. (optional) 

            try
            {
                // Authenticate a user to get a cookie and a JWT.
                AuthenticatedUser result = apiInstance.loginPost(credentials);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.loginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$credentials = ; // Credentials | The crendentials to authenticate the user.

try {
    $result = $api_instance->loginPost($credentials);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->loginPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $credentials = WWW::SwaggerClient::Object::Credentials->new(); # Credentials | The crendentials to authenticate the user.

eval { 
    my $result = $api_instance->loginPost(credentials => $credentials);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->loginPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
credentials =  # Credentials | The crendentials to authenticate the user. (optional)

try: 
    # Authenticate a user to get a cookie and a JWT.
    api_response = api_instance.login_post(credentials=credentials)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->loginPost: %s\n" % e)

Parameters

Body parameters
Name Description
credentials

Responses

Status: 200 - Succesfully user authorized.

Status: 401 - Status unauthorized.

{code=401}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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.}]}

logoutPost

Logout the user.


/logout

Usage and SDK Samples

curl -X POST "http://localhost/api/logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.logoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#logoutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.logoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#logoutPost");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Logout the user.
[apiInstance logoutPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

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 UsersApi();

            try
            {
                // Logout the user.
                apiInstance.logoutPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.logoutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $api_instance->logoutPost();
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->logoutPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    $api_instance->logoutPost();
};
if ($@) {
    warn "Exception when calling UsersApi->logoutPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Logout the user.
    api_instance.logout_post()
except ApiException as e:
    print("Exception when calling UsersApi->logoutPost: %s\n" % e)

Parameters

Responses

Status: 200 - The user succesfully logout.


meGet

Get information about the current logged in user.


/me

Usage and SDK Samples

curl -X GET "http://localhost/api/me"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            AuthenticatedUser result = apiInstance.meGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#meGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            AuthenticatedUser result = apiInstance.meGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#meGet");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get information about the current logged in user.
[apiInstance meGetWithCompletionHandler: 
              ^(AuthenticatedUser output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.meGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class meGetExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();

            try
            {
                // Get information about the current logged in user.
                AuthenticatedUser result = apiInstance.meGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.meGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $result = $api_instance->meGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->meGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    my $result = $api_instance->meGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->meGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Get information about the current logged in user.
    api_response = api_instance.me_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->meGet: %s\n" % e)

Parameters

Responses

Status: 200 - The information for the current logged in user.


mePasswordPost

Update the password of the current user.

Change the password of the current user. The following scenarios will result in a *failed* response * The policy does not allow the current user to do this operation (403) * No user found (404) * The original password you have enter is incorrect (422) * The new password can not be less than 8 characters (422)


/me/password

Usage and SDK Samples

curl -X POST "http://localhost/api/me/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        ChangePasswordOpts changePassword = ; // ChangePasswordOpts | Update the password.
        try {
            apiInstance.mePasswordPost(changePassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#mePasswordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        ChangePasswordOpts changePassword = ; // ChangePasswordOpts | Update the password.
        try {
            apiInstance.mePasswordPost(changePassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#mePasswordPost");
            e.printStackTrace();
        }
    }
}
ChangePasswordOpts *changePassword = ; // Update the password. (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Update the password of the current user.
[apiInstance mePasswordPostWith:changePassword
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var opts = { 
  'changePassword':  // {ChangePasswordOpts} Update the password.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.mePasswordPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class mePasswordPostExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var changePassword = new ChangePasswordOpts(); // ChangePasswordOpts | Update the password. (optional) 

            try
            {
                // Update the password of the current user.
                apiInstance.mePasswordPost(changePassword);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.mePasswordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$changePassword = ; // ChangePasswordOpts | Update the password.

try {
    $api_instance->mePasswordPost($changePassword);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->mePasswordPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $changePassword = WWW::SwaggerClient::Object::ChangePasswordOpts->new(); # ChangePasswordOpts | Update the password.

eval { 
    $api_instance->mePasswordPost(changePassword => $changePassword);
};
if ($@) {
    warn "Exception when calling UsersApi->mePasswordPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
changePassword =  # ChangePasswordOpts | Update the password. (optional)

try: 
    # Update the password of the current user.
    api_instance.me_password_post(changePassword=changePassword)
except ApiException as e:
    print("Exception when calling UsersApi->mePasswordPost: %s\n" % e)

Parameters

Body parameters
Name Description
changePassword

Responses

Status: 200 - The current user has been updated with the new password.

Status: 401 - Status unauthorized.

{code=401}

Status: 403 - Status forbidden.

{code=403}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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.}]}

refreshPost

Reload the backend states.


/refresh

Usage and SDK Samples

curl -X POST "http://localhost/api/refresh"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.refreshPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#refreshPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.refreshPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#refreshPost");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Reload the backend states.
[apiInstance refreshPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.refreshPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class refreshPostExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();

            try
            {
                // Reload the backend states.
                apiInstance.refreshPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.refreshPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $api_instance->refreshPost();
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->refreshPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    $api_instance->refreshPost();
};
if ($@) {
    warn "Exception when calling UsersApi->refreshPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Reload the backend states.
    api_instance.refresh_post()
except ApiException as e:
    print("Exception when calling UsersApi->refreshPost: %s\n" % e)

Parameters

Responses

Status: 200 - Refresh can be called by the frontend, every time the user refreshes the dashboard. The backend can do general processes regarding to the state.


usersDelete

Delete the user.


/users

Usage and SDK Samples

curl -X DELETE "http://localhost/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.usersDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            apiInstance.usersDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersDelete");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Delete the user.
[apiInstance usersDeleteWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersDelete(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();

            try
            {
                // Delete the user.
                apiInstance.usersDelete();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $api_instance->usersDelete();
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    $api_instance->usersDelete();
};
if ($@) {
    warn "Exception when calling UsersApi->usersDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Delete the user.
    api_instance.users_delete()
except ApiException as e:
    print("Exception when calling UsersApi->usersDelete: %s\n" % e)

Parameters

Responses

Status: 204 - The user was deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

usersGet

Get list of users.


/users

Usage and SDK Samples

curl -X GET "http://localhost/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.usersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.usersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersGet");
            e.printStackTrace();
        }
    }
}

UsersApi *apiInstance = [[UsersApi alloc] init];

// Get list of users.
[apiInstance usersGetWithCompletionHandler: 
              ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersGetExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();

            try
            {
                // Get list of users.
                array[User] result = apiInstance.usersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();

try {
    $result = $api_instance->usersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();

eval { 
    my $result = $api_instance->usersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()

try: 
    # Get list of users.
    api_response = api_instance.users_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of users.


usersPost

Create a new user.


/users

Usage and SDK Samples

curl -X POST "http://localhost/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        CreateUserOpts newUser = ; // CreateUserOpts | Create user.
        try {
            apiInstance.usersPost(newUser);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        CreateUserOpts newUser = ; // CreateUserOpts | Create user.
        try {
            apiInstance.usersPost(newUser);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
CreateUserOpts *newUser = ; // Create user. (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Create a new user.
[apiInstance usersPostWith:newUser
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.UsersApi()

var opts = { 
  'newUser':  // {CreateUserOpts} Create user.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class usersPostExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var newUser = new CreateUserOpts(); // CreateUserOpts | Create user. (optional) 

            try
            {
                // Create a new user.
                apiInstance.usersPost(newUser);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$newUser = ; // CreateUserOpts | Create user.

try {
    $api_instance->usersPost($newUser);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->usersPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $newUser = WWW::SwaggerClient::Object::CreateUserOpts->new(); # CreateUserOpts | Create user.

eval { 
    $api_instance->usersPost(newUser => $newUser);
};
if ($@) {
    warn "Exception when calling UsersApi->usersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
newUser =  # CreateUserOpts | Create user. (optional)

try: 
    # Create a new user.
    api_instance.users_post(newUser=newUser)
except ApiException as e:
    print("Exception when calling UsersApi->usersPost: %s\n" % e)

Parameters

Body parameters
Name Description
newUser

Responses

Status: 201 - The user was created successfully.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

Vdisks

vdisksGet

Get a list of virtual disks.


/vdisks

Usage and SDK Samples

curl -X GET "http://localhost/api/vdisks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        try {
            array[VDisk] result = apiInstance.vdisksGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        try {
            array[VDisk] result = apiInstance.vdisksGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksGet");
            e.printStackTrace();
        }
    }
}

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get a list of virtual disks.
[apiInstance vdisksGetWithCompletionHandler: 
              ^(array[VDisk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.vdisksGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksGetExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();

            try
            {
                // Get a list of virtual disks.
                array[VDisk] result = apiInstance.vdisksGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();

try {
    $result = $api_instance->vdisksGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();

eval { 
    my $result = $api_instance->vdisksGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()

try: 
    # Get a list of virtual disks.
    api_response = api_instance.vdisks_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of virtual disks.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

vdisksPost

Create a virtual disk.


/vdisks

Usage and SDK Samples

curl -X POST "http://localhost/api/vdisks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        NewVDisk virtual disk = ; // NewVDisk | The virtual disk to create.
        try {
            VDisk result = apiInstance.vdisksPost(virtual disk);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        NewVDisk virtual disk = ; // NewVDisk | The virtual disk to create.
        try {
            VDisk result = apiInstance.vdisksPost(virtual disk);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksPost");
            e.printStackTrace();
        }
    }
}
NewVDisk *virtual disk = ; // The virtual disk to create. (optional)

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a virtual disk.
[apiInstance vdisksPostWith:virtual disk
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var opts = { 
  'virtual disk':  // {NewVDisk} The virtual disk to create.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.vdisksPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksPostExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var virtual disk = new NewVDisk(); // NewVDisk | The virtual disk to create. (optional) 

            try
            {
                // Create a virtual disk.
                VDisk result = apiInstance.vdisksPost(virtual disk);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$virtual disk = ; // NewVDisk | The virtual disk to create.

try {
    $result = $api_instance->vdisksPost($virtual disk);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $virtual disk = WWW::SwaggerClient::Object::NewVDisk->new(); # NewVDisk | The virtual disk to create.

eval { 
    my $result = $api_instance->vdisksPost(virtual disk => $virtual disk);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
virtual disk =  # NewVDisk | The virtual disk to create. (optional)

try: 
    # Create a virtual disk.
    api_response = api_instance.vdisks_post(virtual disk=virtual disk)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksPost: %s\n" % e)

Parameters

Body parameters
Name Description
virtual disk

Responses

Status: 201 - A virtual disk is created successfully.

Status: 400 - Status bad request.

{code=400}

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

vdisksRenameVdiskIdNameVdiskNamePost

Rename a virtual disk.

Rename a specific virtual disk.


/vdisks/rename/{vdisk_id}/name/{vdisk_name}

Usage and SDK Samples

curl -X POST "http://localhost/api/vdisks/rename/{vdisk_id}/name/{vdisk_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        String vdiskName = vdiskName_example; // String | The virtual disk name.
        try {
            apiInstance.vdisksRenameVdiskIdNameVdiskNamePost(vdiskId, vdiskName);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksRenameVdiskIdNameVdiskNamePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        String vdiskName = vdiskName_example; // String | The virtual disk name.
        try {
            apiInstance.vdisksRenameVdiskIdNameVdiskNamePost(vdiskId, vdiskName);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksRenameVdiskIdNameVdiskNamePost");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.
String *vdiskName = vdiskName_example; // The virtual disk name.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Rename a virtual disk.
[apiInstance vdisksRenameVdiskIdNameVdiskNamePostWith:vdiskId
    vdiskName:vdiskName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var vdiskId = 56; // {Integer} The id of the virtual disk.

var vdiskName = vdiskName_example; // {String} The virtual disk name.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.vdisksRenameVdiskIdNameVdiskNamePost(vdiskIdvdiskName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksRenameVdiskIdNameVdiskNamePostExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.
            var vdiskName = vdiskName_example;  // String | The virtual disk name.

            try
            {
                // Rename a virtual disk.
                apiInstance.vdisksRenameVdiskIdNameVdiskNamePost(vdiskId, vdiskName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksRenameVdiskIdNameVdiskNamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vdiskId = 56; // Integer | The id of the virtual disk.
$vdiskName = vdiskName_example; // String | The virtual disk name.

try {
    $api_instance->vdisksRenameVdiskIdNameVdiskNamePost($vdiskId, $vdiskName);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksRenameVdiskIdNameVdiskNamePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vdiskId = 56; # Integer | The id of the virtual disk.
my $vdiskName = vdiskName_example; # String | The virtual disk name.

eval { 
    $api_instance->vdisksRenameVdiskIdNameVdiskNamePost(vdiskId => $vdiskId, vdiskName => $vdiskName);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksRenameVdiskIdNameVdiskNamePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vdiskId = 56 # Integer | The id of the virtual disk.
vdiskName = vdiskName_example # String | The virtual disk name.

try: 
    # Rename a virtual disk.
    api_instance.vdisks_rename_vdisk_id_name_vdisk_name_post(vdiskId, vdiskName)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksRenameVdiskIdNameVdiskNamePost: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required
vdisk_name*
String
The virtual disk name.
Required

Responses

Status: 200 - successfully removed the tunnel

Status: 500 - Could not decrypt the message

{code=500, message=crypto/rsa decryption error.}

vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost

Create a snapshot from a virtual disk and datastore.

Create a snapshot from a specific virtual disk and datastore.


/vdisks/snapcreate/{vdisk_id}/datastore/{datastore_id}

Usage and SDK Samples

curl -X POST "http://localhost/api/vdisks/snapcreate/{vdisk_id}/datastore/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost(vdiskId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        UUID datastoreId = ; // UUID | The datastore id.
        try {
            apiInstance.vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost(vdiskId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.
UUID *datastoreId = ; // The datastore id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a snapshot from a virtual disk and datastore.
[apiInstance vdisksSnapcreateVdiskIdDatastoreDatastoreIdPostWith:vdiskId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var vdiskId = 56; // {Integer} The id of the virtual disk.

var datastoreId = ; // {UUID} The datastore id.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost(vdiskIddatastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksSnapcreateVdiskIdDatastoreDatastoreIdPostExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.
            var datastoreId = new UUID(); // UUID | The datastore id.

            try
            {
                // Create a snapshot from a virtual disk and datastore.
                apiInstance.vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost(vdiskId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vdiskId = 56; // Integer | The id of the virtual disk.
$datastoreId = ; // UUID | The datastore id.

try {
    $api_instance->vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost($vdiskId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vdiskId = 56; # Integer | The id of the virtual disk.
my $datastoreId = ; # UUID | The datastore id.

eval { 
    $api_instance->vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost(vdiskId => $vdiskId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vdiskId = 56 # Integer | The id of the virtual disk.
datastoreId =  # UUID | The datastore id.

try: 
    # Create a snapshot from a virtual disk and datastore.
    api_instance.vdisks_snapcreate_vdisk_id_datastore_datastore_id_post(vdiskId, datastoreId)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksSnapcreateVdiskIdDatastoreDatastoreIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required
datastore_id*
UUID (uuid)
The datastore id.
Required

Responses

Status: 202 - Started creating a snapshot.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

vdisksTemplatenewPost

Create a template from a virtual disk with type snapshot.

Create a template from a virtual disk with type snapshot.


/vdisks/templatenew

Usage and SDK Samples

curl -X POST "http://localhost/api/vdisks/templatenew"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        VDiskInfo vDiskInfo = ; // VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.

        try {
            apiInstance.vdisksTemplatenewPost(vDiskInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksTemplatenewPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        VDiskInfo vDiskInfo = ; // VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.

        try {
            apiInstance.vdisksTemplatenewPost(vDiskInfo);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksTemplatenewPost");
            e.printStackTrace();
        }
    }
}
VDiskInfo *vDiskInfo = ; // The virtual disk id and the new name as a json object encrypted with
the public key of the controller.
 (optional)

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a template from a virtual disk with type snapshot.
[apiInstance vdisksTemplatenewPostWith:vDiskInfo
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var opts = { 
  'vDiskInfo':  // {VDiskInfo} The virtual disk id and the new name as a json object encrypted with
the public key of the controller.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.vdisksTemplatenewPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksTemplatenewPostExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vDiskInfo = new VDiskInfo(); // VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.
 (optional) 

            try
            {
                // Create a template from a virtual disk with type snapshot.
                apiInstance.vdisksTemplatenewPost(vDiskInfo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksTemplatenewPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vDiskInfo = ; // VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.


try {
    $api_instance->vdisksTemplatenewPost($vDiskInfo);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksTemplatenewPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vDiskInfo = WWW::SwaggerClient::Object::VDiskInfo->new(); # VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.


eval { 
    $api_instance->vdisksTemplatenewPost(vDiskInfo => $vDiskInfo);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksTemplatenewPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vDiskInfo =  # VDiskInfo | The virtual disk id and the new name as a json object encrypted with
the public key of the controller.
 (optional)

try: 
    # Create a template from a virtual disk with type snapshot.
    api_instance.vdisks_templatenew_post(vDiskInfo=vDiskInfo)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksTemplatenewPost: %s\n" % e)

Parameters

Body parameters
Name Description
vDiskInfo

Responses

Status: 202 - Started creating a template from a virtual disk with type snapshot.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

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 occured.

{code=500, message=Operation X did something wrong during processing}

vdisksVdiskIdDelete

Delete a virtual disk.


/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X DELETE "http://localhost/api/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            apiInstance.vdisksVdiskIdDelete(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            apiInstance.vdisksVdiskIdDelete(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Delete a virtual disk.
[apiInstance vdisksVdiskIdDeleteWith:vdiskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var vdiskId = 56; // {Integer} The id of the virtual disk.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.vdisksVdiskIdDelete(vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksVdiskIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.

            try
            {
                // Delete a virtual disk.
                apiInstance.vdisksVdiskIdDelete(vdiskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksVdiskIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vdiskId = 56; // Integer | The id of the virtual disk.

try {
    $api_instance->vdisksVdiskIdDelete($vdiskId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksVdiskIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vdiskId = 56; # Integer | The id of the virtual disk.

eval { 
    $api_instance->vdisksVdiskIdDelete(vdiskId => $vdiskId);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksVdiskIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vdiskId = 56 # Integer | The id of the virtual disk.

try: 
    # Delete a virtual disk.
    api_instance.vdisks_vdisk_id_delete(vdiskId)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksVdiskIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required

Responses

Status: 204 - Virtual disk successfully deleted.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}

vdisksVdiskIdGet

Get the virtual disk.


/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X GET "http://localhost/api/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            VDisk result = apiInstance.vdisksVdiskIdGet(vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            VDisk result = apiInstance.vdisksVdiskIdGet(vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get the virtual disk.
[apiInstance vdisksVdiskIdGetWith:vdiskId
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var vdiskId = 56; // {Integer} The id of the virtual disk.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.vdisksVdiskIdGet(vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksVdiskIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.

            try
            {
                // Get the virtual disk.
                VDisk result = apiInstance.vdisksVdiskIdGet(vdiskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksVdiskIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vdiskId = 56; // Integer | The id of the virtual disk.

try {
    $result = $api_instance->vdisksVdiskIdGet($vdiskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksVdiskIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vdiskId = 56; # Integer | The id of the virtual disk.

eval { 
    my $result = $api_instance->vdisksVdiskIdGet(vdiskId => $vdiskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksVdiskIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vdiskId = 56 # Integer | The id of the virtual disk.

try: 
    # Get the virtual disk.
    api_response = api_instance.vdisks_vdisk_id_get(vdiskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksVdiskIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required

Responses

Status: 200 - A virtual disk.

Status: 404 - The resource does not exists.

{code=404, message=Resource with id 1123 does not exist.}

vdisksVdiskIdRepairPut

Repair the virtual disk.

The repair actions syncs the main and the replica Vdisk, if the Vdisk is degraded and the datastore repair policy is manual. The following scenarios will result in a *failed* response: * The virtual disk does not exists (404) * The virtual disk is not degraded (422) * The total number of the ongoing repairs has exceeded the limit (422) * The datastore does not have 'repair_volume_policy' with 'trigger' to 'manual' (422)


/vdisks/{vdisk_id}/repair

Usage and SDK Samples

curl -X PUT "http://localhost/api/vdisks/{vdisk_id}/repair"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            apiInstance.vdisksVdiskIdRepairPut(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdRepairPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Integer vdiskId = 56; // Integer | The id of the virtual disk.
        try {
            apiInstance.vdisksVdiskIdRepairPut(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdRepairPut");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Repair the virtual disk.
[apiInstance vdisksVdiskIdRepairPutWith:vdiskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VdisksApi()

var vdiskId = 56; // {Integer} The id of the virtual disk.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.vdisksVdiskIdRepairPut(vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksVdiskIdRepairPutExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.

            try
            {
                // Repair the virtual disk.
                apiInstance.vdisksVdiskIdRepairPut(vdiskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksVdiskIdRepairPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VdisksApi();
$vdiskId = 56; // Integer | The id of the virtual disk.

try {
    $api_instance->vdisksVdiskIdRepairPut($vdiskId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksVdiskIdRepairPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $vdiskId = 56; # Integer | The id of the virtual disk.

eval { 
    $api_instance->vdisksVdiskIdRepairPut(vdiskId => $vdiskId);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksVdiskIdRepairPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VdisksApi()
vdiskId = 56 # Integer | The id of the virtual disk.

try: 
    # Repair the virtual disk.
    api_instance.vdisks_vdisk_id_repair_put(vdiskId)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksVdiskIdRepairPut: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required

Responses

Status: 202 - Virtual disk started repairing.

Status: 400 - Status bad request.

{code=400}

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.}]}

Version

manifestGet

Get api version information.


/manifest

Usage and SDK Samples

curl -X GET "http://localhost/api/manifest"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VersionApi;

import java.io.File;
import java.util.*;

public class VersionApiExample {

    public static void main(String[] args) {
        
        VersionApi apiInstance = new VersionApi();
        try {
            apiInstance.manifestGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling VersionApi#manifestGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VersionApi;

public class VersionApiExample {

    public static void main(String[] args) {
        VersionApi apiInstance = new VersionApi();
        try {
            apiInstance.manifestGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling VersionApi#manifestGet");
            e.printStackTrace();
        }
    }
}

VersionApi *apiInstance = [[VersionApi alloc] init];

// Get api version information.
[apiInstance manifestGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.VersionApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.manifestGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class manifestGetExample
    {
        public void main()
        {
            
            var apiInstance = new VersionApi();

            try
            {
                // Get api version information.
                apiInstance.manifestGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VersionApi.manifestGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\VersionApi();

try {
    $api_instance->manifestGet();
} catch (Exception $e) {
    echo 'Exception when calling VersionApi->manifestGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VersionApi;

my $api_instance = WWW::SwaggerClient::VersionApi->new();

eval { 
    $api_instance->manifestGet();
};
if ($@) {
    warn "Exception when calling VersionApi->manifestGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.VersionApi()

try: 
    # Get api version information.
    api_instance.manifest_get()
except ApiException as e:
    print("Exception when calling VersionApi->manifestGet: %s\n" % e)

Parameters

Responses

Status: 200 - Returns the name of the microservice and the version based on git commit.

Status: 500 - An unexpected error occured.

{code=500, message=Operation X did something wrong during processing}