Sunlight-dashboard

Alerts

alertsAlertIdDelete

Delete an alert.


/alerts/{alert_id}

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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}

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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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=123e4567-e89b-12d3-a456-426614174000, autodiscovered=false, start_position=0, 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=123e4567-e89b-12d3-a456-426614174111, 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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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}

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


/cluster_types

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 instances.

[{name=yesenia.name.small-instance, id=27, domain_name=dny3NkG1faI8, node=74265909, resource_group_id=1, state=SHUTOFF, progress=instance_active, owner=Leonora_Goldner, flavor_id=1, root_disk_gb=3, memory_mb=384, vcpus=1, extra_disk_1_gb=0, extra_disk_2_gb=0, disk_format=qcow2, min_ram_gb=0, min_disk_gb=1, os_distro=Linux, os_version=16.04, architecture=x64, has_cloudinit=true, vm_type=pv, image={id=1, name=Ubuntu 16.04 x64, filename=xenial-server-cloudimg-amd64-disk1-hvm.qcow2, virtual_size=0, status=enabled, min_ram=0, min_disk=1, os_distro=Linux, provider=sunlight.io, location=local, os_version=16.04, architecture=x64}}]

Status: 404 - The resource does not exist.

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

clustersGet

Get list of clusters.


/clusters

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/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 exist.

{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. 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) * 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 requested disk size is smaller than the minimun disk size of this image. (422) * The requested memory size is less than the minimum memory of the image. (422)


/clusters

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/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}

Status: 500 - An unexpected error occured.

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

migratableClustersGet

Get all available migratable clusters.

Returns a list of node IDs that the cluster can migrate to. Only primary nodes are returned.


/migratable_clusters

Usage and SDK Samples

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

public class ClustersApiExample {

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

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

// Get all available migratable clusters.
[apiInstance migratableClustersGetWithCompletionHandler: 
              ^(array['String'] 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.migratableClustersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

try {
    $result = $api_instance->migratableClustersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->migratableClustersGet: ', $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->migratableClustersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->migratableClustersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

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

Parameters

Responses

Status: 200 - The list of migratable node IDs

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 500 - An unexpected error occured.

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

migratePost

Migrate a cluster to another cluster.

A cluster can be migrated only if it is a single node cluster. If the action is succesfull a success status code will be returned.


/migrate

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/migrate"
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();
        MigrateClusterOpts migrate configuration = ; // MigrateClusterOpts | migrate configuration
        try {
            apiInstance.migratePost(migrate configuration);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#migratePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        MigrateClusterOpts migrate configuration = ; // MigrateClusterOpts | migrate configuration
        try {
            apiInstance.migratePost(migrate configuration);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#migratePost");
            e.printStackTrace();
        }
    }
}
MigrateClusterOpts *migrate configuration = ; // migrate configuration (optional)

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

// Migrate a cluster to another cluster.
[apiInstance migratePostWith:migrate configuration
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ClustersApi()

var opts = { 
  'migrate configuration':  // {MigrateClusterOpts} migrate configuration
};

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

namespace Example
{
    public class migratePostExample
    {
        public void main()
        {
            
            var apiInstance = new ClustersApi();
            var migrate configuration = new MigrateClusterOpts(); // MigrateClusterOpts | migrate configuration (optional) 

            try
            {
                // Migrate a cluster to another cluster.
                apiInstance.migratePost(migrate configuration);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.migratePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ClustersApi();
$migrate configuration = ; // MigrateClusterOpts | migrate configuration

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

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $migrate configuration = WWW::SwaggerClient::Object::MigrateClusterOpts->new(); # MigrateClusterOpts | migrate configuration

eval { 
    $api_instance->migratePost(migrate configuration => $migrate configuration);
};
if ($@) {
    warn "Exception when calling ClustersApi->migratePost: $@\n";
}
from __future__ import print_statement
import time
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()
migrate configuration =  # MigrateClusterOpts | migrate configuration (optional)

try: 
    # Migrate a cluster to another cluster.
    api_instance.migrate_post(migrate configuration=migrate configuration)
except ApiException as e:
    print("Exception when calling ClustersApi->migratePost: %s\n" % e)

Parameters

Body parameters
Name Description
migrate configuration

Responses

Status: 204 - Successfully cluster migration

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 404 - The resource does not exist.

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

ControllerNetwork

controllerNetworkGet

Controller network configuration

A successful response will return controller's network configuration.


/controller_network

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/controller_network"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ControllerNetworkApi;

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

public class ControllerNetworkApiExample {

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

public class ControllerNetworkApiExample {

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

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

// Controller network configuration
[apiInstance controllerNetworkGetWithCompletionHandler: 
              ^(ControllerNetConfiguration output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.ControllerNetworkApi()

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

namespace Example
{
    public class controllerNetworkGetExample
    {
        public void main()
        {
            
            var apiInstance = new ControllerNetworkApi();

            try
            {
                // Controller network configuration
                ControllerNetConfiguration result = apiInstance.controllerNetworkGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ControllerNetworkApi.controllerNetworkGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Controller network configuration
    api_response = api_instance.controller_network_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ControllerNetworkApi->controllerNetworkGet: %s\n" % e)

Parameters

Responses

Status: 200 - Controller's network configuration

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

datastoresDatastoreIdDisableReplicationPatch

Disable the replication in a two replicas datastore.


/datastores/{datastore_id}/disable_replication

Usage and SDK Samples

curl -X PATCH "http://docs.sunlight.io/api/datastores/{datastore_id}/disable_replication"
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.
        DisableReplicationOpts disableReplication = ; // DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).

        try {
            apiInstance.datastoresDatastoreIdDisableReplicationPatch(datastoreId, disableReplication);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdDisableReplicationPatch");
            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.
        DisableReplicationOpts disableReplication = ; // DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).

        try {
            apiInstance.datastoresDatastoreIdDisableReplicationPatch(datastoreId, disableReplication);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdDisableReplicationPatch");
            e.printStackTrace();
        }
    }
}
UUID *datastoreId = ; // The datastore id.
DisableReplicationOpts *disableReplication = ; // Add a hint node for disabling the replicas located on the requested node (optional).
 (optional)

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

// Disable the replication in a two replicas datastore.
[apiInstance datastoresDatastoreIdDisableReplicationPatchWith:datastoreId
    disableReplication:disableReplication
              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 = { 
  'disableReplication':  // {DisableReplicationOpts} Add a hint node for disabling the replicas located on the requested node (optional).

};

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

namespace Example
{
    public class datastoresDatastoreIdDisableReplicationPatchExample
    {
        public void main()
        {
            
            var apiInstance = new DatastoresApi();
            var datastoreId = new UUID(); // UUID | The datastore id.
            var disableReplication = new DisableReplicationOpts(); // DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).
 (optional) 

            try
            {
                // Disable the replication in a two replicas datastore.
                apiInstance.datastoresDatastoreIdDisableReplicationPatch(datastoreId, disableReplication);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.datastoresDatastoreIdDisableReplicationPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DatastoresApi();
$datastoreId = ; // UUID | The datastore id.
$disableReplication = ; // DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).


try {
    $api_instance->datastoresDatastoreIdDisableReplicationPatch($datastoreId, $disableReplication);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->datastoresDatastoreIdDisableReplicationPatch: ', $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 $disableReplication = WWW::SwaggerClient::Object::DisableReplicationOpts->new(); # DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).


eval { 
    $api_instance->datastoresDatastoreIdDisableReplicationPatch(datastoreId => $datastoreId, disableReplication => $disableReplication);
};
if ($@) {
    warn "Exception when calling DatastoresApi->datastoresDatastoreIdDisableReplicationPatch: $@\n";
}
from __future__ import print_statement
import time
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.
disableReplication =  # DisableReplicationOpts | Add a hint node for disabling the replicas located on the requested node (optional).
 (optional)

try: 
    # Disable the replication in a two replicas datastore.
    api_instance.datastores_datastore_id_disable_replication_patch(datastoreId, disableReplication=disableReplication)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdDisableReplicationPatch: %s\n" % e)

Parameters

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

Responses

Status: 204 - Datastore successfully disabled the replication.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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.

Status: 404 - The resource does not exist.

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

datastoresDatastoreIdEnableReplicationPatch

Enable the replication in a single replica datastore (two replicas supported).


/datastores/{datastore_id}/enable_replication

Usage and SDK Samples

curl -X PATCH "http://docs.sunlight.io/api/datastores/{datastore_id}/enable_replication"
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 {
            apiInstance.datastoresDatastoreIdEnableReplicationPatch(datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdEnableReplicationPatch");
            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 {
            apiInstance.datastoresDatastoreIdEnableReplicationPatch(datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#datastoresDatastoreIdEnableReplicationPatch");
            e.printStackTrace();
        }
    }
}
UUID *datastoreId = ; // The datastore id.

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

// Enable the replication in a single replica datastore (two replicas supported).
[apiInstance datastoresDatastoreIdEnableReplicationPatchWith:datastoreId
              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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.datastoresDatastoreIdEnableReplicationPatch(datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            try
            {
                // Enable the replication in a single replica datastore (two replicas supported).
                apiInstance.datastoresDatastoreIdEnableReplicationPatch(datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.datastoresDatastoreIdEnableReplicationPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $api_instance->datastoresDatastoreIdEnableReplicationPatch($datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->datastoresDatastoreIdEnableReplicationPatch: ', $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 { 
    $api_instance->datastoresDatastoreIdEnableReplicationPatch(datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling DatastoresApi->datastoresDatastoreIdEnableReplicationPatch: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Enable the replication in a single replica datastore (two replicas supported).
    api_instance.datastores_datastore_id_enable_replication_patch(datastoreId)
except ApiException as e:
    print("Exception when calling DatastoresApi->datastoresDatastoreIdEnableReplicationPatch: %s\n" % e)

Parameters

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

Responses

Status: 204 - Datastore successfully enabled the replication.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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 exist.

{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 new disk to add 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://docs.sunlight.io/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: 200 - Datastore succesfully updated.

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

{code=422, message=Validation failed}

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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 'INSTALLATION_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://docs.sunlight.io/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}

Status: 500 - An unexpected error occured.

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

DateAndTime

dateAndTimeGet

Retrieves the date and time of the system.

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


/date_and_time

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/date_and_time"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

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

public class DateAndTimeApiExample {

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

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

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

var api = new SunlightDashboard.DateAndTimeApi()

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

namespace Example
{
    public class dateAndTimeGetExample
    {
        public void main()
        {
            
            var apiInstance = new DateAndTimeApi();

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

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

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

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

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

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

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

Parameters

Responses

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

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 500 - An unexpected error occured.

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

dateAndTimeNtpServersGet

Retrieve the configure ntp servers of the system.

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


/date_and_time/ntp_servers

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/date_and_time/ntp_servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

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

public class DateAndTimeApiExample {

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

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

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

var api = new SunlightDashboard.DateAndTimeApi()

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

namespace Example
{
    public class dateAndTimeNtpServersGetExample
    {
        public void main()
        {
            
            var apiInstance = new DateAndTimeApi();

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

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

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

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

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

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

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

Parameters

Responses

Status: 200 - The ntp servers of the system.

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 500 - An unexpected error occured.

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

dateAndTimeNtpServersPut

Set a new pool of ntp servers.

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


/date_and_time/ntp_servers

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/date_and_time/ntp_servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

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

public class DateAndTimeApiExample {

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

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

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

var api = new SunlightDashboard.DateAndTimeApi()

var opts = { 
  'nTPServers':  // {NTP_servers} The selected NTP servers will be added in ntp service config file.
};

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

namespace Example
{
    public class dateAndTimeNtpServersPutExample
    {
        public void main()
        {
            
            var apiInstance = new DateAndTimeApi();
            var nTPServers = new NTP_servers(); // NTP_servers | The selected NTP servers will be added in ntp service config file. (optional) 

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

$api_instance = new Swagger\Client\Api\DateAndTimeApi();
$nTPServers = ; // NTP_servers | The selected NTP servers will be added in ntp service config file.

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

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();
my $nTPServers = WWW::SwaggerClient::Object::NTP_servers->new(); # NTP_servers | The selected NTP servers will be added in ntp service config file.

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

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()
nTPServers =  # NTP_servers | The selected NTP servers will be added in ntp service config file. (optional)

try: 
    # Set a new pool of ntp servers.
    api_instance.date_and_time_ntp_servers_put(nTPServers=nTPServers)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeNtpServersPut: %s\n" % e)

Parameters

Body parameters
Name Description
nTPServers

Responses

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

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 500 - An unexpected error occured.

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

dateAndTimeTimezonesGet

Retrieves the available timezones of the system.

A successful response will fetch all the available timezones of the SIM vm.


/date_and_time/timezones

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/date_and_time/timezones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

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

public class DateAndTimeApiExample {

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

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

// Retrieves the available timezones of the system.
[apiInstance dateAndTimeTimezonesGetWithCompletionHandler: 
              ^(AvailableTimezones output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DateAndTimeApi()

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

namespace Example
{
    public class dateAndTimeTimezonesGetExample
    {
        public void main()
        {
            
            var apiInstance = new DateAndTimeApi();

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

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

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

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

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

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

try: 
    # Retrieves the available timezones of the system.
    api_response = api_instance.date_and_time_timezones_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeTimezonesGet: %s\n" % e)

Parameters

Responses

Status: 200 - The available timezones of the system.

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 500 - An unexpected error occured.

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

dateAndTimeTimezonesPut

Set the timezone of the system.

A successful response will set the timezones of the SIM vm.


/date_and_time/timezones

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/date_and_time/timezones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DateAndTimeApi;

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

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        SelectTimeZone timezone = ; // SelectTimeZone | The selected timezone will be set in the system.
        try {
            apiInstance.dateAndTimeTimezonesPut(timezone);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DateAndTimeApi;

public class DateAndTimeApiExample {

    public static void main(String[] args) {
        DateAndTimeApi apiInstance = new DateAndTimeApi();
        SelectTimeZone timezone = ; // SelectTimeZone | The selected timezone will be set in the system.
        try {
            apiInstance.dateAndTimeTimezonesPut(timezone);
        } catch (ApiException e) {
            System.err.println("Exception when calling DateAndTimeApi#dateAndTimeTimezonesPut");
            e.printStackTrace();
        }
    }
}
SelectTimeZone *timezone = ; // The selected timezone will be set in the system. (optional)

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

// Set the timezone of the system.
[apiInstance dateAndTimeTimezonesPutWith:timezone
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DateAndTimeApi()

var opts = { 
  'timezone':  // {SelectTimeZone} The selected timezone will be set in the system.
};

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

namespace Example
{
    public class dateAndTimeTimezonesPutExample
    {
        public void main()
        {
            
            var apiInstance = new DateAndTimeApi();
            var timezone = new SelectTimeZone(); // SelectTimeZone | The selected timezone will be set in the system. (optional) 

            try
            {
                // Set the timezone of the system.
                apiInstance.dateAndTimeTimezonesPut(timezone);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DateAndTimeApi.dateAndTimeTimezonesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DateAndTimeApi();
$timezone = ; // SelectTimeZone | The selected timezone will be set in the system.

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

my $api_instance = WWW::SwaggerClient::DateAndTimeApi->new();
my $timezone = WWW::SwaggerClient::Object::SelectTimeZone->new(); # SelectTimeZone | The selected timezone will be set in the system.

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

# create an instance of the API class
api_instance = swagger_client.DateAndTimeApi()
timezone =  # SelectTimeZone | The selected timezone will be set in the system. (optional)

try: 
    # Set the timezone of the system.
    api_instance.date_and_time_timezones_put(timezone=timezone)
except ApiException as e:
    print("Exception when calling DateAndTimeApi->dateAndTimeTimezonesPut: %s\n" % e)

Parameters

Body parameters
Name Description
timezone

Responses

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

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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://docs.sunlight.io/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.}

Default

maintenanceDelete

Put the Sunlight API into the normal mode.


/maintenance

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/api/maintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

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

public class DefaultApiExample {

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

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

// Put the Sunlight API into the normal mode.
[apiInstance maintenanceDeleteWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DefaultApi()

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

namespace Example
{
    public class maintenanceDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();

            try
            {
                // Put the Sunlight API into the normal mode.
                apiInstance.maintenanceDelete();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.maintenanceDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Put the Sunlight API into the normal mode.
    api_instance.maintenance_delete()
except ApiException as e:
    print("Exception when calling DefaultApi->maintenanceDelete: %s\n" % e)

Parameters

Responses

Status: 204 - The Sunlight API was moved to normal mode.

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

{code=422, message=Validation failed}

maintenancePut

Put the Sunlight API into the maintenance mode.


/maintenance

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/maintenance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        MaintenanceModeOpts maintenance = ; // MaintenanceModeOpts | Maintenance mode options.
        try {
            apiInstance.maintenancePut(maintenance);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#maintenancePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        MaintenanceModeOpts maintenance = ; // MaintenanceModeOpts | Maintenance mode options.
        try {
            apiInstance.maintenancePut(maintenance);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#maintenancePut");
            e.printStackTrace();
        }
    }
}
MaintenanceModeOpts *maintenance = ; // Maintenance mode options. (optional)

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

// Put the Sunlight API into the maintenance mode.
[apiInstance maintenancePutWith:maintenance
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DefaultApi()

var opts = { 
  'maintenance':  // {MaintenanceModeOpts} Maintenance mode options.
};

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

namespace Example
{
    public class maintenancePutExample
    {
        public void main()
        {
            
            var apiInstance = new DefaultApi();
            var maintenance = new MaintenanceModeOpts(); // MaintenanceModeOpts | Maintenance mode options. (optional) 

            try
            {
                // Put the Sunlight API into the maintenance mode.
                apiInstance.maintenancePut(maintenance);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.maintenancePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DefaultApi();
$maintenance = ; // MaintenanceModeOpts | Maintenance mode options.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $maintenance = WWW::SwaggerClient::Object::MaintenanceModeOpts->new(); # MaintenanceModeOpts | Maintenance mode options.

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

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
maintenance =  # MaintenanceModeOpts | Maintenance mode options. (optional)

try: 
    # Put the Sunlight API into the maintenance mode.
    api_instance.maintenance_put(maintenance=maintenance)
except ApiException as e:
    print("Exception when calling DefaultApi->maintenancePut: %s\n" % e)

Parameters

Body parameters
Name Description
maintenance

Responses

Status: 204 - The Sunlight API was moved to maintenance mode.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

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

{code=422, message=Validation failed}

DhcpSubnets

dhcpSubnetsDhcpSubnetIdDelete

Delete the DHCP subnet.


/dhcp_subnets/{dhcp_subnet_id}

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/api/dhcp_subnets/{dhcp_subnet_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        UUID dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.
        try {
            apiInstance.dhcpSubnetsDhcpSubnetIdDelete(dhcpSubnetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsDhcpSubnetIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        UUID dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.
        try {
            apiInstance.dhcpSubnetsDhcpSubnetIdDelete(dhcpSubnetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsDhcpSubnetIdDelete");
            e.printStackTrace();
        }
    }
}
UUID *dhcpSubnetId = ; // The DHCP Subnet UUID.

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

// Delete the DHCP subnet.
[apiInstance dhcpSubnetsDhcpSubnetIdDeleteWith:dhcpSubnetId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DhcpSubnetsApi()

var dhcpSubnetId = ; // {UUID} The DHCP Subnet UUID.


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

namespace Example
{
    public class dhcpSubnetsDhcpSubnetIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new DhcpSubnetsApi();
            var dhcpSubnetId = new UUID(); // UUID | The DHCP Subnet UUID.

            try
            {
                // Delete the DHCP subnet.
                apiInstance.dhcpSubnetsDhcpSubnetIdDelete(dhcpSubnetId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.dhcpSubnetsDhcpSubnetIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DhcpSubnetsApi();
$dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.

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

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $dhcpSubnetId = ; # UUID | The DHCP Subnet UUID.

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

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
dhcpSubnetId =  # UUID | The DHCP Subnet UUID.

try: 
    # Delete the DHCP subnet.
    api_instance.dhcp_subnets_dhcp_subnet_id_delete(dhcpSubnetId)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->dhcpSubnetsDhcpSubnetIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
dhcp_subnet_id*
UUID (uuid)
The DHCP Subnet UUID.
Required

Responses

Status: 204 - DHCP subnet successfully removed.

Status: 404 - The resource does not exist.

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

dhcpSubnetsDhcpSubnetIdGet

Get the DHCP subnet.


/dhcp_subnets/{dhcp_subnet_id}

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/dhcp_subnets/{dhcp_subnet_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        UUID dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.
        try {
            DHCPSubnet result = apiInstance.dhcpSubnetsDhcpSubnetIdGet(dhcpSubnetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsDhcpSubnetIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        UUID dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.
        try {
            DHCPSubnet result = apiInstance.dhcpSubnetsDhcpSubnetIdGet(dhcpSubnetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsDhcpSubnetIdGet");
            e.printStackTrace();
        }
    }
}
UUID *dhcpSubnetId = ; // The DHCP Subnet UUID.

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

// Get the DHCP subnet.
[apiInstance dhcpSubnetsDhcpSubnetIdGetWith:dhcpSubnetId
              completionHandler: ^(DHCPSubnet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DhcpSubnetsApi()

var dhcpSubnetId = ; // {UUID} The DHCP Subnet UUID.


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

namespace Example
{
    public class dhcpSubnetsDhcpSubnetIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new DhcpSubnetsApi();
            var dhcpSubnetId = new UUID(); // UUID | The DHCP Subnet UUID.

            try
            {
                // Get the DHCP subnet.
                DHCPSubnet result = apiInstance.dhcpSubnetsDhcpSubnetIdGet(dhcpSubnetId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.dhcpSubnetsDhcpSubnetIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DhcpSubnetsApi();
$dhcpSubnetId = ; // UUID | The DHCP Subnet UUID.

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

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $dhcpSubnetId = ; # UUID | The DHCP Subnet UUID.

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

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
dhcpSubnetId =  # UUID | The DHCP Subnet UUID.

try: 
    # Get the DHCP subnet.
    api_response = api_instance.dhcp_subnets_dhcp_subnet_id_get(dhcpSubnetId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->dhcpSubnetsDhcpSubnetIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
dhcp_subnet_id*
UUID (uuid)
The DHCP Subnet UUID.
Required

Responses

Status: 200 - Shows the DHCP subnet.

Status: 404 - The resource does not exist.

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

dhcpSubnetsGet

Get the list of DHCP subnets.


/dhcp_subnets

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/dhcp_subnets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

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

public class DhcpSubnetsApiExample {

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

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

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

var api = new SunlightDashboard.DhcpSubnetsApi()

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

namespace Example
{
    public class dhcpSubnetsGetExample
    {
        public void main()
        {
            
            var apiInstance = new DhcpSubnetsApi();

            try
            {
                // Get the list of DHCP subnets.
                array[DHCPSubnet] result = apiInstance.dhcpSubnetsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.dhcpSubnetsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get the list of DHCP subnets.
    api_response = api_instance.dhcp_subnets_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->dhcpSubnetsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of DHCP Subnets.

Status: 500 - An unexpected error occured.

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

dhcpSubnetsPost

Add a DHCP subnet.

The following scenarios will fail with a validation error * Unable to find the requested network (422) * Unable to parce the requested CIDR (422)


/dhcp_subnets

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/dhcp_subnets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DhcpSubnetsApi;

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

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        NewDHCPSubnet dHCP subnet = ; // NewDHCPSubnet | Add a DHCP subnet.
        try {
            DHCPSubnet result = apiInstance.dhcpSubnetsPost(dHCP subnet);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DhcpSubnetsApi;

public class DhcpSubnetsApiExample {

    public static void main(String[] args) {
        DhcpSubnetsApi apiInstance = new DhcpSubnetsApi();
        NewDHCPSubnet dHCP subnet = ; // NewDHCPSubnet | Add a DHCP subnet.
        try {
            DHCPSubnet result = apiInstance.dhcpSubnetsPost(dHCP subnet);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DhcpSubnetsApi#dhcpSubnetsPost");
            e.printStackTrace();
        }
    }
}
NewDHCPSubnet *dHCP subnet = ; // Add a DHCP subnet. (optional)

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

// Add a DHCP subnet.
[apiInstance dhcpSubnetsPostWith:dHCP subnet
              completionHandler: ^(DHCPSubnet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DhcpSubnetsApi()

var opts = { 
  'dHCP subnet':  // {NewDHCPSubnet} Add a DHCP subnet.
};

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

namespace Example
{
    public class dhcpSubnetsPostExample
    {
        public void main()
        {
            
            var apiInstance = new DhcpSubnetsApi();
            var dHCP subnet = new NewDHCPSubnet(); // NewDHCPSubnet | Add a DHCP subnet. (optional) 

            try
            {
                // Add a DHCP subnet.
                DHCPSubnet result = apiInstance.dhcpSubnetsPost(dHCP subnet);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DhcpSubnetsApi.dhcpSubnetsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DhcpSubnetsApi();
$dHCP subnet = ; // NewDHCPSubnet | Add a DHCP subnet.

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

my $api_instance = WWW::SwaggerClient::DhcpSubnetsApi->new();
my $dHCP subnet = WWW::SwaggerClient::Object::NewDHCPSubnet->new(); # NewDHCPSubnet | Add a DHCP subnet.

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

# create an instance of the API class
api_instance = swagger_client.DhcpSubnetsApi()
dHCP subnet =  # NewDHCPSubnet | Add a DHCP subnet. (optional)

try: 
    # Add a DHCP subnet.
    api_response = api_instance.dhcp_subnets_post(dHCP subnet=dHCP subnet)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DhcpSubnetsApi->dhcpSubnetsPost: %s\n" % e)

Parameters

Body parameters
Name Description
dHCP subnet

Responses

Status: 201 - DHCP subnet is successfully added.

Status: 500 - An unexpected error occured.

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

Disks

disksGet

Get all the available disks that can be used by the user.


/disks

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/disks?unconfigured_disks="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DisksApi;

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

public class DisksApiExample {

    public static void main(String[] args) {
        
        DisksApi apiInstance = new DisksApi();
        Boolean unconfiguredDisks = true; // Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.

        try {
            array[Disk] result = apiInstance.disksGet(unconfiguredDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#disksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DisksApi;

public class DisksApiExample {

    public static void main(String[] args) {
        DisksApi apiInstance = new DisksApi();
        Boolean unconfiguredDisks = true; // Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.

        try {
            array[Disk] result = apiInstance.disksGet(unconfiguredDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#disksGet");
            e.printStackTrace();
        }
    }
}
Boolean *unconfiguredDisks = true; // Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.
 (optional)

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

// Get all the available disks that can be used by the user.
[apiInstance disksGetWith:unconfiguredDisks
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DisksApi()

var opts = { 
  'unconfiguredDisks': true // {Boolean} Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.

};

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

namespace Example
{
    public class disksGetExample
    {
        public void main()
        {
            
            var apiInstance = new DisksApi();
            var unconfiguredDisks = true;  // Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.
 (optional) 

            try
            {
                // Get all the available disks that can be used by the user.
                array[Disk] result = apiInstance.disksGet(unconfiguredDisks);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DisksApi.disksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DisksApi();
$unconfiguredDisks = true; // Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.


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

my $api_instance = WWW::SwaggerClient::DisksApi->new();
my $unconfiguredDisks = true; # Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.


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

# create an instance of the API class
api_instance = swagger_client.DisksApi()
unconfiguredDisks = true # Boolean | Contain in the list the unconfigured storage devices, i.e. physical disks / devices that
are connected on a physical node (seen under /dev/) but are not yet initilized and visible
by our product, thus not usable at the moment.
 (optional)

try: 
    # Get all the available disks that can be used by the user.
    api_response = api_instance.disks_get(unconfiguredDisks=unconfiguredDisks)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DisksApi->disksGet: %s\n" % e)

Parameters

Query parameters
Name Description
unconfigured_disks
Boolean
Contain in the list the unconfigured storage devices, i.e. physical disks / devices that are connected on a physical node (seen under /dev/) but are not yet initilized and visible by our product, thus not usable at the moment.

Responses

Status: 200 - A list of disks.

Status: 500 - An unexpected error occured.

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

disksInitialisePut

Initialise an unconfigured disk.


/disks/initialise

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/disks/initialise"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DisksApi;

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

public class DisksApiExample {

    public static void main(String[] args) {
        
        DisksApi apiInstance = new DisksApi();
        NewUnconfiguredDisk unconfigured disk = ; // NewUnconfiguredDisk | Initialise an unconfigured disk.
        try {
            Disk result = apiInstance.disksInitialisePut(unconfigured disk);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#disksInitialisePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DisksApi;

public class DisksApiExample {

    public static void main(String[] args) {
        DisksApi apiInstance = new DisksApi();
        NewUnconfiguredDisk unconfigured disk = ; // NewUnconfiguredDisk | Initialise an unconfigured disk.
        try {
            Disk result = apiInstance.disksInitialisePut(unconfigured disk);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DisksApi#disksInitialisePut");
            e.printStackTrace();
        }
    }
}
NewUnconfiguredDisk *unconfigured disk = ; // Initialise an unconfigured disk. (optional)

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

// Initialise an unconfigured disk.
[apiInstance disksInitialisePutWith:unconfigured disk
              completionHandler: ^(Disk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.DisksApi()

var opts = { 
  'unconfigured disk':  // {NewUnconfiguredDisk} Initialise an unconfigured disk.
};

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

namespace Example
{
    public class disksInitialisePutExample
    {
        public void main()
        {
            
            var apiInstance = new DisksApi();
            var unconfigured disk = new NewUnconfiguredDisk(); // NewUnconfiguredDisk | Initialise an unconfigured disk. (optional) 

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

$api_instance = new Swagger\Client\Api\DisksApi();
$unconfigured disk = ; // NewUnconfiguredDisk | Initialise an unconfigured disk.

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

my $api_instance = WWW::SwaggerClient::DisksApi->new();
my $unconfigured disk = WWW::SwaggerClient::Object::NewUnconfiguredDisk->new(); # NewUnconfiguredDisk | Initialise an unconfigured disk.

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

# create an instance of the API class
api_instance = swagger_client.DisksApi()
unconfigured disk =  # NewUnconfiguredDisk | Initialise an unconfigured disk. (optional)

try: 
    # Initialise an unconfigured disk.
    api_response = api_instance.disks_initialise_put(unconfigured disk=unconfigured disk)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DisksApi->disksInitialisePut: %s\n" % e)

Parameters

Body parameters
Name Description
unconfigured disk

Responses

Status: 200 - Disk is successfully initialised.

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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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();
        Long flavorId = 789; // Long | 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();
        Long flavorId = 789; // Long | The flavor id.
        try {
            apiInstance.flavorsFlavorIdDelete(flavorId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#flavorsFlavorIdDelete");
            e.printStackTrace();
        }
    }
}
Long *flavorId = 789; // 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 = 789; // {Long} 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 = 789;  // Long | 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 = 789; // Long | 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 = 789; # Long | 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 = 789 # Long | 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*
Long (int64)
The flavor id.
Required

Responses

Status: 204 - Flavor successfully removed.

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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();
        Long flavorId = 789; // Long | 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();
        Long flavorId = 789; // Long | 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();
        }
    }
}
Long *flavorId = 789; // 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 = 789; // {Long} 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 = 789;  // Long | 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 = 789; // Long | 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 = 789; # Long | 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 = 789 # Long | 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*
Long (int64)
The flavor id.
Required

Responses

Status: 200 - Shows the flavor.

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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://docs.sunlight.io/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.}

HealthStatus

healthStatusGet

Get a health status report of the cluster.


/health_status

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/health_status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HealthStatusApi;

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

public class HealthStatusApiExample {

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

public class HealthStatusApiExample {

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

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

// Get a health status report of the cluster.
[apiInstance healthStatusGetWithCompletionHandler: 
              ^(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.HealthStatusApi()

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

namespace Example
{
    public class healthStatusGetExample
    {
        public void main()
        {
            
            var apiInstance = new HealthStatusApi();

            try
            {
                // Get a health status report of the cluster.
                inline_response_200_8 result = apiInstance.healthStatusGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HealthStatusApi.healthStatusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get a health status report of the cluster.
    api_response = api_instance.health_status_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthStatusApi->healthStatusGet: %s\n" % e)

Parameters

Responses

Status: 200 - A detailed report of the health status of the cluster.

Status: 500 - An unexpected error occured.

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

healthStatusHardwareGet

Get a health status report of the hardware of the cluster.


/health_status/hardware

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/health_status/hardware"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HealthStatusApi;

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

public class HealthStatusApiExample {

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

public class HealthStatusApiExample {

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

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

// Get a health status report of the hardware of the cluster.
[apiInstance healthStatusHardwareGetWithCompletionHandler: 
              ^(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.HealthStatusApi()

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

namespace Example
{
    public class healthStatusHardwareGetExample
    {
        public void main()
        {
            
            var apiInstance = new HealthStatusApi();

            try
            {
                // Get a health status report of the hardware of the cluster.
                inline_response_200_10 result = apiInstance.healthStatusHardwareGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HealthStatusApi.healthStatusHardwareGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get a health status report of the hardware of the cluster.
    api_response = api_instance.health_status_hardware_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthStatusApi->healthStatusHardwareGet: %s\n" % e)

Parameters

Responses

Status: 200 - A detailed report of the health status of the hardware of the cluster.

Status: 500 - An unexpected error occured.

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

healthStatusHardwareNodesNodeIdNetworkGet

Get the health status report of the networks of a specific node.


/health_status/hardware/nodes/{node_id}/network

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/health_status/hardware/nodes/{node_id}/network"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HealthStatusApi;

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

public class HealthStatusApiExample {

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

public class HealthStatusApiExample {

    public static void main(String[] args) {
        HealthStatusApi apiInstance = new HealthStatusApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            inline_response_200_11 result = apiInstance.healthStatusHardwareNodesNodeIdNetworkGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthStatusApi#healthStatusHardwareNodesNodeIdNetworkGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

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

// Get the health status report of the networks of a specific node.
[apiInstance healthStatusHardwareNodesNodeIdNetworkGetWith:nodeId
              completionHandler: ^(inline_response_200_11 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.HealthStatusApi()

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.healthStatusHardwareNodesNodeIdNetworkGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class healthStatusHardwareNodesNodeIdNetworkGetExample
    {
        public void main()
        {
            
            var apiInstance = new HealthStatusApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the health status report of the networks of a specific node.
                inline_response_200_11 result = apiInstance.healthStatusHardwareNodesNodeIdNetworkGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HealthStatusApi.healthStatusHardwareNodesNodeIdNetworkGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\HealthStatusApi();
$nodeId = ; // UUID | The node id.

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

my $api_instance = WWW::SwaggerClient::HealthStatusApi->new();
my $nodeId = ; # UUID | The node id.

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

# create an instance of the API class
api_instance = swagger_client.HealthStatusApi()
nodeId =  # UUID | The node id.

try: 
    # Get the health status report of the networks of a specific node.
    api_response = api_instance.health_status_hardware_nodes_node_id_network_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthStatusApi->healthStatusHardwareNodesNodeIdNetworkGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - A detailed report of the health status of the network of a node.

Status: 500 - An unexpected error occured.

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

healthStatusHardwareNodesNodeIdStorageDisksGet

Get the health status report of the storage of a specific node.


/health_status/hardware/nodes/{node_id}/storage/disks

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/health_status/hardware/nodes/{node_id}/storage/disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HealthStatusApi;

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

public class HealthStatusApiExample {

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

public class HealthStatusApiExample {

    public static void main(String[] args) {
        HealthStatusApi apiInstance = new HealthStatusApi();
        UUID nodeId = ; // UUID | The node id.
        try {
            inline_response_200_12 result = apiInstance.healthStatusHardwareNodesNodeIdStorageDisksGet(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthStatusApi#healthStatusHardwareNodesNodeIdStorageDisksGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

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

// Get the health status report of the storage of a specific node.
[apiInstance healthStatusHardwareNodesNodeIdStorageDisksGetWith:nodeId
              completionHandler: ^(inline_response_200_12 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.HealthStatusApi()

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.healthStatusHardwareNodesNodeIdStorageDisksGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class healthStatusHardwareNodesNodeIdStorageDisksGetExample
    {
        public void main()
        {
            
            var apiInstance = new HealthStatusApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Get the health status report of the storage of a specific node.
                inline_response_200_12 result = apiInstance.healthStatusHardwareNodesNodeIdStorageDisksGet(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HealthStatusApi.healthStatusHardwareNodesNodeIdStorageDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\HealthStatusApi();
$nodeId = ; // UUID | The node id.

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

my $api_instance = WWW::SwaggerClient::HealthStatusApi->new();
my $nodeId = ; # UUID | The node id.

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

# create an instance of the API class
api_instance = swagger_client.HealthStatusApi()
nodeId =  # UUID | The node id.

try: 
    # Get the health status report of the storage of a specific node.
    api_response = api_instance.health_status_hardware_nodes_node_id_storage_disks_get(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthStatusApi->healthStatusHardwareNodesNodeIdStorageDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - A detailed report of the health status of the storage of a node.

Status: 500 - An unexpected error occured.

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

healthStatusServicesGet

Get a health status report of the services of the cluster.


/health_status/services

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/health_status/services"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HealthStatusApi;

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

public class HealthStatusApiExample {

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

public class HealthStatusApiExample {

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

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

// Get a health status report of the services of the cluster.
[apiInstance healthStatusServicesGetWithCompletionHandler: 
              ^(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.HealthStatusApi()

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

namespace Example
{
    public class healthStatusServicesGetExample
    {
        public void main()
        {
            
            var apiInstance = new HealthStatusApi();

            try
            {
                // Get a health status report of the services of the cluster.
                inline_response_200_9 result = apiInstance.healthStatusServicesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HealthStatusApi.healthStatusServicesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get a health status report of the services of the cluster.
    api_response = api_instance.health_status_services_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthStatusApi->healthStatusServicesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A detailed report of the health status of the services of the cluster.

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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}

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://docs.sunlight.io/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.}

Initialize

initializeClusterPost

Initialize the cluster

Initialize the cluster with a single datastore, network and resource group


/initialize_cluster

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/initialize_cluster"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InitializeApi;

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

public class InitializeApiExample {

    public static void main(String[] args) {
        
        InitializeApi apiInstance = new InitializeApi();
        InitializeClusterOpts initializeClusterOpts = ; // InitializeClusterOpts | The details for cluster initialization

        try {
            apiInstance.initializeClusterPost(initializeClusterOpts);
        } catch (ApiException e) {
            System.err.println("Exception when calling InitializeApi#initializeClusterPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InitializeApi;

public class InitializeApiExample {

    public static void main(String[] args) {
        InitializeApi apiInstance = new InitializeApi();
        InitializeClusterOpts initializeClusterOpts = ; // InitializeClusterOpts | The details for cluster initialization

        try {
            apiInstance.initializeClusterPost(initializeClusterOpts);
        } catch (ApiException e) {
            System.err.println("Exception when calling InitializeApi#initializeClusterPost");
            e.printStackTrace();
        }
    }
}
InitializeClusterOpts *initializeClusterOpts = ; // The details for cluster initialization


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

// Initialize the cluster
[apiInstance initializeClusterPostWith:initializeClusterOpts
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InitializeApi()

var initializeClusterOpts = ; // {InitializeClusterOpts} The details for cluster initialization



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

namespace Example
{
    public class initializeClusterPostExample
    {
        public void main()
        {
            
            var apiInstance = new InitializeApi();
            var initializeClusterOpts = new InitializeClusterOpts(); // InitializeClusterOpts | The details for cluster initialization


            try
            {
                // Initialize the cluster
                apiInstance.initializeClusterPost(initializeClusterOpts);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InitializeApi.initializeClusterPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InitializeApi();
$initializeClusterOpts = ; // InitializeClusterOpts | The details for cluster initialization


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

my $api_instance = WWW::SwaggerClient::InitializeApi->new();
my $initializeClusterOpts = WWW::SwaggerClient::Object::InitializeClusterOpts->new(); # InitializeClusterOpts | The details for cluster initialization


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

# create an instance of the API class
api_instance = swagger_client.InitializeApi()
initializeClusterOpts =  # InitializeClusterOpts | The details for cluster initialization


try: 
    # Initialize the cluster
    api_instance.initialize_cluster_post(initializeClusterOpts)
except ApiException as e:
    print("Exception when calling InitializeApi->initializeClusterPost: %s\n" % e)

Parameters

Body parameters
Name Description
initializeClusterOpts *

Responses

Status: 202 - Cluster successfully initialized

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

{code=422, message=Validation failed}

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

{code=422, message=Validation failed}

Status: 409 - Status conflict.

{code=409, message=Indicate a request conflict with the current state of the target resource.}

Status: 500 - An unexpected error occured.

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

Instances

instancesGet

Get all instances.

Get all instances on the platform.


/instances

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/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();
        try {
            array[Instance] result = apiInstance.instancesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

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

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

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

var api = new SunlightDashboard.InstancesApi()

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

namespace Example
{
    public class instancesGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();

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

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

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

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

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

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

try: 
    # Get all instances.
    api_response = api_instance.instances_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesGet: %s\n" % e)

Parameters

Responses

Status: 200 - Successful, return an array of instances.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/api/instances/{instance_id}/{action}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        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 InstancesApi#instancesInstanceIdActionPut");
            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.
        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 InstancesApi#instancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
String *action = action_example; // The action to perform.

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

// Apply action to specific instance.
[apiInstance instancesInstanceIdActionPutWith:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

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(instanceIdaction, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdActionPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 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 InstancesApi.instancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$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 InstancesApi->instancesInstanceIdActionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 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 InstancesApi->instancesInstanceIdActionPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 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 InstancesApi->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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

Status: 500 - An unexpected error occured.

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

instancesInstanceIdGet

Get specific instance info based on the given ID.

Get information about the instance corresponding to given ID.


/instances/{instance_id}

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances/{instance_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Get specific instance info based on the given ID.
[apiInstance instancesInstanceIdGetWith: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.instancesInstanceIdGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Get specific instance info based on the given ID.
                Instance result = apiInstance.instancesInstanceIdGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Get specific instance info based on the given ID.
    api_response = api_instance.instances_instance_id_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - Successful, return information about this instance.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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(instanceIdinterfaceId, 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 exist.

{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://docs.sunlight.io/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(instanceIdinterfaceId, 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 exist.

{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://docs.sunlight.io/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(instanceIdinterfaceId, 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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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(instanceIdids, 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 exist.

{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://docs.sunlight.io/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/PLT 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/PLT 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/PLT 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/PLT 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/PLT 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/PLT 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/PLT 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/PLT 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/PLT devices

Responses

Status: 200 - A list of PCI devices.

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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(instanceIdids, 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 exist.

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

Status: 500 - An unexpected error occured.

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

instancesInstanceIdPltdevsDelete

Detach PLT devices from the instance.

The following scenarios will result in a *failed* response * The instance does not exist (404) * A PLT device is not attached to the instance (500) * The instance is not in SHUTOFF state (500)


/instances/{instance_id}/pltdevs

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/api/instances/{instance_id}/pltdevs"
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.
        PLTDevsArray ids = ; // PLTDevsArray | The PLT devices to detach.
        try {
            Instance result = apiInstance.instancesInstanceIdPltdevsDelete(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsDelete");
            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.
        PLTDevsArray ids = ; // PLTDevsArray | The PLT devices to detach.
        try {
            Instance result = apiInstance.instancesInstanceIdPltdevsDelete(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsDelete");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
PLTDevsArray *ids = ; // The PLT devices to detach.

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

// Detach PLT devices from the instance.
[apiInstance instancesInstanceIdPltdevsDeleteWith: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 = ; // {PLTDevsArray} The PLT devices to detach.


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

namespace Example
{
    public class instancesInstanceIdPltdevsDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var ids = new PLTDevsArray(); // PLTDevsArray | The PLT devices to detach.

            try
            {
                // Detach PLT devices from the instance.
                Instance result = apiInstance.instancesInstanceIdPltdevsDelete(instanceId, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPltdevsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$ids = ; // PLTDevsArray | The PLT devices to detach.

try {
    $result = $api_instance->instancesInstanceIdPltdevsDelete($instanceId, $ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdPltdevsDelete: ', $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::PLTDevsArray->new(); # PLTDevsArray | The PLT devices to detach.

eval { 
    my $result = $api_instance->instancesInstanceIdPltdevsDelete(instanceId => $instanceId, ids => $ids);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdPltdevsDelete: $@\n";
}
from __future__ import print_statement
import time
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 =  # PLTDevsArray | The PLT devices to detach.

try: 
    # Detach PLT devices from the instance.
    api_response = api_instance.instances_instance_id_pltdevs_delete(instanceId, ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPltdevsDelete: %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 exist.

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

instancesInstanceIdPltdevsGet

Return the list of PLT devices either attached or available and compatible to be attached to the instance.

Return the list of PLT 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}/pltdevs

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances/{instance_id}/pltdevs?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/PLT devices
        try {
            array[PLTDev] result = apiInstance.instancesInstanceIdPltdevsGet(instanceId, getUnassignedCompatible);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsGet");
            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/PLT devices
        try {
            array[PLTDev] result = apiInstance.instancesInstanceIdPltdevsGet(instanceId, getUnassignedCompatible);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Boolean *getUnassignedCompatible = true; // Available and compatible PCI/PLT devices (optional)

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

// Return the list of PLT devices either attached or available and compatible to be attached to the instance.
[apiInstance instancesInstanceIdPltdevsGetWith:instanceId
    getUnassignedCompatible:getUnassignedCompatible
              completionHandler: ^(array[PLTDev] 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/PLT devices
};

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

namespace Example
{
    public class instancesInstanceIdPltdevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var getUnassignedCompatible = true;  // Boolean | Available and compatible PCI/PLT devices (optional) 

            try
            {
                // Return the list of PLT devices either attached or available and compatible to be attached to the instance.
                array[PLTDev] result = apiInstance.instancesInstanceIdPltdevsGet(instanceId, getUnassignedCompatible);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPltdevsGet: " + 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/PLT devices

try {
    $result = $api_instance->instancesInstanceIdPltdevsGet($instanceId, $getUnassignedCompatible);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdPltdevsGet: ', $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/PLT devices

eval { 
    my $result = $api_instance->instancesInstanceIdPltdevsGet(instanceId => $instanceId, getUnassignedCompatible => $getUnassignedCompatible);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdPltdevsGet: $@\n";
}
from __future__ import print_statement
import time
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/PLT devices (optional)

try: 
    # Return the list of PLT devices either attached or available and compatible to be attached to the instance.
    api_response = api_instance.instances_instance_id_pltdevs_get(instanceId, getUnassignedCompatible=getUnassignedCompatible)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPltdevsGet: %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/PLT devices

Responses

Status: 200 - A list of PLT devices.

Status: 404 - The resource does not exist.

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

instancesInstanceIdPltdevsPost

Attach PLT devices to the instance.

The following scenarios will result in a *failed* response * The instance does not exist (404) * The PLT device does not exist (422) * A PLT device is reserved (422) * The instance is not in SHUTOFF state (500)


/instances/{instance_id}/pltdevs

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/instances/{instance_id}/pltdevs"
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.
        PLTDevsArray ids = ; // PLTDevsArray | The PLT devices to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdPltdevsPost(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsPost");
            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.
        PLTDevsArray ids = ; // PLTDevsArray | The PLT devices to attach.
        try {
            Instance result = apiInstance.instancesInstanceIdPltdevsPost(instanceId, ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdPltdevsPost");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
PLTDevsArray *ids = ; // The PLT devices to attach.

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

// Attach PLT devices to the instance.
[apiInstance instancesInstanceIdPltdevsPostWith: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 = ; // {PLTDevsArray} The PLT devices to attach.


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

namespace Example
{
    public class instancesInstanceIdPltdevsPostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var ids = new PLTDevsArray(); // PLTDevsArray | The PLT devices to attach.

            try
            {
                // Attach PLT devices to the instance.
                Instance result = apiInstance.instancesInstanceIdPltdevsPost(instanceId, ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdPltdevsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$ids = ; // PLTDevsArray | The PLT devices to attach.

try {
    $result = $api_instance->instancesInstanceIdPltdevsPost($instanceId, $ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdPltdevsPost: ', $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::PLTDevsArray->new(); # PLTDevsArray | The PLT devices to attach.

eval { 
    my $result = $api_instance->instancesInstanceIdPltdevsPost(instanceId => $instanceId, ids => $ids);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdPltdevsPost: $@\n";
}
from __future__ import print_statement
import time
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 =  # PLTDevsArray | The PLT devices to attach.

try: 
    # Attach PLT devices to the instance.
    api_response = api_instance.instances_instance_id_pltdevs_post(instanceId, ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdPltdevsPost: %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 exist.

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

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://docs.sunlight.io/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 exist.

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

instancesInstanceIdResizeDatastoresGet

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 provided attributes. The action will fail on these scenarios: * The instance does not exist. (404) * The provided cores are more than the available cores of instance node. (422) * The provided memory is greater than the available memory. (422) * The provided memory is less than the minimum mem. of instance's image. (422) * The provided disk size is less than the minimum disk size of instance's image. (422) * The provided disk size is less than the disk size of instance. We permit only disk expansion. (422)


/instances/{instance_id}/resize/datastores

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances/{instance_id}/resize/datastores?flavor_id=&vcpus=&memory_mb=&root_disk_gb=&extra_disk_1_gb=&extra_disk_2_gb="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
        Integer vcpus = 56; // Integer | The new cores of the instance.
        Integer memoryMb = 56; // Integer | The new memory of the instance.
        Integer rootDiskGb = 56; // Integer | The root disk size of the instance.
        Integer extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
        Integer extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).
        try {
            inline_response_200_4 result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        Integer flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
        Integer vcpus = 56; // Integer | The new cores of the instance.
        Integer memoryMb = 56; // Integer | The new memory of the instance.
        Integer rootDiskGb = 56; // Integer | The root disk size of the instance.
        Integer extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
        Integer extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).
        try {
            inline_response_200_4 result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdResizeDatastoresGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.
Integer *flavorId = 56; // The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
Integer *vcpus = 56; // The new cores of the instance.
Integer *memoryMb = 56; // The new memory of the instance.
Integer *rootDiskGb = 56; // The root disk size of the instance.
Integer *extraDisk1Gb = 56; // The extra disk 1 size of the instance (optional). (optional)
Integer *extraDisk2Gb = 56; // The extra disk 2 size of the instance (optional). (optional)

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

// Get list of available datastores of instance for new extra disks will be
used on resize.

[apiInstance instancesInstanceIdResizeDatastoresGetWith:instanceId
    flavorId:flavorId
    vcpus:vcpus
    memoryMb:memoryMb
    rootDiskGb:rootDiskGb
    extraDisk1Gb:extraDisk1Gb
    extraDisk2Gb:extraDisk2Gb
              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.InstancesApi()

var instanceId = 56; // {Integer} The instance id.

var flavorId = 56; // {Integer} The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.

var vcpus = 56; // {Integer} The new cores of the instance.

var memoryMb = 56; // {Integer} The new memory of the instance.

var rootDiskGb = 56; // {Integer} The root disk size of the instance.

var opts = { 
  'extraDisk1Gb': 56, // {Integer} The extra disk 1 size of the instance (optional).
  'extraDisk2Gb': 56 // {Integer} The extra disk 2 size of the instance (optional).
};

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

namespace Example
{
    public class instancesInstanceIdResizeDatastoresGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.
            var flavorId = 56;  // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
            var vcpus = 56;  // Integer | The new cores of the instance.
            var memoryMb = 56;  // Integer | The new memory of the instance.
            var rootDiskGb = 56;  // Integer | The root disk size of the instance.
            var extraDisk1Gb = 56;  // Integer | The extra disk 1 size of the instance (optional). (optional) 
            var extraDisk2Gb = 56;  // Integer | The extra disk 2 size of the instance (optional). (optional) 

            try
            {
                // Get list of available datastores of instance for new extra disks will be
used on resize.

                inline_response_200_4 result = apiInstance.instancesInstanceIdResizeDatastoresGet(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb, extraDisk2Gb);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdResizeDatastoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.
$flavorId = 56; // Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
$vcpus = 56; // Integer | The new cores of the instance.
$memoryMb = 56; // Integer | The new memory of the instance.
$rootDiskGb = 56; // Integer | The root disk size of the instance.
$extraDisk1Gb = 56; // Integer | The extra disk 1 size of the instance (optional).
$extraDisk2Gb = 56; // Integer | The extra disk 2 size of the instance (optional).

try {
    $result = $api_instance->instancesInstanceIdResizeDatastoresGet($instanceId, $flavorId, $vcpus, $memoryMb, $rootDiskGb, $extraDisk1Gb, $extraDisk2Gb);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.
my $flavorId = 56; # Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
my $vcpus = 56; # Integer | The new cores of the instance.
my $memoryMb = 56; # Integer | The new memory of the instance.
my $rootDiskGb = 56; # Integer | The root disk size of the instance.
my $extraDisk1Gb = 56; # Integer | The extra disk 1 size of the instance (optional).
my $extraDisk2Gb = 56; # Integer | The extra disk 2 size of the instance (optional).

eval { 
    my $result = $api_instance->instancesInstanceIdResizeDatastoresGet(instanceId => $instanceId, flavorId => $flavorId, vcpus => $vcpus, memoryMb => $memoryMb, rootDiskGb => $rootDiskGb, extraDisk1Gb => $extraDisk1Gb, extraDisk2Gb => $extraDisk2Gb);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.
flavorId = 56 # Integer | The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
vcpus = 56 # Integer | The new cores of the instance.
memoryMb = 56 # Integer | The new memory of the instance.
rootDiskGb = 56 # Integer | The root disk size of the instance.
extraDisk1Gb = 56 # Integer | The extra disk 1 size of the instance (optional). (optional)
extraDisk2Gb = 56 # Integer | The extra disk 2 size of the instance (optional). (optional)

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_get(instanceId, flavorId, vcpus, memoryMb, rootDiskGb, extraDisk1Gb=extraDisk1Gb, extraDisk2Gb=extraDisk2Gb)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdResizeDatastoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required
Query parameters
Name Description
flavor_id*
Integer
The new flavor ID of the instance. If it is empty, then the parameters vcpus, memory_mb, and root_disk_gb must be contained in the query.
Required
vcpus*
Integer
The new cores of the instance.
Required
memory_mb*
Integer
The new memory of the instance.
Required
root_disk_gb*
Integer
The root disk size of the instance.
Required
extra_disk_1_gb
Integer
The extra disk 1 size of the instance (optional).
extra_disk_2_gb
Integer
The extra disk 2 size of the instance (optional).

Responses

Status: 200 - A list of datastores for extra disk 1 and 2.

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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(instanceIdextraDisk1Ds, 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 exist.

{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)


/instances/{instance_id}/resize

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/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.
        NewInstanceResize instance = ; // NewInstanceResize | 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.
        NewInstanceResize instance = ; // NewInstanceResize | 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.
NewInstanceResize *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':  // {NewInstanceResize} 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 NewInstanceResize(); // NewInstanceResize | 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 = ; // NewInstanceResize | 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::NewInstanceResize->new(); # NewInstanceResize | 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 =  # NewInstanceResize | 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 exist.

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

Status: 408 - Request Timeout.

{code=408, message=Shut down this unused connection.}

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

{code=422, message=Validation failed}

Status: 500 - An unexpected error occured.

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

instancesInstanceIdSimConnectionDelete

Deletes a connection between SIM and instance

Delete a connection between SIM and instance. The delete process stops the reverse tunnel and removes the public key from the VM.


/instances/{instance_id}/sim_connection

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/api/instances/{instance_id}/sim_connection"
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.instancesInstanceIdSimConnectionDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdSimConnectionDelete");
            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.instancesInstanceIdSimConnectionDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdSimConnectionDelete");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Deletes a connection between SIM and instance
[apiInstance instancesInstanceIdSimConnectionDeleteWith: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.instancesInstanceIdSimConnectionDelete(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdSimConnectionDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Deletes a connection between SIM and instance
                apiInstance.instancesInstanceIdSimConnectionDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdSimConnectionDelete: " + 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->instancesInstanceIdSimConnectionDelete($instanceId);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdSimConnectionDelete: ', $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->instancesInstanceIdSimConnectionDelete(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdSimConnectionDelete: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Deletes a connection between SIM and instance
    api_instance.instances_instance_id_sim_connection_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdSimConnectionDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 204 - Successfully deleted the connection.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 404 - The resource does not exist.

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

instancesInstanceIdSimConnectionGet

Create a connection between SIM and instance

Create a connection between SIM and instance. The connection is established through a reverse tunnel between two parties and is initiated by the controller.


/instances/{instance_id}/sim_connection

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances/{instance_id}/sim_connection"
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 {
            InstanceSimConnection result = apiInstance.instancesInstanceIdSimConnectionGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdSimConnectionGet");
            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 {
            InstanceSimConnection result = apiInstance.instancesInstanceIdSimConnectionGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdSimConnectionGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Create a connection between SIM and instance
[apiInstance instancesInstanceIdSimConnectionGetWith:instanceId
              completionHandler: ^(InstanceSimConnection 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.instancesInstanceIdSimConnectionGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdSimConnectionGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Create a connection between SIM and instance
                InstanceSimConnection result = apiInstance.instancesInstanceIdSimConnectionGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdSimConnectionGet: " + 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->instancesInstanceIdSimConnectionGet($instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdSimConnectionGet: ', $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->instancesInstanceIdSimConnectionGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdSimConnectionGet: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Create a connection between SIM and instance
    api_response = api_instance.instances_instance_id_sim_connection_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdSimConnectionGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - Successfully established the connection.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 404 - The resource does not exist.

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

instancesInstanceIdUserDataGet

Return the Cloud-Init user-data of the instance.

Return the client provided Cloud-Init user-data of the instance.


/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            UserData result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            UserData result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataGet");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Return the Cloud-Init user-data of the instance.
[apiInstance instancesInstanceIdUserDataGetWith:instanceId
              completionHandler: ^(UserData 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.instancesInstanceIdUserDataGet(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdUserDataGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Return the Cloud-Init user-data of the instance.
                UserData result = apiInstance.instancesInstanceIdUserDataGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdUserDataGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instanceId = 56; // Integer | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Return the Cloud-Init user-data of the instance.
    api_response = api_instance.instances_instance_id_user_data_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdUserDataGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - Cloud-Init user-data.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

instancesInstanceIdUserDataPut

Edit the Cloud-Init user-data of the instance.

Edit the client provided Cloud-Init user-data of the instance.


/instances/{instance_id}/user_data

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/instances/{instance_id}/user_data"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdUserDataPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Integer instanceId = 56; // Integer | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdUserDataPut(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdUserDataPut");
            e.printStackTrace();
        }
    }
}
Integer *instanceId = 56; // The instance id.

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

// Edit the Cloud-Init user-data of the instance.
[apiInstance instancesInstanceIdUserDataPutWith: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.instancesInstanceIdUserDataPut(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class instancesInstanceIdUserDataPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instanceId = 56;  // Integer | The instance id.

            try
            {
                // Edit the Cloud-Init user-data of the instance.
                Instance result = apiInstance.instancesInstanceIdUserDataPut(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdUserDataPut: " + 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->instancesInstanceIdUserDataPut($instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdUserDataPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InstancesApi;

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 56; # Integer | The instance id.

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

# create an instance of the API class
api_instance = swagger_client.InstancesApi()
instanceId = 56 # Integer | The instance id.

try: 
    # Edit the Cloud-Init user-data of the instance.
    api_response = api_instance.instances_instance_id_user_data_put(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdUserDataPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Integer (uint)
The instance id.
Required

Responses

Status: 200 - Successfully applied new user-data to instance.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 401 - Status unauthorized.

{code=401, message=The client provides no credentials or invalid credentials.}

Status: 404 - The resource does not exist.

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

Status: 406 - Status not acceptable request.

{code=406, message=Cannot respond with the accept-header specified in the request.}

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

{code=422, message=Validation failed}

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

Status: 500 - An unexpected error occured.

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

instancesRefreshExternalDhcpIpsPut

Refresh external DHCP IPs.

Call arp-scan, save the IPs in a list, and update the external DHCP IPs of the running instances through the saved list in the virtupian DB.


/instances/refresh_external_dhcp_ips

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/instances/refresh_external_dhcp_ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

// Refresh external DHCP IPs.
[apiInstance instancesRefreshExternalDhcpIpsPutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

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

namespace Example
{
    public class instancesRefreshExternalDhcpIpsPutExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();

            try
            {
                // Refresh external DHCP IPs.
                apiInstance.instancesRefreshExternalDhcpIpsPut();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesRefreshExternalDhcpIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Refresh external DHCP IPs.
    api_instance.instances_refresh_external_dhcp_ips_put()
except ApiException as e:
    print("Exception when calling InstancesApi->instancesRefreshExternalDhcpIpsPut: %s\n" % e)

Parameters

Responses

Status: 202 - The process of refreshing the external DHCP IPs of the running instances is in progress.


instancesSimConnectionsGet

Get all connections between SIM and instances.

Gets a list of all the connections through between the connected SIM and the instances.


/instances_sim_connections

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/instances_sim_connections"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

// Get all connections between SIM and instances.
[apiInstance instancesSimConnectionsGetWithCompletionHandler: 
              ^(InstancesSimConnections output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

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

namespace Example
{
    public class instancesSimConnectionsGetExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();

            try
            {
                // Get all connections between SIM and instances.
                InstancesSimConnections result = apiInstance.instancesSimConnectionsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesSimConnectionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get all connections between SIM and instances.
    api_response = api_instance.instances_sim_connections_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesSimConnectionsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Details per instance connection.

Status: 500 - An unexpected error occured.

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

instancesSimConnectionsPost

Create connections between SIM and instances.

Creates connections asynchronously through reverse tunnels between the connected SIM and the requested instances.


/instances_sim_connections

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/instances_sim_connections"
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();
        CreateInstancesSimConnections instancesSimConnections = ; // CreateInstancesSimConnections | The instances' connection details.
        try {
            apiInstance.instancesSimConnectionsPost(instancesSimConnections);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesSimConnectionsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        CreateInstancesSimConnections instancesSimConnections = ; // CreateInstancesSimConnections | The instances' connection details.
        try {
            apiInstance.instancesSimConnectionsPost(instancesSimConnections);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesSimConnectionsPost");
            e.printStackTrace();
        }
    }
}
CreateInstancesSimConnections *instancesSimConnections = ; // The instances' connection details. (optional)

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

// Create connections between SIM and instances.
[apiInstance instancesSimConnectionsPostWith:instancesSimConnections
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.InstancesApi()

var opts = { 
  'instancesSimConnections':  // {CreateInstancesSimConnections} The instances' connection details.
};

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

namespace Example
{
    public class instancesSimConnectionsPostExample
    {
        public void main()
        {
            
            var apiInstance = new InstancesApi();
            var instancesSimConnections = new CreateInstancesSimConnections(); // CreateInstancesSimConnections | The instances' connection details. (optional) 

            try
            {
                // Create connections between SIM and instances.
                apiInstance.instancesSimConnectionsPost(instancesSimConnections);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesSimConnectionsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InstancesApi();
$instancesSimConnections = ; // CreateInstancesSimConnections | The instances' connection details.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instancesSimConnections = WWW::SwaggerClient::Object::CreateInstancesSimConnections->new(); # CreateInstancesSimConnections | The instances' connection details.

eval { 
    $api_instance->instancesSimConnectionsPost(instancesSimConnections => $instancesSimConnections);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesSimConnectionsPost: $@\n";
}
from __future__ import print_statement
import time
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()
instancesSimConnections =  # CreateInstancesSimConnections | The instances' connection details. (optional)

try: 
    # Create connections between SIM and instances.
    api_instance.instances_sim_connections_post(instancesSimConnections=instancesSimConnections)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesSimConnectionsPost: %s\n" % e)

Parameters

Body parameters
Name Description
instancesSimConnections

Responses

Status: 204 - Instance connection will be created asynchronously.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 409 - Status conflict.

{code=409, message=Indicate a request conflict with the current state of the target resource.}

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

{code=422, message=Validation failed}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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}

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://docs.sunlight.io/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://docs.sunlight.io/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_6 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_6 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_6 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_6 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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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.

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 instances.

[{name=yesenia.name.small-instance, id=27, domain_name=dny3NkG1faI8, node=74265909, resource_group_id=1, state=SHUTOFF, progress=instance_active, owner=Leonora_Goldner, flavor_id=1, root_disk_gb=3, memory_mb=384, vcpus=1, extra_disk_1_gb=0, extra_disk_2_gb=0, disk_format=qcow2, min_ram_gb=0, min_disk_gb=1, os_distro=Linux, os_version=16.04, architecture=x64, has_cloudinit=true, vm_type=pv, image={id=1, name=Ubuntu 16.04 x64, filename=xenial-server-cloudimg-amd64-disk1-hvm.qcow2, virtual_size=0, status=enabled, min_ram=0, min_disk=1, os_distro=Linux, provider=sunlight.io, location=local, os_version=16.04, architecture=x64}}]

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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, is_storage_latency_optimized=true, 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 exist.

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

NetworkKeys

networkKeysGet

Get the cluster's netowrk keys.


/network_keys

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/network_keys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworkKeysApi;

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

public class NetworkKeysApiExample {

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

public class NetworkKeysApiExample {

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

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

// Get the cluster's netowrk keys.
[apiInstance networkKeysGetWithCompletionHandler: 
              ^(NetworkKeys output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.NetworkKeysApi()

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

namespace Example
{
    public class networkKeysGetExample
    {
        public void main()
        {
            
            var apiInstance = new NetworkKeysApi();

            try
            {
                // Get the cluster's netowrk keys.
                NetworkKeys result = apiInstance.networkKeysGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworkKeysApi.networkKeysGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get the cluster's netowrk keys.
    api_response = api_instance.network_keys_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworkKeysApi->networkKeysGet: %s\n" % e)

Parameters

Responses

Status: 200 - Got the network keys.

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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

Status: 409 - Status conflict.

{code=409, message=Indicate a request conflict with the current state of the target resource.}

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

{code=422, message=Validation failed}

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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}

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://docs.sunlight.io/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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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_foprimary', activate failover primary for a specific secondary node. * 'deactivate_foprimary', deactivate failover primary for a specific secondary 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 failover primary functionality is already activated on the current node. (422) * We don't allow more than one failover primary nodes on the system. (422) * The requirements for the failover primary functionality are not valid. (422) * No failover primary node found on the system to deactivate. (422) * The (de)activation of automate failover primary failed. (500)


/nodes/{node_id}/action

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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 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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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: 202 - Request for Node Removal is accepted and currently processing.

Status: 404 - The resource does not exist.

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

Status: 428 - A precondition is required to proceed.

{code=428, message=Remove Fault Tolerance from Resource Groups: 10, in order to proceed with the request.}

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

nodesNodeIdInitialisePost

The node will be initialised.

A successful response will add all node's available disks to the DS and cores to RG. In order this call to be succesful only one DS and RG should be exist and all cluster's assets to be part of this DS/RG.


/nodes/{node_id}/initialise

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/nodes/{node_id}/initialise"
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.nodesNodeIdInitialisePost(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdInitialisePost");
            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.nodesNodeIdInitialisePost(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdInitialisePost");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

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

// The node will be initialised.
[apiInstance nodesNodeIdInitialisePostWith: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.nodesNodeIdInitialisePost(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdInitialisePostExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // The node will be initialised.
                apiInstance.nodesNodeIdInitialisePost(nodeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdInitialisePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $api_instance->nodesNodeIdInitialisePost($nodeId);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdInitialisePost: ', $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->nodesNodeIdInitialisePost(nodeId => $nodeId);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdInitialisePost: $@\n";
}
from __future__ import print_statement
import time
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: 
    # The node will be initialised.
    api_instance.nodes_node_id_initialise_post(nodeId)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdInitialisePost: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 204 - Node's assets succesfully initialised.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

nodesNodeIdIsolateToClusterPost

The node will be isolated.

A successful response will remove node from cluster. A new cluster will random key and channel ID will created. Only secondary nodes can be isolated.


/nodes/{node_id}/isolate_to_cluster

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/api/nodes/{node_id}/isolate_to_cluster"
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.
        ControllerNetConfiguration flavor = ; // ControllerNetConfiguration | Controller new network configuration.
        try {
            apiInstance.nodesNodeIdIsolateToClusterPost(nodeId, flavor);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdIsolateToClusterPost");
            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.
        ControllerNetConfiguration flavor = ; // ControllerNetConfiguration | Controller new network configuration.
        try {
            apiInstance.nodesNodeIdIsolateToClusterPost(nodeId, flavor);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdIsolateToClusterPost");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.
ControllerNetConfiguration *flavor = ; // Controller new network configuration. (optional)

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

// The node will be isolated.
[apiInstance nodesNodeIdIsolateToClusterPostWith:nodeId
    flavor:flavor
              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 = { 
  'flavor':  // {ControllerNetConfiguration} Controller new network configuration.
};

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

namespace Example
{
    public class nodesNodeIdIsolateToClusterPostExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.
            var flavor = new ControllerNetConfiguration(); // ControllerNetConfiguration | Controller new network configuration. (optional) 

            try
            {
                // The node will be isolated.
                apiInstance.nodesNodeIdIsolateToClusterPost(nodeId, flavor);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdIsolateToClusterPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.
$flavor = ; // ControllerNetConfiguration | Controller new network configuration.

try {
    $api_instance->nodesNodeIdIsolateToClusterPost($nodeId, $flavor);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdIsolateToClusterPost: ', $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 $flavor = WWW::SwaggerClient::Object::ControllerNetConfiguration->new(); # ControllerNetConfiguration | Controller new network configuration.

eval { 
    $api_instance->nodesNodeIdIsolateToClusterPost(nodeId => $nodeId, flavor => $flavor);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdIsolateToClusterPost: $@\n";
}
from __future__ import print_statement
import time
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.
flavor =  # ControllerNetConfiguration | Controller new network configuration. (optional)

try: 
    # The node will be isolated.
    api_instance.nodes_node_id_isolate_to_cluster_post(nodeId, flavor=flavor)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdIsolateToClusterPost: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required
Body parameters
Name Description
flavor

Responses

Status: 200 - Node is removed from cluster. A new cluster is created using this single node.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

{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://docs.sunlight.io/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 exist.

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

nodesNodeIdValidateRemovalGet

Validate if node removal is possible.

Validate if node removal is possible and under what circumstances (Removal of Fault Tolerance and/or Replication)


/nodes/{node_id}/validate_removal

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/nodes/{node_id}/validate_removal"
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.nodesNodeIdValidateRemovalGet(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdValidateRemovalGet");
            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.nodesNodeIdValidateRemovalGet(nodeId);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodesNodeIdValidateRemovalGet");
            e.printStackTrace();
        }
    }
}
UUID *nodeId = ; // The node id.

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

// Validate if node removal is possible.
[apiInstance nodesNodeIdValidateRemovalGetWith: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.nodesNodeIdValidateRemovalGet(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodesNodeIdValidateRemovalGetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = new UUID(); // UUID | The node id.

            try
            {
                // Validate if node removal is possible.
                apiInstance.nodesNodeIdValidateRemovalGet(nodeId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodesNodeIdValidateRemovalGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = ; // UUID | The node id.

try {
    $api_instance->nodesNodeIdValidateRemovalGet($nodeId);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodesNodeIdValidateRemovalGet: ', $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->nodesNodeIdValidateRemovalGet(nodeId => $nodeId);
};
if ($@) {
    warn "Exception when calling NodesApi->nodesNodeIdValidateRemovalGet: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Validate if node removal is possible.
    api_instance.nodes_node_id_validate_removal_get(nodeId)
except ApiException as e:
    print("Exception when calling NodesApi->nodesNodeIdValidateRemovalGet: %s\n" % e)

Parameters

Path parameters
Name Description
node_id*
UUID (uuid)
The node id.
Required

Responses

Status: 200 - Successful, Node removal is possible without any changes in FT & Replication.

Status: 404 - The resource does not exist.

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

Status: 428 - A precondition is required to proceed.

{code=428, message=Remove Fault Tolerance from Resource Groups: 10, in order to proceed with the request.}

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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

Pltdevs

pltdevsGet

Get all PLT devices.


/pltdevs

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/pltdevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PltdevsApi;

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

public class PltdevsApiExample {

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

public class PltdevsApiExample {

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

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

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

var api = new SunlightDashboard.PltdevsApi()

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

namespace Example
{
    public class pltdevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new PltdevsApi();

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

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

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

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

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

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

try: 
    # Get all PLT devices.
    api_response = api_instance.pltdevs_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PltdevsApi->pltdevsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of PLT devices.

Status: 500 - An unexpected error occured.

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

pltdevsGpusGet

Get all GPUs from PLT devices.


/pltdevs/gpus

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/pltdevs/gpus"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PltdevsApi;

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

public class PltdevsApiExample {

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

public class PltdevsApiExample {

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

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

// Get all GPUs from PLT devices.
[apiInstance pltdevsGpusGetWithCompletionHandler: 
              ^(array[PLTDev] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PltdevsApi()

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

namespace Example
{
    public class pltdevsGpusGetExample
    {
        public void main()
        {
            
            var apiInstance = new PltdevsApi();

            try
            {
                // Get all GPUs from PLT devices.
                array[PLTDev] result = apiInstance.pltdevsGpusGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PltdevsApi.pltdevsGpusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get all GPUs from PLT devices.
    api_response = api_instance.pltdevs_gpus_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PltdevsApi->pltdevsGpusGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of PLT devices.

Status: 500 - An unexpected error occured.

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

pltdevsPltdevIdGet

Get specific PLT device info based on the given id.


/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PltdevsApi;

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

public class PltdevsApiExample {

    public static void main(String[] args) {
        
        PltdevsApi apiInstance = new PltdevsApi();
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            PLTDev result = apiInstance.pltdevsPltdevIdGet(pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PltdevsApi#pltdevsPltdevIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PltdevsApi;

public class PltdevsApiExample {

    public static void main(String[] args) {
        PltdevsApi apiInstance = new PltdevsApi();
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            PLTDev result = apiInstance.pltdevsPltdevIdGet(pltdevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PltdevsApi#pltdevsPltdevIdGet");
            e.printStackTrace();
        }
    }
}
Long *pltdevId = 789; // The PLT device id.

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

// Get specific PLT device info based on the given id.
[apiInstance pltdevsPltdevIdGetWith:pltdevId
              completionHandler: ^(PLTDev output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var SunlightDashboard = require('sunlight_dashboard');

var api = new SunlightDashboard.PltdevsApi()

var pltdevId = 789; // {Long} The PLT device id.


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

namespace Example
{
    public class pltdevsPltdevIdGetExample
    {
        public void main()
        {
            
            var apiInstance = new PltdevsApi();
            var pltdevId = 789;  // Long | The PLT device id.

            try
            {
                // Get specific PLT device info based on the given id.
                PLTDev result = apiInstance.pltdevsPltdevIdGet(pltdevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PltdevsApi.pltdevsPltdevIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PltdevsApi();
$pltdevId = 789; // Long | The PLT device id.

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

my $api_instance = WWW::SwaggerClient::PltdevsApi->new();
my $pltdevId = 789; # Long | The PLT device id.

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

# create an instance of the API class
api_instance = swagger_client.PltdevsApi()
pltdevId = 789 # Long | The PLT device id.

try: 
    # Get specific PLT device info based on the given id.
    api_response = api_instance.pltdevs_pltdev_id_get(pltdevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PltdevsApi->pltdevsPltdevIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
pltdev_id*
Long (int64)
The PLT device id.
Required

Responses

Status: 200 - A PLT device.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

Status: 500 - An unexpected error occured.

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

ResourceGroups

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://docs.sunlight.io/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}

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

Status: 500 - An unexpected error occured.

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

resourceGroupsResourceGroupIdPltdevsGet

Get all PLT devices from the given resource group.


/resource_groups/{resource_group_id}/pltdevs

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/api/resource_groups/{resource_group_id}/pltdevs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        try {
            array[PLTDev] result = apiInstance.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

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

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

// Get all PLT devices from the given resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsGetWith:resourceGroupId
              completionHandler: ^(array[PLTDev] 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.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId, , callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsGetExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.

            try
            {
                // Get all PLT devices from the given resource group.
                array[PLTDev] result = apiInstance.resourceGroupsResourceGroupIdPltdevsGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.

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

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.

try: 
    # Get all PLT devices from the given resource group.
    api_response = api_instance.resource_groups_resource_group_id_pltdevs_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required

Responses

Status: 200 - A list of PLT devices.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 500 - An unexpected error occured.

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

resourceGroupsResourceGroupIdPltdevsPltdevIdDelete

Remove a PLT device from a resource group.


/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X DELETE "http://docs.sunlight.io/api/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Long *pltdevId = 789; // The PLT device id.

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

// Remove a PLT device from a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsPltdevIdDeleteWith:resourceGroupId
    pltdevId:pltdevId
              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 pltdevId = 789; // {Long} The PLT device id.


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

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsPltdevIdDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var pltdevId = 789;  // Long | The PLT device id.

            try
            {
                // Remove a PLT device from a resource group.
                apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete(resourceGroupId, pltdevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$pltdevId = 789; // Long | The PLT device id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $pltdevId = 789; # Long | The PLT device id.

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

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
pltdevId = 789 # Long | The PLT device id.

try: 
    # Remove a PLT device from a resource group.
    api_instance.resource_groups_resource_group_id_pltdevs_pltdev_id_delete(resourceGroupId, pltdevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
pltdev_id*
Long (int64)
The PLT device id.
Required

Responses

Status: 204 - PLT device successfully removed from the resource group.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

Status: 500 - An unexpected error occured.

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

resourceGroupsResourceGroupIdPltdevsPltdevIdPut

Add a PLT device to a resource group.


/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/resource_groups/{resource_group_id}/pltdevs/{pltdev_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Integer resourceGroupId = 56; // Integer | The resource group id.
        Long pltdevId = 789; // Long | The PLT device id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPltdevsPltdevIdPut");
            e.printStackTrace();
        }
    }
}
Integer *resourceGroupId = 56; // The resource group id.
Long *pltdevId = 789; // The PLT device id.

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

// Add a PLT device to a resource group.
[apiInstance resourceGroupsResourceGroupIdPltdevsPltdevIdPutWith:resourceGroupId
    pltdevId:pltdevId
              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 pltdevId = 789; // {Long} The PLT device id.


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

namespace Example
{
    public class resourceGroupsResourceGroupIdPltdevsPltdevIdPutExample
    {
        public void main()
        {
            
            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 56;  // Integer | The resource group id.
            var pltdevId = 789;  // Long | The PLT device id.

            try
            {
                // Add a PLT device to a resource group.
                apiInstance.resourceGroupsResourceGroupIdPltdevsPltdevIdPut(resourceGroupId, pltdevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPltdevsPltdevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ResourceGroupsApi();
$resourceGroupId = 56; // Integer | The resource group id.
$pltdevId = 789; // Long | The PLT device id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 56; # Integer | The resource group id.
my $pltdevId = 789; # Long | The PLT device id.

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

# create an instance of the API class
api_instance = swagger_client.ResourceGroupsApi()
resourceGroupId = 56 # Integer | The resource group id.
pltdevId = 789 # Long | The PLT device id.

try: 
    # Add a PLT device to a resource group.
    api_instance.resource_groups_resource_group_id_pltdevs_pltdev_id_put(resourceGroupId, pltdevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPltdevsPltdevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Integer (uint)
The resource group id.
Required
pltdev_id*
Long (int64)
The PLT device id.
Required

Responses

Status: 204 - PLT device successfully added to the resource group.

Status: 400 - Status bad request.

{code=400, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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}

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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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}

Status: 409 - Status conflict.

{code=409, message=Indicate a request conflict with the current state of the target resource.}

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://docs.sunlight.io/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_5 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_5 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_5 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_5 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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 409 - Status conflict.

{code=409, message=Indicate a request conflict with the current state of the target resource.}

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

{code=422, message=Validation failed}

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://docs.sunlight.io/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[StorageProviderTemplate] 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[StorageProviderTemplate] 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[StorageProviderTemplate] 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[StorageProviderTemplate] 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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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}

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://docs.sunlight.io/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}

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://docs.sunlight.io/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_7 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_7 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_7 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_7 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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 404 - The resource does not exist.

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

logoutPost

Logout the user.


/logout

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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, message=The client provides no credentials or invalid credentials.}

Status: 403 - Status forbidden.

{code=403, message=Refuse to authorize it.}

Status: 404 - The resource does not exist.

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

refreshPost

Reload the backend states.


/refresh

Usage and SDK Samples

curl -X POST "http://docs.sunlight.io/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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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://docs.sunlight.io/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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

Status: 404 - The resource does not exist.

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

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://docs.sunlight.io/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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

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

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://docs.sunlight.io/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 exist.

{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://docs.sunlight.io/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 exist.

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

vdisksVdiskIdMovePut

Move the virtual disk from the source to the destination member.

A virtual disk is created in a new location and it is synced with the source virtual disk. if sync completed, the old virtual disk is deleted. The following scenarios will result in a *failed* response: * The virtual disk does not exists (404) * The instance of the virtual disk is not in shut-off state (422) * The destination member does not have available space (422) * The move procedure of the virtual disk failed (500)


/vdisks/{vdisk_id}/move

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/vdisks/{vdisk_id}/move"
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.
        MoveVDisk moveVDisk = ; // MoveVDisk | The parameters of the virtual disk move.
        try {
            apiInstance.vdisksVdiskIdMovePut(vdiskId, moveVDisk);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdMovePut");
            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.
        MoveVDisk moveVDisk = ; // MoveVDisk | The parameters of the virtual disk move.
        try {
            apiInstance.vdisksVdiskIdMovePut(vdiskId, moveVDisk);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdMovePut");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.
MoveVDisk *moveVDisk = ; // The parameters of the virtual disk move. (optional)

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

// Move the virtual disk from the source to the destination member.
[apiInstance vdisksVdiskIdMovePutWith:vdiskId
    moveVDisk:moveVDisk
              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 opts = { 
  'moveVDisk':  // {MoveVDisk} The parameters of the virtual disk move.
};

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

namespace Example
{
    public class vdisksVdiskIdMovePutExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.
            var moveVDisk = new MoveVDisk(); // MoveVDisk | The parameters of the virtual disk move. (optional) 

            try
            {
                // Move the virtual disk from the source to the destination member.
                apiInstance.vdisksVdiskIdMovePut(vdiskId, moveVDisk);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksVdiskIdMovePut: " + 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.
$moveVDisk = ; // MoveVDisk | The parameters of the virtual disk move.

try {
    $api_instance->vdisksVdiskIdMovePut($vdiskId, $moveVDisk);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksVdiskIdMovePut: ', $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 $moveVDisk = WWW::SwaggerClient::Object::MoveVDisk->new(); # MoveVDisk | The parameters of the virtual disk move.

eval { 
    $api_instance->vdisksVdiskIdMovePut(vdiskId => $vdiskId, moveVDisk => $moveVDisk);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksVdiskIdMovePut: $@\n";
}
from __future__ import print_statement
import time
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.
moveVDisk =  # MoveVDisk | The parameters of the virtual disk move. (optional)

try: 
    # Move the virtual disk from the source to the destination member.
    api_instance.vdisks_vdisk_id_move_put(vdiskId, moveVDisk=moveVDisk)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksVdiskIdMovePut: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required
Body parameters
Name Description
moveVDisk

Responses

Status: 202 - Virtual disk started moving to the requested member.

Status: 404 - The resource does not exist.

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

Status: 500 - An unexpected error occured.

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

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://docs.sunlight.io/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, message=Cannot process the request due to something that is perceived to be a client error.
}

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

{code=422, message=Validation failed}

vdisksVdiskIdResizeAmphoraPut

Resize the Amphora virtual disk.


/vdisks/{vdisk_id}/resize_amphora

Usage and SDK Samples

curl -X PUT "http://docs.sunlight.io/api/vdisks/{vdisk_id}/resize_amphora"
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.vdisksVdiskIdResizeAmphoraPut(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdResizeAmphoraPut");
            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.vdisksVdiskIdResizeAmphoraPut(vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#vdisksVdiskIdResizeAmphoraPut");
            e.printStackTrace();
        }
    }
}
Integer *vdiskId = 56; // The id of the virtual disk.

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

// Resize the Amphora virtual disk.
[apiInstance vdisksVdiskIdResizeAmphoraPutWith: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.vdisksVdiskIdResizeAmphoraPut(vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class vdisksVdiskIdResizeAmphoraPutExample
    {
        public void main()
        {
            
            var apiInstance = new VdisksApi();
            var vdiskId = 56;  // Integer | The id of the virtual disk.

            try
            {
                // Resize the Amphora virtual disk.
                apiInstance.vdisksVdiskIdResizeAmphoraPut(vdiskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.vdisksVdiskIdResizeAmphoraPut: " + 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->vdisksVdiskIdResizeAmphoraPut($vdiskId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->vdisksVdiskIdResizeAmphoraPut: ', $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->vdisksVdiskIdResizeAmphoraPut(vdiskId => $vdiskId);
};
if ($@) {
    warn "Exception when calling VdisksApi->vdisksVdiskIdResizeAmphoraPut: $@\n";
}
from __future__ import print_statement
import time
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: 
    # Resize the Amphora virtual disk.
    api_instance.vdisks_vdisk_id_resize_amphora_put(vdiskId)
except ApiException as e:
    print("Exception when calling VdisksApi->vdisksVdiskIdResizeAmphoraPut: %s\n" % e)

Parameters

Path parameters
Name Description
vdisk_id*
Integer (uint)
The id of the virtual disk.
Required

Responses

Status: 200 - Successfully resized the Amphora virtual disk.

Status: 404 - The resource does not exist.

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

Status: 500 - An unexpected error occured.

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

Version

manifestGet

Get api version information.


/manifest

Usage and SDK Samples

curl -X GET "http://docs.sunlight.io/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.}