Artemis Guard Data API

Authenticated

machinesGet

Get all machines accessible by the user.

Returns a list of machines the authenticated user has access to.


/machines

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/ARTEMISPONTSUL_1/ArtemisDataAPI/1.0.0/machines"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticatedApi;

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

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


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

public class AuthenticatedApiExample {

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

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

// Get all machines accessible by the user.
[apiInstance machinesGetWithCompletionHandler: 
              ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArtemisGuardDataApi = require('artemis_guard_data_api');
var defaultClient = ArtemisGuardDataApi.ApiClient.instance;


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

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


            var apiInstance = new AuthenticatedApi();

            try
            {
                // Get all machines accessible by the user.
                inline_response_200_2 result = apiInstance.machinesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticatedApi.machinesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


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

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


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

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


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

try: 
    # Get all machines accessible by the user.
    api_response = api_instance.machines_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticatedApi->machinesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of machines

Status: 401 - Unauthorized access

Status: 404 - No machines found


machinesIdGet

Get machine by ID

Returns the machine details if the authenticated user has access to it.


/machines/{id}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/ARTEMISPONTSUL_1/ArtemisDataAPI/1.0.0/machines/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticatedApi;

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

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        AuthenticatedApi apiInstance = new AuthenticatedApi();
        String id = id_example; // String | The ID of the machine to retrieve.
        try {
            inline_response_200_3 result = apiInstance.machinesIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticatedApi#machinesIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticatedApi;

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        AuthenticatedApi apiInstance = new AuthenticatedApi();
        String id = id_example; // String | The ID of the machine to retrieve.
        try {
            inline_response_200_3 result = apiInstance.machinesIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticatedApi#machinesIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *id = id_example; // The ID of the machine to retrieve.

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

// Get machine by ID
[apiInstance machinesIdGetWith:id
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArtemisGuardDataApi = require('artemis_guard_data_api');
var defaultClient = ArtemisGuardDataApi.ApiClient.instance;


var api = new ArtemisGuardDataApi.AuthenticatedApi()
var id = id_example; // {{String}} The ID of the machine to retrieve.

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

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


            var apiInstance = new AuthenticatedApi();
            var id = id_example;  // String | The ID of the machine to retrieve.

            try
            {
                // Get machine by ID
                inline_response_200_3 result = apiInstance.machinesIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticatedApi.machinesIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiAuthenticatedApi();
$id = id_example; // String | The ID of the machine to retrieve.

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


my $api_instance = WWW::SwaggerClient::AuthenticatedApi->new();
my $id = id_example; # String | The ID of the machine to retrieve.

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


# create an instance of the API class
api_instance = swagger_client.AuthenticatedApi()
id = id_example # String | The ID of the machine to retrieve.

try: 
    # Get machine by ID
    api_response = api_instance.machines_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticatedApi->machinesIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The ID of the machine to retrieve.
Required

Responses

Status: 200 - A single machine

Status: 401 - Unauthorized access

Status: 404 - Machine not found


machinesIdPut

Update machine by ID

Updates the machine details if the authenticated user has access to it. Only one field is mandatory. Only send fields to be updated.


/machines/{id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/ARTEMISPONTSUL_1/ArtemisDataAPI/1.0.0/machines/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticatedApi;

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

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        
        AuthenticatedApi apiInstance = new AuthenticatedApi();
        ApiMachineUpdate body = ; // ApiMachineUpdate | 
        String id = id_example; // String | The ID of the machine to update.
        try {
            inline_response_200_4 result = apiInstance.machinesIdPut(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticatedApi#machinesIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticatedApi;

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        AuthenticatedApi apiInstance = new AuthenticatedApi();
        ApiMachineUpdate body = ; // ApiMachineUpdate | 
        String id = id_example; // String | The ID of the machine to update.
        try {
            inline_response_200_4 result = apiInstance.machinesIdPut(body, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticatedApi#machinesIdPut");
            e.printStackTrace();
        }
    }
}
ApiMachineUpdate *body = ; // 
String *id = id_example; // The ID of the machine to update.

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

// Update machine by ID
[apiInstance machinesIdPutWith:body
    id:id
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArtemisGuardDataApi = require('artemis_guard_data_api');

var api = new ArtemisGuardDataApi.AuthenticatedApi()
var body = ; // {{ApiMachineUpdate}} 
var id = id_example; // {{String}} The ID of the machine to update.

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

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

            var apiInstance = new AuthenticatedApi();
            var body = new ApiMachineUpdate(); // ApiMachineUpdate | 
            var id = id_example;  // String | The ID of the machine to update.

            try
            {
                // Update machine by ID
                inline_response_200_4 result = apiInstance.machinesIdPut(body, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticatedApi.machinesIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAuthenticatedApi();
$body = ; // ApiMachineUpdate | 
$id = id_example; // String | The ID of the machine to update.

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

my $api_instance = WWW::SwaggerClient::AuthenticatedApi->new();
my $body = WWW::SwaggerClient::Object::ApiMachineUpdate->new(); # ApiMachineUpdate | 
my $id = id_example; # String | The ID of the machine to update.

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

# create an instance of the API class
api_instance = swagger_client.AuthenticatedApi()
body =  # ApiMachineUpdate | 
id = id_example # String | The ID of the machine to update.

try: 
    # Update machine by ID
    api_response = api_instance.machines_id_put(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticatedApi->machinesIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The ID of the machine to update.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successfully updated

Status: 400 - Error updating machine

Status: 401 - Unauthorized access

Status: 404 - Machine not found


machinesListGet

Get list of machines accessible by the user

Returns a list of machines that the authenticated user has access to.


/machinesList

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/ARTEMISPONTSUL_1/ArtemisDataAPI/1.0.0/machinesList"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticatedApi;

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

public class AuthenticatedApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


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

public class AuthenticatedApiExample {

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

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

// Get list of machines accessible by the user
[apiInstance machinesListGetWithCompletionHandler: 
              ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArtemisGuardDataApi = require('artemis_guard_data_api');
var defaultClient = ArtemisGuardDataApi.ApiClient.instance;


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

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


            var apiInstance = new AuthenticatedApi();

            try
            {
                // Get list of machines accessible by the user
                inline_response_200_1 result = apiInstance.machinesListGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticatedApi.machinesListGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


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

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


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

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


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

try: 
    # Get list of machines accessible by the user
    api_response = api_instance.machines_list_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticatedApi->machinesListGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of machines

Status: 401 - Unauthorized access

Status: 404 - No machines found


Unauthenticated

loginPost

Authenticates the user.

Login with username and password. Returns a JWT token for further authentication.


/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/ARTEMISPONTSUL_1/ArtemisDataAPI/1.0.0/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UnauthenticatedApi;

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

public class UnauthenticatedApiExample {

    public static void main(String[] args) {
        
        UnauthenticatedApi apiInstance = new UnauthenticatedApi();
        Login_body body = ; // Login_body | 
        try {
            inline_response_200 result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UnauthenticatedApi#loginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UnauthenticatedApi;

public class UnauthenticatedApiExample {

    public static void main(String[] args) {
        UnauthenticatedApi apiInstance = new UnauthenticatedApi();
        Login_body body = ; // Login_body | 
        try {
            inline_response_200 result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UnauthenticatedApi#loginPost");
            e.printStackTrace();
        }
    }
}
Login_body *body = ; // 

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

// Authenticates the user.
[apiInstance loginPostWith:body
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArtemisGuardDataApi = require('artemis_guard_data_api');

var api = new ArtemisGuardDataApi.UnauthenticatedApi()
var body = ; // {{Login_body}} 

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

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

            var apiInstance = new UnauthenticatedApi();
            var body = new Login_body(); // Login_body | 

            try
            {
                // Authenticates the user.
                inline_response_200 result = apiInstance.loginPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UnauthenticatedApi.loginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUnauthenticatedApi();
$body = ; // Login_body | 

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

my $api_instance = WWW::SwaggerClient::UnauthenticatedApi->new();
my $body = WWW::SwaggerClient::Object::Login_body->new(); # Login_body | 

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

# create an instance of the API class
api_instance = swagger_client.UnauthenticatedApi()
body =  # Login_body | 

try: 
    # Authenticates the user.
    api_response = api_instance.login_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UnauthenticatedApi->loginPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successfully authenticated

Status: 400 - Missing credentials

Status: 401 - Invalid credentials