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

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.