OPERATIONAL TOOLS

InstanceResource

createInstance

Create an instance

If id is not provided, it will be randomly generated


/instances/create

Usage and SDK Samples

curl -X PUT -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/instances/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstanceResourceApi;

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

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        InstanceResourceApi apiInstance = new InstanceResourceApi();
        Instance body = ; // Instance | Instance description
        try {
            Instance result = apiInstance.createInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#createInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceResourceApi;

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        InstanceResourceApi apiInstance = new InstanceResourceApi();
        Instance body = ; // Instance | Instance description
        try {
            Instance result = apiInstance.createInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#createInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Instance *body = ; // Instance description

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

// Create an instance
[apiInstance createInstanceWith:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.InstanceResourceApi()

var body = ; // {Instance} Instance description


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

namespace Example
{
    public class createInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new InstanceResourceApi();
            var body = new Instance(); // Instance | Instance description

            try
            {
                // Create an instance
                Instance result = apiInstance.createInstance(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceResourceApi.createInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\InstanceResourceApi();
$body = ; // Instance | Instance description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InstanceResourceApi->new();
my $body = WWW::SwaggerClient::Object::Instance->new(); # Instance | Instance description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstanceResourceApi()
body =  # Instance | Instance description

try: 
    # Create an instance
    api_response = api_instance.create_instance(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceResourceApi->createInstance: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Instance already exists

Status: 500 - Internal error


deleteInstance

Delete an instance


/instances/delete/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/instances/delete/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstanceResourceApi;

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

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String id = id_example; // String | ID of instance
        try {
            apiInstance.deleteInstance(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#deleteInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceResourceApi;

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String id = id_example; // String | ID of instance
        try {
            apiInstance.deleteInstance(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#deleteInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // ID of instance

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

// Delete an instance
[apiInstance deleteInstanceWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.InstanceResourceApi()

var id = id_example; // {String} ID of instance


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

namespace Example
{
    public class deleteInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new InstanceResourceApi();
            var id = id_example;  // String | ID of instance

            try
            {
                // Delete an instance
                apiInstance.deleteInstance(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceResourceApi.deleteInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\InstanceResourceApi();
$id = id_example; // String | ID of instance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InstanceResourceApi->new();
my $id = id_example; # String | ID of instance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstanceResourceApi()
id = id_example # String | ID of instance

try: 
    # Delete an instance
    api_instance.delete_instance(id)
except ApiException as e:
    print("Exception when calling InstanceResourceApi->deleteInstance: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
ID of instance
Required

Responses

Status: 400 - Instance not found

Status: 500 - Internal error


getInstance

Get an instance by id


/instances/get/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/instances/get/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstanceResourceApi;

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

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String id = id_example; // String | instance
        try {
            Instance result = apiInstance.getInstance(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#getInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceResourceApi;

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String id = id_example; // String | instance
        try {
            Instance result = apiInstance.getInstance(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#getInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // instance

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

// Get an instance by id
[apiInstance getInstanceWith:id
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.InstanceResourceApi()

var id = id_example; // {String} instance


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

namespace Example
{
    public class getInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new InstanceResourceApi();
            var id = id_example;  // String | instance

            try
            {
                // Get an instance by id
                Instance result = apiInstance.getInstance(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceResourceApi.getInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\InstanceResourceApi();
$id = id_example; // String | instance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InstanceResourceApi->new();
my $id = id_example; # String | instance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstanceResourceApi()
id = id_example # String | instance

try: 
    # Get an instance by id
    api_response = api_instance.get_instance(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceResourceApi->getInstance: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
instance
Required

Responses

Status: 200 - successful operation

Status: 400 - Instance not found

Status: 500 - Internal error


listInstances

List all instances


/instances/list

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/instances/list?idRef=&user=&status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstanceResourceApi;

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

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String idRef = idRef_example; // String | idRef
        String user = user_example; // String | user
        String status = status_example; // String | status
        try {
            array[Instance] result = apiInstance.listInstances(idRef, user, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#listInstances");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceResourceApi;

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        InstanceResourceApi apiInstance = new InstanceResourceApi();
        String idRef = idRef_example; // String | idRef
        String user = user_example; // String | user
        String status = status_example; // String | status
        try {
            array[Instance] result = apiInstance.listInstances(idRef, user, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#listInstances");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *idRef = idRef_example; // idRef (optional)
String *user = user_example; // user (optional)
String *status = status_example; // status (optional)

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

// List all instances
[apiInstance listInstancesWith:idRef
    user:user
    status:status
              completionHandler: ^(array[Instance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.InstanceResourceApi()

var opts = { 
  'idRef': idRef_example, // {String} idRef
  'user': user_example, // {String} user
  'status': status_example // {String} status
};

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

namespace Example
{
    public class listInstancesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new InstanceResourceApi();
            var idRef = idRef_example;  // String | idRef (optional) 
            var user = user_example;  // String | user (optional) 
            var status = status_example;  // String | status (optional) 

            try
            {
                // List all instances
                array[Instance] result = apiInstance.listInstances(idRef, user, status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceResourceApi.listInstances: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\InstanceResourceApi();
$idRef = idRef_example; // String | idRef
$user = user_example; // String | user
$status = status_example; // String | status

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InstanceResourceApi->new();
my $idRef = idRef_example; # String | idRef
my $user = user_example; # String | user
my $status = status_example; # String | status

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstanceResourceApi()
idRef = idRef_example # String | idRef (optional)
user = user_example # String | user (optional)
status = status_example # String | status (optional)

try: 
    # List all instances
    api_response = api_instance.list_instances(idRef=idRef, user=user, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceResourceApi->listInstances: %s\n" % e)

Parameters

Query parameters
Name Description
idRef
String
idRef
user
String
user
status
String
status

Responses

Status: 200 - successful operation

Status: 500 - Internal error


updateInstance

Update an instance


/instances/update

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/instances/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstanceResourceApi;

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

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        InstanceResourceApi apiInstance = new InstanceResourceApi();
        Instance body = ; // Instance | Instance description
        try {
            Instance result = apiInstance.updateInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#updateInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceResourceApi;

public class InstanceResourceApiExample {

    public static void main(String[] args) {
        InstanceResourceApi apiInstance = new InstanceResourceApi();
        Instance body = ; // Instance | Instance description
        try {
            Instance result = apiInstance.updateInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceResourceApi#updateInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Instance *body = ; // Instance description

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

// Update an instance
[apiInstance updateInstanceWith:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.InstanceResourceApi()

var body = ; // {Instance} Instance description


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

namespace Example
{
    public class updateInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new InstanceResourceApi();
            var body = new Instance(); // Instance | Instance description

            try
            {
                // Update an instance
                Instance result = apiInstance.updateInstance(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceResourceApi.updateInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\InstanceResourceApi();
$body = ; // Instance | Instance description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::InstanceResourceApi->new();
my $body = WWW::SwaggerClient::Object::Instance->new(); # Instance | Instance description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstanceResourceApi()
body =  # Instance | Instance description

try: 
    # Update an instance
    api_response = api_instance.update_instance(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceResourceApi->updateInstance: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Instance not found

Status: 500 - Internal error


KPIResource

createKPI

Create a KPI

If id is not provided, it will be randomly generated


/kpis/create

Usage and SDK Samples

curl -X PUT -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        KPI body = ; // KPI | KPI description
        try {
            KPI result = apiInstance.createKPI(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#createKPI");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        KPI body = ; // KPI | KPI description
        try {
            KPI result = apiInstance.createKPI(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#createKPI");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

KPI *body = ; // KPI description

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

// Create a KPI
[apiInstance createKPIWith:body
              completionHandler: ^(KPI output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var body = ; // {KPI} KPI description


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

namespace Example
{
    public class createKPIExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var body = new KPI(); // KPI | KPI description

            try
            {
                // Create a KPI
                KPI result = apiInstance.createKPI(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.createKPI: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$body = ; // KPI | KPI description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $body = WWW::SwaggerClient::Object::KPI->new(); # KPI | KPI description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
body =  # KPI | KPI description

try: 
    # Create a KPI
    api_response = api_instance.create_kpi(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->createKPI: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - KPI already exists

Status: 500 - Internal error


deleteKPI

Delete a kpi


/kpis/delete/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/delete/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | ID of KPI
        try {
            apiInstance.deleteKPI(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#deleteKPI");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | ID of KPI
        try {
            apiInstance.deleteKPI(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#deleteKPI");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // ID of KPI

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

// Delete a kpi
[apiInstance deleteKPIWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var id = id_example; // {String} ID of KPI


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

namespace Example
{
    public class deleteKPIExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var id = id_example;  // String | ID of KPI

            try
            {
                // Delete a kpi
                apiInstance.deleteKPI(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.deleteKPI: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$id = id_example; // String | ID of KPI

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $id = id_example; # String | ID of KPI

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
id = id_example # String | ID of KPI

try: 
    # Delete a kpi
    api_instance.delete_kpi(id)
except ApiException as e:
    print("Exception when calling KPIResourceApi->deleteKPI: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
ID of KPI
Required

Responses

Status: 400 - KPI not found

Status: 500 - Internal error


getKPIByID

Get a KPI by id


/kpis/get/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/get/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        try {
            KPI result = apiInstance.getKPIByID(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getKPIByID");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        try {
            KPI result = apiInstance.getKPIByID(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getKPIByID");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // kpi

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

// Get a KPI by id
[apiInstance getKPIByIDWith:id
              completionHandler: ^(KPI output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var id = id_example; // {String} kpi


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

namespace Example
{
    public class getKPIByIDExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var id = id_example;  // String | kpi

            try
            {
                // Get a KPI by id
                KPI result = apiInstance.getKPIByID(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.getKPIByID: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$id = id_example; // String | kpi

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $id = id_example; # String | kpi

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
id = id_example # String | kpi

try: 
    # Get a KPI by id
    api_response = api_instance.get_kpi_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->getKPIByID: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
kpi
Required

Responses

Status: 200 - successful operation

Status: 400 - KPI not found

Status: 500 - KPI error


getKPIStatsByID

Get stats a KPI


/kpis/get/{id}/stats

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/get/{id}/stats?from=&to="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        String from = from_example; // String | from
        String to = to_example; // String | to
        try {
            JsonNode result = apiInstance.getKPIStatsByID(id, from, to);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getKPIStatsByID");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        String from = from_example; // String | from
        String to = to_example; // String | to
        try {
            JsonNode result = apiInstance.getKPIStatsByID(id, from, to);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getKPIStatsByID");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // kpi
String *from = from_example; // from (optional)
String *to = to_example; // to (optional)

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

// Get stats a KPI
[apiInstance getKPIStatsByIDWith:id
    from:from
    to:to
              completionHandler: ^(JsonNode output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var id = id_example; // {String} kpi

var opts = { 
  'from': from_example, // {String} from
  'to': to_example // {String} to
};

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

namespace Example
{
    public class getKPIStatsByIDExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var id = id_example;  // String | kpi
            var from = from_example;  // String | from (optional) 
            var to = to_example;  // String | to (optional) 

            try
            {
                // Get stats a KPI
                JsonNode result = apiInstance.getKPIStatsByID(id, from, to);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.getKPIStatsByID: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$id = id_example; // String | kpi
$from = from_example; // String | from
$to = to_example; // String | to

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $id = id_example; # String | kpi
my $from = from_example; # String | from
my $to = to_example; # String | to

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
id = id_example # String | kpi
from = from_example # String | from (optional)
to = to_example # String | to (optional)

try: 
    # Get stats a KPI
    api_response = api_instance.get_kpi_stats_by_id(id, from=from, to=to)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->getKPIStatsByID: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
kpi
Required
Query parameters
Name Description
from
String
from
to
String
to

Responses

Status: 200 - successful operation

Status: 400 - KPI not found

Status: 500 - KPI error


getLastKPIByID

Get the last value of a KPI by id


/kpis/get/{id}/lastKPI

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/get/{id}/lastKPI"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        try {
            JsonNode result = apiInstance.getLastKPIByID(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getLastKPIByID");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        String id = id_example; // String | kpi
        try {
            JsonNode result = apiInstance.getLastKPIByID(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#getLastKPIByID");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // kpi

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

// Get the last value of a KPI by id
[apiInstance getLastKPIByIDWith:id
              completionHandler: ^(JsonNode output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var id = id_example; // {String} kpi


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

namespace Example
{
    public class getLastKPIByIDExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var id = id_example;  // String | kpi

            try
            {
                // Get the last value of a KPI by id
                JsonNode result = apiInstance.getLastKPIByID(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.getLastKPIByID: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$id = id_example; // String | kpi

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $id = id_example; # String | kpi

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
id = id_example # String | kpi

try: 
    # Get the last value of a KPI by id
    api_response = api_instance.get_last_kpi_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->getLastKPIByID: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
kpi
Required

Responses

Status: 200 - successful operation

Status: 400 - KPI not found

Status: 500 - KPI error


listKPIs

List all models


/kpis/list

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/list?category="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        String category = category_example; // String | category
        try {
            array[KPI] result = apiInstance.listKPIs(category);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#listKPIs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        String category = category_example; // String | category
        try {
            array[KPI] result = apiInstance.listKPIs(category);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#listKPIs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *category = category_example; // category (optional)

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

// List all models
[apiInstance listKPIsWith:category
              completionHandler: ^(array[KPI] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var opts = { 
  'category': category_example // {String} category
};

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

namespace Example
{
    public class listKPIsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var category = category_example;  // String | category (optional) 

            try
            {
                // List all models
                array[KPI] result = apiInstance.listKPIs(category);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.listKPIs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$category = category_example; // String | category

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $category = category_example; # String | category

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
category = category_example # String | category (optional)

try: 
    # List all models
    api_response = api_instance.list_kp_is(category=category)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->listKPIs: %s\n" % e)

Parameters

Query parameters
Name Description
category
String
category

Responses

Status: 200 - successful operation

Status: 500 - Internal error


updateKPI

Update a kpi


/kpis/update

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/kpis/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.KPIResourceApi;

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

public class KPIResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        KPIResourceApi apiInstance = new KPIResourceApi();
        KPI body = ; // KPI | KPI description
        try {
            KPI result = apiInstance.updateKPI(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#updateKPI");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.KPIResourceApi;

public class KPIResourceApiExample {

    public static void main(String[] args) {
        KPIResourceApi apiInstance = new KPIResourceApi();
        KPI body = ; // KPI | KPI description
        try {
            KPI result = apiInstance.updateKPI(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling KPIResourceApi#updateKPI");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

KPI *body = ; // KPI description

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

// Update a kpi
[apiInstance updateKPIWith:body
              completionHandler: ^(KPI output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.KPIResourceApi()

var body = ; // {KPI} KPI description


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

namespace Example
{
    public class updateKPIExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new KPIResourceApi();
            var body = new KPI(); // KPI | KPI description

            try
            {
                // Update a kpi
                KPI result = apiInstance.updateKPI(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling KPIResourceApi.updateKPI: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\KPIResourceApi();
$body = ; // KPI | KPI description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::KPIResourceApi->new();
my $body = WWW::SwaggerClient::Object::KPI->new(); # KPI | KPI description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.KPIResourceApi()
body =  # KPI | KPI description

try: 
    # Update a kpi
    api_response = api_instance.update_kpi(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling KPIResourceApi->updateKPI: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - KPI not found

Status: 500 - Internal error


ModelResource

createModel

Create a model

If id is not provided, it will be randomly generated


/models/create

Usage and SDK Samples

curl -X PUT -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        Model body = ; // Model | Model description
        try {
            Model result = apiInstance.createModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#createModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        Model body = ; // Model | Model description
        try {
            Model result = apiInstance.createModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#createModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Model *body = ; // Model description

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

// Create a model
[apiInstance createModelWith:body
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var body = ; // {Model} Model description


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

namespace Example
{
    public class createModelExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var body = new Model(); // Model | Model description

            try
            {
                // Create a model
                Model result = apiInstance.createModel(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.createModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$body = ; // Model | Model description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $body = WWW::SwaggerClient::Object::Model->new(); # Model | Model description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
body =  # Model | Model description

try: 
    # Create a model
    api_response = api_instance.create_model(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ModelResourceApi->createModel: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Model already exists

Status: 500 - Internal error


deleteModel

Delete a model


/models/delete/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/delete/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | ID of model
        try {
            apiInstance.deleteModel(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#deleteModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | ID of model
        try {
            apiInstance.deleteModel(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#deleteModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // ID of model

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

// Delete a model
[apiInstance deleteModelWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var id = id_example; // {String} ID of model


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

namespace Example
{
    public class deleteModelExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var id = id_example;  // String | ID of model

            try
            {
                // Delete a model
                apiInstance.deleteModel(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.deleteModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$id = id_example; // String | ID of model

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $id = id_example; # String | ID of model

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
id = id_example # String | ID of model

try: 
    # Delete a model
    api_instance.delete_model(id)
except ApiException as e:
    print("Exception when calling ModelResourceApi->deleteModel: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
ID of model
Required

Responses

Status: 400 - Model not found

Status: 500 - Internal error


getModel

Get a model by id


/models/get/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/get/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | model
        try {
            Model result = apiInstance.getModel(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#getModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | model
        try {
            Model result = apiInstance.getModel(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#getModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // model

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

// Get a model by id
[apiInstance getModelWith:id
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var id = id_example; // {String} model


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

namespace Example
{
    public class getModelExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var id = id_example;  // String | model

            try
            {
                // Get a model by id
                Model result = apiInstance.getModel(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.getModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$id = id_example; // String | model

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $id = id_example; # String | model

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
id = id_example # String | model

try: 
    # Get a model by id
    api_response = api_instance.get_model(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ModelResourceApi->getModel: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
model
Required

Responses

Status: 200 - successful operation

Status: 400 - Model not found

Status: 500 - Internal error


getModelInfo

Get information of a model by id


/models/get/{id}/info

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/get/{id}/info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | model
        try {
            GeneralInfo result = apiInstance.getModelInfo(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#getModelInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        String id = id_example; // String | model
        try {
            GeneralInfo result = apiInstance.getModelInfo(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#getModelInfo");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // model

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

// Get information of a model by id
[apiInstance getModelInfoWith:id
              completionHandler: ^(GeneralInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var id = id_example; // {String} model


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

namespace Example
{
    public class getModelInfoExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var id = id_example;  // String | model

            try
            {
                // Get information of a model by id
                GeneralInfo result = apiInstance.getModelInfo(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.getModelInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$id = id_example; // String | model

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $id = id_example; # String | model

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
id = id_example # String | model

try: 
    # Get information of a model by id
    api_response = api_instance.get_model_info(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ModelResourceApi->getModelInfo: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
model
Required

Responses

Status: 200 - successful operation

Status: 400 - Model not found

Status: 500 - Internal error


listModels

List all models


/models/list

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/list?otStatus=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        String otStatus = otStatus_example; // String | otStatus
        String type = type_example; // String | type
        try {
            array[Model] result = apiInstance.listModels(otStatus, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#listModels");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        String otStatus = otStatus_example; // String | otStatus
        String type = type_example; // String | type
        try {
            array[Model] result = apiInstance.listModels(otStatus, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#listModels");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *otStatus = otStatus_example; // otStatus (optional)
String *type = type_example; // type (optional)

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

// List all models
[apiInstance listModelsWith:otStatus
    type:type
              completionHandler: ^(array[Model] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var opts = { 
  'otStatus': otStatus_example, // {String} otStatus
  'type': type_example // {String} type
};

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

namespace Example
{
    public class listModelsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var otStatus = otStatus_example;  // String | otStatus (optional) 
            var type = type_example;  // String | type (optional) 

            try
            {
                // List all models
                array[Model] result = apiInstance.listModels(otStatus, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.listModels: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$otStatus = otStatus_example; // String | otStatus
$type = type_example; // String | type

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $otStatus = otStatus_example; # String | otStatus
my $type = type_example; # String | type

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
otStatus = otStatus_example # String | otStatus (optional)
type = type_example # String | type (optional)

try: 
    # List all models
    api_response = api_instance.list_models(otStatus=otStatus, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ModelResourceApi->listModels: %s\n" % e)

Parameters

Query parameters
Name Description
otStatus
String
otStatus
type
String
type

Responses

Status: 200 - successful operation

Status: 500 - Internal error


updateModel

Update a model


/models/update

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/models/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ModelResourceApi;

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

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ModelResourceApi apiInstance = new ModelResourceApi();
        Model body = ; // Model | Model description
        try {
            Model result = apiInstance.updateModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#updateModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ModelResourceApi;

public class ModelResourceApiExample {

    public static void main(String[] args) {
        ModelResourceApi apiInstance = new ModelResourceApi();
        Model body = ; // Model | Model description
        try {
            Model result = apiInstance.updateModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ModelResourceApi#updateModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Model *body = ; // Model description

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

// Update a model
[apiInstance updateModelWith:body
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ModelResourceApi()

var body = ; // {Model} Model description


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

namespace Example
{
    public class updateModelExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ModelResourceApi();
            var body = new Model(); // Model | Model description

            try
            {
                // Update a model
                Model result = apiInstance.updateModel(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ModelResourceApi.updateModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ModelResourceApi();
$body = ; // Model | Model description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ModelResourceApi->new();
my $body = WWW::SwaggerClient::Object::Model->new(); # Model | Model description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ModelResourceApi()
body =  # Model | Model description

try: 
    # Update a model
    api_response = api_instance.update_model(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ModelResourceApi->updateModel: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Model not found

Status: 500 - Internal error


ScheduledInstanceResource

createScheduledInstance

Create a scheduled instance

If id is not provided, it will be randomly generated


/scheduledInstances/create

Usage and SDK Samples

curl -X PUT -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        ScheduledInstance body = ; // ScheduledInstance | Scheduled instance description
        try {
            Instance result = apiInstance.createScheduledInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#createScheduledInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        ScheduledInstance body = ; // ScheduledInstance | Scheduled instance description
        try {
            Instance result = apiInstance.createScheduledInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#createScheduledInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

ScheduledInstance *body = ; // Scheduled instance description

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

// Create a scheduled instance
[apiInstance createScheduledInstanceWith:body
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var body = ; // {ScheduledInstance} Scheduled instance description


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

namespace Example
{
    public class createScheduledInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var body = new ScheduledInstance(); // ScheduledInstance | Scheduled instance description

            try
            {
                // Create a scheduled instance
                Instance result = apiInstance.createScheduledInstance(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.createScheduledInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$body = ; // ScheduledInstance | Scheduled instance description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $body = WWW::SwaggerClient::Object::ScheduledInstance->new(); # ScheduledInstance | Scheduled instance description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
body =  # ScheduledInstance | Scheduled instance description

try: 
    # Create a scheduled instance
    api_response = api_instance.create_scheduled_instance(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->createScheduledInstance: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Scheduled instance already exists

Status: 500 - Internal error


deleteScheduledInstance

Delete a scheduled instance


/scheduledInstances/delete/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/delete/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | ID of scheduled instance
        try {
            apiInstance.deleteScheduledInstance(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#deleteScheduledInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | ID of scheduled instance
        try {
            apiInstance.deleteScheduledInstance(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#deleteScheduledInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // ID of scheduled instance

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

// Delete a scheduled instance
[apiInstance deleteScheduledInstanceWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var id = id_example; // {String} ID of scheduled instance


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

namespace Example
{
    public class deleteScheduledInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var id = id_example;  // String | ID of scheduled instance

            try
            {
                // Delete a scheduled instance
                apiInstance.deleteScheduledInstance(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.deleteScheduledInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$id = id_example; // String | ID of scheduled instance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $id = id_example; # String | ID of scheduled instance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
id = id_example # String | ID of scheduled instance

try: 
    # Delete a scheduled instance
    api_instance.delete_scheduled_instance(id)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->deleteScheduledInstance: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
ID of scheduled instance
Required

Responses

Status: 400 - Scheduled instance not found

Status: 500 - Internal error


getScheduledInstance

Get a scheduled instance by id


/scheduledInstances/get/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/get/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | scheduled instance
        try {
            ScheduledInstance result = apiInstance.getScheduledInstance(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#getScheduledInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | scheduled instance
        try {
            ScheduledInstance result = apiInstance.getScheduledInstance(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#getScheduledInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // scheduled instance

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

// Get a scheduled instance by id
[apiInstance getScheduledInstanceWith:id
              completionHandler: ^(ScheduledInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var id = id_example; // {String} scheduled instance


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

namespace Example
{
    public class getScheduledInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var id = id_example;  // String | scheduled instance

            try
            {
                // Get a scheduled instance by id
                ScheduledInstance result = apiInstance.getScheduledInstance(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.getScheduledInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$id = id_example; // String | scheduled instance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $id = id_example; # String | scheduled instance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
id = id_example # String | scheduled instance

try: 
    # Get a scheduled instance by id
    api_response = api_instance.get_scheduled_instance(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->getScheduledInstance: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
scheduled instance
Required

Responses

Status: 200 - successful operation

Status: 400 - Scheduled instance not found

Status: 500 - Internal error


listScheduledInstances

List all scheduled instances


/scheduledInstances/list

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/list?idRef=&user=&status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String idRef = idRef_example; // String | idRef
        String user = user_example; // String | user
        String status = status_example; // String | status
        try {
            array[ScheduledInstance] result = apiInstance.listScheduledInstances(idRef, user, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#listScheduledInstances");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String idRef = idRef_example; // String | idRef
        String user = user_example; // String | user
        String status = status_example; // String | status
        try {
            array[ScheduledInstance] result = apiInstance.listScheduledInstances(idRef, user, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#listScheduledInstances");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *idRef = idRef_example; // idRef (optional)
String *user = user_example; // user (optional)
String *status = status_example; // status (optional)

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

// List all scheduled instances
[apiInstance listScheduledInstancesWith:idRef
    user:user
    status:status
              completionHandler: ^(array[ScheduledInstance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var opts = { 
  'idRef': idRef_example, // {String} idRef
  'user': user_example, // {String} user
  'status': status_example // {String} status
};

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

namespace Example
{
    public class listScheduledInstancesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var idRef = idRef_example;  // String | idRef (optional) 
            var user = user_example;  // String | user (optional) 
            var status = status_example;  // String | status (optional) 

            try
            {
                // List all scheduled instances
                array[ScheduledInstance] result = apiInstance.listScheduledInstances(idRef, user, status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.listScheduledInstances: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$idRef = idRef_example; // String | idRef
$user = user_example; // String | user
$status = status_example; // String | status

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $idRef = idRef_example; # String | idRef
my $user = user_example; # String | user
my $status = status_example; # String | status

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
idRef = idRef_example # String | idRef (optional)
user = user_example # String | user (optional)
status = status_example # String | status (optional)

try: 
    # List all scheduled instances
    api_response = api_instance.list_scheduled_instances(idRef=idRef, user=user, status=status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->listScheduledInstances: %s\n" % e)

Parameters

Query parameters
Name Description
idRef
String
idRef
user
String
user
status
String
status

Responses

Status: 200 - successful operation

Status: 500 - Internal error


updateScheduledInstance

Update a scheduled instance


/scheduledInstances/update

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        ScheduledInstance body = ; // ScheduledInstance | Scheduled instance description
        try {
            ScheduledInstance result = apiInstance.updateScheduledInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#updateScheduledInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        ScheduledInstance body = ; // ScheduledInstance | Scheduled instance description
        try {
            ScheduledInstance result = apiInstance.updateScheduledInstance(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#updateScheduledInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

ScheduledInstance *body = ; // Scheduled instance description

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

// Update a scheduled instance
[apiInstance updateScheduledInstanceWith:body
              completionHandler: ^(ScheduledInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var body = ; // {ScheduledInstance} Scheduled instance description


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

namespace Example
{
    public class updateScheduledInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var body = new ScheduledInstance(); // ScheduledInstance | Scheduled instance description

            try
            {
                // Update a scheduled instance
                ScheduledInstance result = apiInstance.updateScheduledInstance(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.updateScheduledInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$body = ; // ScheduledInstance | Scheduled instance description

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $body = WWW::SwaggerClient::Object::ScheduledInstance->new(); # ScheduledInstance | Scheduled instance description

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
body =  # ScheduledInstance | Scheduled instance description

try: 
    # Update a scheduled instance
    api_response = api_instance.update_scheduled_instance(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->updateScheduledInstance: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - successful operation

Status: 400 - Scheduled instance not found

Status: 500 - Internal error


updateStatusScheduledInstance

Update only the status of a scheduled instance


/scheduledInstances/updateStatus/{id}

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/scheduledInstances/updateStatus/{id}?status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScheduledInstanceResourceApi;

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

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | ID of scheduled instance
        String status = status_example; // String | status
        try {
            ScheduledInstance result = apiInstance.updateStatusScheduledInstance(id, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#updateStatusScheduledInstance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledInstanceResourceApi;

public class ScheduledInstanceResourceApiExample {

    public static void main(String[] args) {
        ScheduledInstanceResourceApi apiInstance = new ScheduledInstanceResourceApi();
        String id = id_example; // String | ID of scheduled instance
        String status = status_example; // String | status
        try {
            ScheduledInstance result = apiInstance.updateStatusScheduledInstance(id, status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledInstanceResourceApi#updateStatusScheduledInstance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // ID of scheduled instance
String *status = status_example; // status

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

// Update only the status of a scheduled instance
[apiInstance updateStatusScheduledInstanceWith:id
    status:status
              completionHandler: ^(ScheduledInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.ScheduledInstanceResourceApi()

var id = id_example; // {String} ID of scheduled instance

var status = status_example; // {String} status


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

namespace Example
{
    public class updateStatusScheduledInstanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ScheduledInstanceResourceApi();
            var id = id_example;  // String | ID of scheduled instance
            var status = status_example;  // String | status

            try
            {
                // Update only the status of a scheduled instance
                ScheduledInstance result = apiInstance.updateStatusScheduledInstance(id, status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledInstanceResourceApi.updateStatusScheduledInstance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ScheduledInstanceResourceApi();
$id = id_example; // String | ID of scheduled instance
$status = status_example; // String | status

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ScheduledInstanceResourceApi->new();
my $id = id_example; # String | ID of scheduled instance
my $status = status_example; # String | status

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScheduledInstanceResourceApi()
id = id_example # String | ID of scheduled instance
status = status_example # String | status

try: 
    # Update only the status of a scheduled instance
    api_response = api_instance.update_status_scheduled_instance(id, status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledInstanceResourceApi->updateStatusScheduledInstance: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
ID of scheduled instance
Required
Query parameters
Name Description
status*
String
status
Required

Responses

Status: 200 - successful operation

Status: 400 - Scheduled instance not found

Status: 500 - Internal error


UtilsResource

getLogs

Gets docker logs by instance id


/utils/logs/instances/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/utils/logs/instances/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UtilsResourceApi;

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

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        UtilsResourceApi apiInstance = new UtilsResourceApi();
        String id = id_example; // String | instance
        try {
            Object result = apiInstance.getLogs(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getLogs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UtilsResourceApi;

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        UtilsResourceApi apiInstance = new UtilsResourceApi();
        String id = id_example; // String | instance
        try {
            Object result = apiInstance.getLogs(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getLogs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // instance

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

// Gets docker logs by instance id
[apiInstance getLogsWith:id
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.UtilsResourceApi()

var id = id_example; // {String} instance


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

namespace Example
{
    public class getLogsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UtilsResourceApi();
            var id = id_example;  // String | instance

            try
            {
                // Gets docker logs by instance id
                Object result = apiInstance.getLogs(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsResourceApi.getLogs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\UtilsResourceApi();
$id = id_example; // String | instance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UtilsResourceApi->new();
my $id = id_example; # String | instance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UtilsResourceApi()
id = id_example # String | instance

try: 
    # Gets docker logs by instance id
    api_response = api_instance.get_logs(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UtilsResourceApi->getLogs: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
instance
Required

Responses

Status: 200 - successful operation

Status: 400 - Instance not found

Status: 500 - Internal error


getPrune

prune containers (clean space for old containers)


/utils/prune

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/utils/prune"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UtilsResourceApi;

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

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        UtilsResourceApi apiInstance = new UtilsResourceApi();
        try {
            Object result = apiInstance.getPrune();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getPrune");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UtilsResourceApi;

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        UtilsResourceApi apiInstance = new UtilsResourceApi();
        try {
            Object result = apiInstance.getPrune();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getPrune");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


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

// prune containers (clean space for old containers)
[apiInstance getPruneWithCompletionHandler: 
              ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.UtilsResourceApi()

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

namespace Example
{
    public class getPruneExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UtilsResourceApi();

            try
            {
                // prune containers (clean space for old containers)
                Object result = apiInstance.getPrune();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsResourceApi.getPrune: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

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

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

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

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

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

try: 
    # prune containers (clean space for old containers)
    api_response = api_instance.get_prune()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UtilsResourceApi->getPrune: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation

Status: 400 - Instance not found

Status: 500 - Internal error


getScheduledLogs

Gets docker logs (last docker) by scheduledInstance id


/utils/logs/scheduledInstances/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/utils/logs/scheduledInstances/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UtilsResourceApi;

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

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        UtilsResourceApi apiInstance = new UtilsResourceApi();
        String id = id_example; // String | scheduledInstance
        try {
            Object result = apiInstance.getScheduledLogs(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getScheduledLogs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UtilsResourceApi;

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        UtilsResourceApi apiInstance = new UtilsResourceApi();
        String id = id_example; // String | scheduledInstance
        try {
            Object result = apiInstance.getScheduledLogs(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getScheduledLogs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *id = id_example; // scheduledInstance

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

// Gets docker logs (last docker) by scheduledInstance id
[apiInstance getScheduledLogsWith:id
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.UtilsResourceApi()

var id = id_example; // {String} scheduledInstance


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

namespace Example
{
    public class getScheduledLogsExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UtilsResourceApi();
            var id = id_example;  // String | scheduledInstance

            try
            {
                // Gets docker logs (last docker) by scheduledInstance id
                Object result = apiInstance.getScheduledLogs(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsResourceApi.getScheduledLogs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\UtilsResourceApi();
$id = id_example; // String | scheduledInstance

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::UtilsResourceApi->new();
my $id = id_example; # String | scheduledInstance

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UtilsResourceApi()
id = id_example # String | scheduledInstance

try: 
    # Gets docker logs (last docker) by scheduledInstance id
    api_response = api_instance.get_scheduled_logs(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UtilsResourceApi->getScheduledLogs: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
scheduledInstance
Required

Responses

Status: 200 - successful operation

Status: 400 - Instance not found

Status: 500 - Internal error


getVersion

Shows the current version


/utils/version

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "http://otpixel.satrdlab.upv.es:8080/otpixel/api/utils/version"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UtilsResourceApi;

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

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apikey
        ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
        apikey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apikey.setApiKeyPrefix("Token");

        UtilsResourceApi apiInstance = new UtilsResourceApi();
        try {
            array[Version] result = apiInstance.getVersion();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UtilsResourceApi;

public class UtilsResourceApiExample {

    public static void main(String[] args) {
        UtilsResourceApi apiInstance = new UtilsResourceApi();
        try {
            array[Version] result = apiInstance.getVersion();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UtilsResourceApi#getVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


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

// Shows the current version
[apiInstance getVersionWithCompletionHandler: 
              ^(array[Version] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Otpixel = require('otpixel');
var defaultClient = Otpixel.ApiClient.instance;

// Configure API key authorization: apikey
var apikey = defaultClient.authentications['apikey'];
apikey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix['Authorization'] = "Token"

var api = new Otpixel.UtilsResourceApi()

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

namespace Example
{
    public class getVersionExample
    {
        public void main()
        {
            
            // Configure API key authorization: apikey
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UtilsResourceApi();

            try
            {
                // Shows the current version
                array[Version] result = apiInstance.getVersion();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsResourceApi.getVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apikey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

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

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

# Configure API key authorization: apikey
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

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

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

# Configure API key authorization: apikey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

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

try: 
    # Shows the current version
    api_response = api_instance.get_version()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UtilsResourceApi->getVersion: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation

Status: 500 - Internal error