Enfyo Device API

Accounts

createAccount

Create account endpoint

The API provides endpoints for clear and hashed password login and account creation, clear password usage is discouraged to improve user information in unsafe environments.


/auth/createAccount

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/auth/createAccount"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        Auth_createAccount_body body = ; // Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)
        try {
            User result = apiInstance.createAccount(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#createAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        Auth_createAccount_body body = ; // Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)
        try {
            User result = apiInstance.createAccount(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#createAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Auth_createAccount_body *body = ; // Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

// Create account endpoint
[apiInstance createAccountWith:body
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var body = ; // {{Auth_createAccount_body}} Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var body = new Auth_createAccount_body(); // Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

            try
            {
                // Create account endpoint
                User result = apiInstance.createAccount(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.createAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$body = ; // Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $body = WWW::SwaggerClient::Object::Auth_createAccount_body->new(); # Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

eval { 
    my $result = $api_instance->createAccount(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->createAccount: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
body =  # Auth_createAccount_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

try: 
    # Create account endpoint
    api_response = api_instance.create_account(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->createAccount: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Sample response: Details about a user by ID

Status: 401 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 403 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 500 - Unexpected error


createAccountClear

Create account endpoint

The API provides endpoints for clear and hashed password login and account creation, clear password usage is discouraged to improve user information in unsafe environments.


/auth/createAccountClear

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/auth/createAccountClear"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        Auth_createAccountClear_body body = ; // Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)
        try {
            TransactionResponse result = apiInstance.createAccountClear(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#createAccountClear");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        Auth_createAccountClear_body body = ; // Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)
        try {
            TransactionResponse result = apiInstance.createAccountClear(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#createAccountClear");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Auth_createAccountClear_body *body = ; // Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

// Create account endpoint
[apiInstance createAccountClearWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var body = ; // {{Auth_createAccountClear_body}} Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var body = new Auth_createAccountClear_body(); // Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

            try
            {
                // Create account endpoint
                TransactionResponse result = apiInstance.createAccountClear(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.createAccountClear: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$body = ; // Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $body = WWW::SwaggerClient::Object::Auth_createAccountClear_body->new(); # Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

eval { 
    my $result = $api_instance->createAccountClear(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->createAccountClear: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
body =  # Auth_createAccountClear_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256)

try: 
    # Create account endpoint
    api_response = api_instance.create_account_clear(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->createAccountClear: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - User creation confirmation response

{"isOk":true,"message":"User was registered successfully!","username":"MyUsername","grafanaUserId":998}

Status: 401 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 403 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 500 - Unexpected server error


deleteAccount

Deletes an account and user from the system

The users in the devices are linked to an account, when deleting a user, all the information and configuration data for the user account is deleted, it includes all the security objects and personalized configuration.


/users/{username}

Usage and SDK Samples

curl -X DELETE\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.deleteAccount(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#deleteAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.deleteAccount(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#deleteAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username

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

// Deletes an account and user from the system
[apiInstance deleteAccountWith:username
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var username = username_example;  // String | a system registered account username

            try
            {
                // Deletes an account and user from the system
                TransactionResponse result = apiInstance.deleteAccount(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.deleteAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->deleteAccount(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->deleteAccount: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
username = username_example # String | a system registered account username

try: 
    # Deletes an account and user from the system
    api_response = api_instance.delete_account(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->deleteAccount: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required

Responses

Status: 200 - Transaction response for the user account deletion, contains specific transaction information for the Grafana subsystem

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


setAccountAuthObj

Sets an authorization Object for a User - Authorization code pair, creates a no access object if nonexistent. This endpoint is available also in string enum AuthCode


/users/{username}/authCodes/{authCode}

Usage and SDK Samples

curl -X PATCH\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/users/{username}/authCodes/{authCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        AuthCodes_authCode_body body = {
  "value" : {
    "value" : "READ_ONLY"
  }
}; // AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
        String username = username_example; // String | a system registered account username
        authCode_1 authCode = ; // authCode_1 | a valid system authorization code (integer or string)
        try {
            TransactionResponse result = apiInstance.setAccountAuthObj(body, username, authCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#setAccountAuthObj");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        AuthCodes_authCode_body body = {
  "value" : {
    "value" : "READ_ONLY"
  }
}; // AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
        String username = username_example; // String | a system registered account username
        authCode_1 authCode = ; // authCode_1 | a valid system authorization code (integer or string)
        try {
            TransactionResponse result = apiInstance.setAccountAuthObj(body, username, authCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#setAccountAuthObj");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
AuthCodes_authCode_body *body = {
  "value" : {
    "value" : "READ_ONLY"
  }
}; // Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
String *username = username_example; // a system registered account username
authCode_1 *authCode = ; // a valid system authorization code (integer or string)

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

// Sets an authorization Object for a User - Authorization code pair, creates a no access object if nonexistent. This endpoint is available also in string enum AuthCode
[apiInstance setAccountAuthObjWith:body
    username:username
    authCode:authCode
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var body = {
  "value" : {
    "value" : "READ_ONLY"
  }
}; // {{AuthCodes_authCode_body}} Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
var username = username_example; // {{String}} a system registered account username
var authCode = ; // {{authCode_1}} a valid system authorization code (integer or string)

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var body = new AuthCodes_authCode_body(); // AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
            var username = username_example;  // String | a system registered account username
            var authCode = new authCode_1(); // authCode_1 | a valid system authorization code (integer or string)

            try
            {
                // Sets an authorization Object for a User - Authorization code pair, creates a no access object if nonexistent. This endpoint is available also in string enum AuthCode
                TransactionResponse result = apiInstance.setAccountAuthObj(body, username, authCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.setAccountAuthObj: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$body = {
  "value" : {
    "value" : "READ_ONLY"
  }
}; // AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
$username = username_example; // String | a system registered account username
$authCode = ; // authCode_1 | a valid system authorization code (integer or string)

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $body = WWW::SwaggerClient::Object::AuthCodes_authCode_body->new(); # AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
my $username = username_example; # String | a system registered account username
my $authCode = ; # authCode_1 | a valid system authorization code (integer or string)

eval { 
    my $result = $api_instance->setAccountAuthObj(body => $body, username => $username, authCode => $authCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->setAccountAuthObj: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
body = {
  "value" : {
    "value" : "READ_ONLY"
  }
} # AuthCodes_authCode_body | Object containing new authorization level in value key; both string or integer enumerators can be used, see examples (0=NO_ACCESS, 1=READ_ONLY, 3=READ_WRITE, 7=EXEC_RW)
username = username_example # String | a system registered account username
authCode =  # authCode_1 | a valid system authorization code (integer or string)

try: 
    # Sets an authorization Object for a User - Authorization code pair, creates a no access object if nonexistent. This endpoint is available also in string enum AuthCode
    api_response = api_instance.set_account_auth_obj(body, username, authCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->setAccountAuthObj: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
authCode*
authCode_1
a valid system authorization code (integer or string)
Required
Body parameters
Name Description
body *

Responses

Status: 200 - User Authorization Object edit succesful response

{"isOk":true,"changedRows":1,"message":"User Permission Device System Administration --- READ_ONLY}"}

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


setAccountPassword

change password for a specific user account, requires to confirm the password of the current session account, and the usage is restricted to administrators or when changing password for the account of the current session.


/auth/{username}/password

Usage and SDK Samples

curl -X PATCH\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/auth/{username}/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        Username_password_body body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
}; // Username_password_body | object with current account and new passwords hashed in SHA-256
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.setAccountPassword(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#setAccountPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        Username_password_body body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
}; // Username_password_body | object with current account and new passwords hashed in SHA-256
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.setAccountPassword(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#setAccountPassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Username_password_body *body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
}; // object with current account and new passwords hashed in SHA-256
String *username = username_example; // a system registered account username

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

// change password for a specific user account, requires to confirm the password of the current session account, and the usage is restricted to administrators or when changing password for the account of the current session.
[apiInstance setAccountPasswordWith:body
    username:username
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
}; // {{Username_password_body}} object with current account and new passwords hashed in SHA-256
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var body = new Username_password_body(); // Username_password_body | object with current account and new passwords hashed in SHA-256
            var username = username_example;  // String | a system registered account username

            try
            {
                // change password for a specific user account, requires to confirm the password of the current session account, and the usage is restricted to administrators or when changing password for the account of the current session.
                TransactionResponse result = apiInstance.setAccountPassword(body, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.setAccountPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
}; // Username_password_body | object with current account and new passwords hashed in SHA-256
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $body = WWW::SwaggerClient::Object::Username_password_body->new(); # Username_password_body | object with current account and new passwords hashed in SHA-256
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->setAccountPassword(body => $body, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->setAccountPassword: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
body = {
  "loggedInPassword" : "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
  "assignedPassword" : "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"
} # Username_password_body | object with current account and new passwords hashed in SHA-256
username = username_example # String | a system registered account username

try: 
    # change password for a specific user account, requires to confirm the password of the current session account, and the usage is restricted to administrators or when changing password for the account of the current session.
    api_response = api_instance.set_account_password(body, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->setAccountPassword: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
Body parameters
Name Description
body *

Responses

Status: 200 - User account details

{"isOk":true,"message":"The password has been successfully changed"}

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameAuthCodesAuthCodeGet

Search and returns a single authorization object for a specific User and a single AuthCode. This endpoint is available also in string enum AuthCode


/users/{username}/authCodes/{authCode}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}/authCodes/{authCode}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        authCode authCode = ; // authCode | a valid system authorization code (int or string)
        try {
            array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesAuthCodeGet(username, authCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameAuthCodesAuthCodeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        authCode authCode = ; // authCode | a valid system authorization code (int or string)
        try {
            array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesAuthCodeGet(username, authCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameAuthCodesAuthCodeGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username
authCode *authCode = ; // a valid system authorization code (int or string)

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

// Search and returns a single authorization object for a specific User and a single AuthCode. This endpoint is available also in string enum AuthCode
[apiInstance usersUsernameAuthCodesAuthCodeGetWith:username
    authCode:authCode
              completionHandler: ^(array[UserAuthCode] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.AccountsApi()
var username = username_example; // {{String}} a system registered account username
var authCode = ; // {{authCode}} a valid system authorization code (int or string)

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var username = username_example;  // String | a system registered account username
            var authCode = new authCode(); // authCode | a valid system authorization code (int or string)

            try
            {
                // Search and returns a single authorization object for a specific User and a single AuthCode. This endpoint is available also in string enum AuthCode
                array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesAuthCodeGet(username, authCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.usersUsernameAuthCodesAuthCodeGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$username = username_example; // String | a system registered account username
$authCode = ; // authCode | a valid system authorization code (int or string)

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $username = username_example; # String | a system registered account username
my $authCode = ; # authCode | a valid system authorization code (int or string)

eval { 
    my $result = $api_instance->usersUsernameAuthCodesAuthCodeGet(username => $username, authCode => $authCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->usersUsernameAuthCodesAuthCodeGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
username = username_example # String | a system registered account username
authCode =  # authCode | a valid system authorization code (int or string)

try: 
    # Search and returns a single authorization object for a specific User and a single AuthCode. This endpoint is available also in string enum AuthCode
    api_response = api_instance.users_username_auth_codes_auth_code_get(username, authCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->usersUsernameAuthCodesAuthCodeGet: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
authCode*
authCode
a valid system authorization code (int or string)
Required

Responses

Status: 200 - User authorization codes list

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameAuthCodesGet

Get a list of authorizations for a specific username, available for all valid API users


/users/{username}/authCodes

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}/authCodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameAuthCodesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameAuthCodesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username

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

// Get a list of authorizations for a specific username, available for all valid API users
[apiInstance usersUsernameAuthCodesGetWith:username
              completionHandler: ^(array[UserAuthCode] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.AccountsApi()
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var username = username_example;  // String | a system registered account username

            try
            {
                // Get a list of authorizations for a specific username, available for all valid API users
                array[UserAuthCode] result = apiInstance.usersUsernameAuthCodesGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.usersUsernameAuthCodesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->usersUsernameAuthCodesGet(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->usersUsernameAuthCodesGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
username = username_example # String | a system registered account username

try: 
    # Get a list of authorizations for a specific username, available for all valid API users
    api_response = api_instance.users_username_auth_codes_get(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->usersUsernameAuthCodesGet: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required

Responses

Status: 200 - User authorization codes list

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameTeamsGet

Get a list of Grafana teams registered to user, to get a list of system teams available and its details, check device endpoints


/users/{username}/teams

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}/teams"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            array[GrafanaTeam] result = apiInstance.usersUsernameTeamsGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        try {
            array[GrafanaTeam] result = apiInstance.usersUsernameTeamsGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username

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

// Get a list of Grafana teams registered to user, to get a list of system teams available and its details, check device endpoints
[apiInstance usersUsernameTeamsGetWith:username
              completionHandler: ^(array[GrafanaTeam] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.AccountsApi()
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var username = username_example;  // String | a system registered account username

            try
            {
                // Get a list of Grafana teams registered to user, to get a list of system teams available and its details, check device endpoints
                array[GrafanaTeam] result = apiInstance.usersUsernameTeamsGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.usersUsernameTeamsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->usersUsernameTeamsGet(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->usersUsernameTeamsGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
username = username_example # String | a system registered account username

try: 
    # Get a list of Grafana teams registered to user, to get a list of system teams available and its details, check device endpoints
    api_response = api_instance.users_username_teams_get(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->usersUsernameTeamsGet: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required

Responses

Status: 200 - List of teams where the user is member (teams and dashboard folders where the user has access to view or edit)

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameTeamsGrafanaTeamIdDelete

Removes a user from a specific Grafana team, preventing the dashboard folder access.

this endpoint disables access to specific dashboard folder only if the user has an admin authorization level set to READ_ONLY or NO_ACCESS, device administrators will always have access to all dahsboards and dashboards folders in the default enfyo configuration. It is plausible to change this behavior mapping the grafana authorization to a new AuthCode. This endpoint is only available to device administrators.


/users/{username}/teams/{grafanaTeamId}

Usage and SDK Samples

curl -X DELETE\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}/teams/{grafanaTeamId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        Integer grafanaTeamId = 56; // Integer | a Grafana valid team id as available in team list
        try {
            TransactionResponse result = apiInstance.usersUsernameTeamsGrafanaTeamIdDelete(username, grafanaTeamId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsGrafanaTeamIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        String username = username_example; // String | a system registered account username
        Integer grafanaTeamId = 56; // Integer | a Grafana valid team id as available in team list
        try {
            TransactionResponse result = apiInstance.usersUsernameTeamsGrafanaTeamIdDelete(username, grafanaTeamId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsGrafanaTeamIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username
Integer *grafanaTeamId = 56; // a Grafana valid team id as available in team list

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

// Removes a user from a specific Grafana team, preventing the dashboard folder access.
[apiInstance usersUsernameTeamsGrafanaTeamIdDeleteWith:username
    grafanaTeamId:grafanaTeamId
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var username = username_example; // {{String}} a system registered account username
var grafanaTeamId = 56; // {{Integer}} a Grafana valid team id as available in team list

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var username = username_example;  // String | a system registered account username
            var grafanaTeamId = 56;  // Integer | a Grafana valid team id as available in team list

            try
            {
                // Removes a user from a specific Grafana team, preventing the dashboard folder access.
                TransactionResponse result = apiInstance.usersUsernameTeamsGrafanaTeamIdDelete(username, grafanaTeamId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.usersUsernameTeamsGrafanaTeamIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$username = username_example; // String | a system registered account username
$grafanaTeamId = 56; // Integer | a Grafana valid team id as available in team list

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $username = username_example; # String | a system registered account username
my $grafanaTeamId = 56; # Integer | a Grafana valid team id as available in team list

eval { 
    my $result = $api_instance->usersUsernameTeamsGrafanaTeamIdDelete(username => $username, grafanaTeamId => $grafanaTeamId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->usersUsernameTeamsGrafanaTeamIdDelete: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
username = username_example # String | a system registered account username
grafanaTeamId = 56 # Integer | a Grafana valid team id as available in team list

try: 
    # Removes a user from a specific Grafana team, preventing the dashboard folder access.
    api_response = api_instance.users_username_teams_grafana_team_id_delete(username, grafanaTeamId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->usersUsernameTeamsGrafanaTeamIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
grafanaTeamId*
Integer (int32)
a Grafana valid team id as available in team list
Required

Responses

Status: 200 - Response for the grafana team removal, message is received directly form the Grafana API

{"isOk":true,"message":"Team Member removed","status":200}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameTeamsPost

Add a user to a specific Grafana team, allowing dashboard folder access.

this endpoint enables access to specific dashboard folder if the user has an admin authorization level set to READ_ONLY or NO_ACCESS, administrators will always have access to all dahsboards and dashboards folders in the default enfyo configuration. It is plausible to change this behavior mapping the grafana authorization to a new AuthCode. This endpoint is only available to device administrators


/users/{username}/teams

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/users/{username}/teams"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountsApi;

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

public class AccountsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AccountsApi apiInstance = new AccountsApi();
        Username_teams_body body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
}; // Username_teams_body | object with team id where the user shall be added.
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.usersUsernameTeamsPost(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountsApi;

public class AccountsApiExample {

    public static void main(String[] args) {
        AccountsApi apiInstance = new AccountsApi();
        Username_teams_body body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
}; // Username_teams_body | object with team id where the user shall be added.
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.usersUsernameTeamsPost(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountsApi#usersUsernameTeamsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Username_teams_body *body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
}; // object with team id where the user shall be added.
String *username = username_example; // a system registered account username

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

// Add a user to a specific Grafana team, allowing dashboard folder access.
[apiInstance usersUsernameTeamsPostWith:body
    username:username
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AccountsApi()
var body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
}; // {{Username_teams_body}} object with team id where the user shall be added.
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AccountsApi();
            var body = new Username_teams_body(); // Username_teams_body | object with team id where the user shall be added.
            var username = username_example;  // String | a system registered account username

            try
            {
                // Add a user to a specific Grafana team, allowing dashboard folder access.
                TransactionResponse result = apiInstance.usersUsernameTeamsPost(body, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountsApi.usersUsernameTeamsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAccountsApi();
$body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
}; // Username_teams_body | object with team id where the user shall be added.
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::AccountsApi->new();
my $body = WWW::SwaggerClient::Object::Username_teams_body->new(); # Username_teams_body | object with team id where the user shall be added.
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->usersUsernameTeamsPost(body => $body, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountsApi->usersUsernameTeamsPost: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AccountsApi()
body = {
  "grafanaTeamId" : 42,
  "name" : "Site default Group"
} # Username_teams_body | object with team id where the user shall be added.
username = username_example # String | a system registered account username

try: 
    # Add a user to a specific Grafana team, allowing dashboard folder access.
    api_response = api_instance.users_username_teams_post(body, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->usersUsernameTeamsPost: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Simple response, message as sent by grafana API

{"isOk":true,"message":"user added to team"}

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 403 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 500 - Unexpected error


Assets

mastersAssetsAssetIdDelete

Deletes an asset by its assetId, this action cannot be undone. Asset deletion is restricted to users with device administration privileges.


/masters/assets/{assetId}

Usage and SDK Samples

curl -X DELETE\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/assets/{assetId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;

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

public class AssetsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AssetsApi apiInstance = new AssetsApi();
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            TransactionResponse result = apiInstance.mastersAssetsAssetIdDelete(assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AssetsApi;

public class AssetsApiExample {

    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            TransactionResponse result = apiInstance.mastersAssetsAssetIdDelete(assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *assetId = assetId_example; // string identificator for asset object

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

// Deletes an asset by its assetId, this action cannot be undone. Asset deletion is restricted to users with device administration privileges.
[apiInstance mastersAssetsAssetIdDeleteWith:assetId
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AssetsApi()
var assetId = assetId_example; // {{String}} string identificator for asset object

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AssetsApi();
            var assetId = assetId_example;  // String | string identificator for asset object

            try
            {
                // Deletes an asset by its assetId, this action cannot be undone. Asset deletion is restricted to users with device administration privileges.
                TransactionResponse result = apiInstance.mastersAssetsAssetIdDelete(assetId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetsApi.mastersAssetsAssetIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAssetsApi();
$assetId = assetId_example; // String | string identificator for asset object

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

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

my $api_instance = WWW::SwaggerClient::AssetsApi->new();
my $assetId = assetId_example; # String | string identificator for asset object

eval { 
    my $result = $api_instance->mastersAssetsAssetIdDelete(assetId => $assetId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->mastersAssetsAssetIdDelete: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AssetsApi()
assetId = assetId_example # String | string identificator for asset object

try: 
    # Deletes an asset by its assetId, this action cannot be undone. Asset deletion is restricted to users with device administration privileges.
    api_response = api_instance.masters_assets_asset_id_delete(assetId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->mastersAssetsAssetIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
assetId*
String
string identificator for asset object
Required

Responses

Status: 200 - Transaction response for the asset deletion, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersAssetsAssetIdGet

Get an asset by its assetId


/masters/assets/{assetId}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/assets/{assetId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;

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

public class AssetsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");


        AssetsApi apiInstance = new AssetsApi();
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            Asset result = apiInstance.mastersAssetsAssetIdGet(assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AssetsApi;

public class AssetsApiExample {

    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            Asset result = apiInstance.mastersAssetsAssetIdGet(assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *assetId = assetId_example; // string identificator for asset object

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

// Get an asset by its assetId
[apiInstance mastersAssetsAssetIdGetWith:assetId
              completionHandler: ^(Asset output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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


var api = new EnfyoDeviceApi.AssetsApi()
var assetId = assetId_example; // {{String}} string identificator for asset object

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AssetsApi();
            var assetId = assetId_example;  // String | string identificator for asset object

            try
            {
                // Get an asset by its assetId
                Asset result = apiInstance.mastersAssetsAssetIdGet(assetId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetsApi.mastersAssetsAssetIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAssetsApi();
$assetId = assetId_example; // String | string identificator for asset object

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

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

my $api_instance = WWW::SwaggerClient::AssetsApi->new();
my $assetId = assetId_example; # String | string identificator for asset object

eval { 
    my $result = $api_instance->mastersAssetsAssetIdGet(assetId => $assetId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->mastersAssetsAssetIdGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AssetsApi()
assetId = assetId_example # String | string identificator for asset object

try: 
    # Get an asset by its assetId
    api_response = api_instance.masters_assets_asset_id_get(assetId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->mastersAssetsAssetIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
assetId*
String
string identificator for asset object
Required

Responses

Status: 200 - Single Asset object according to requirement

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersAssetsAssetIdPut

Modifies an asset by its assetId, with the contents in the message body.


/masters/assets/{assetId}

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/assets/{assetId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;

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

public class AssetsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AssetsApi apiInstance = new AssetsApi();
        Asset body = ; // Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            TransactionResponse result = apiInstance.mastersAssetsAssetIdPut(body, assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AssetsApi;

public class AssetsApiExample {

    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        Asset body = ; // Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
        String assetId = assetId_example; // String | string identificator for asset object
        try {
            TransactionResponse result = apiInstance.mastersAssetsAssetIdPut(body, assetId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsAssetIdPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Asset *body = ; // object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
String *assetId = assetId_example; // string identificator for asset object

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

// Modifies an asset by its assetId, with the contents in the message body.
[apiInstance mastersAssetsAssetIdPutWith:body
    assetId:assetId
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AssetsApi()
var body = ; // {{Asset}} object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
var assetId = assetId_example; // {{String}} string identificator for asset object

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AssetsApi();
            var body = new Asset(); // Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
            var assetId = assetId_example;  // String | string identificator for asset object

            try
            {
                // Modifies an asset by its assetId, with the contents in the message body.
                TransactionResponse result = apiInstance.mastersAssetsAssetIdPut(body, assetId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetsApi.mastersAssetsAssetIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAssetsApi();
$body = ; // Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
$assetId = assetId_example; // String | string identificator for asset object

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

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

my $api_instance = WWW::SwaggerClient::AssetsApi->new();
my $body = WWW::SwaggerClient::Object::Asset->new(); # Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
my $assetId = assetId_example; # String | string identificator for asset object

eval { 
    my $result = $api_instance->mastersAssetsAssetIdPut(body => $body, assetId => $assetId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->mastersAssetsAssetIdPut: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AssetsApi()
body =  # Asset | object with asset properties to modify, assetId cannot be changed and it's readonly from its creation. Asset edition is restricted to users with device administration privileges.
assetId = assetId_example # String | string identificator for asset object

try: 
    # Modifies an asset by its assetId, with the contents in the message body.
    api_response = api_instance.masters_assets_asset_id_put(body, assetId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->mastersAssetsAssetIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
assetId*
String
string identificator for asset object
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the asset edition, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersAssetsGet

Get a list of Assets registered in the Local Enfyo system


/masters/assets

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/assets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;

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

public class AssetsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");


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

public class AssetsApiExample {

    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        try {
            array[Asset] result = apiInstance.mastersAssetsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get a list of Assets registered in the Local Enfyo system
[apiInstance mastersAssetsGetWithCompletionHandler: 
              ^(array[Asset] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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


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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AssetsApi();

            try
            {
                // Get a list of Assets registered in the Local Enfyo system
                array[Asset] result = apiInstance.mastersAssetsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetsApi.mastersAssetsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->mastersAssetsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->mastersAssetsGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get a list of Assets registered in the Local Enfyo system
    api_response = api_instance.masters_assets_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->mastersAssetsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Full list of assets registered in the current Enfyo system

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersAssetsPost

Create a new Asset from the contents in body


/masters/assets

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/assets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;

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

public class AssetsApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        AssetsApi apiInstance = new AssetsApi();
        Asset body = ; // Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.
        try {
            TransactionResponse result = apiInstance.mastersAssetsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AssetsApi;

public class AssetsApiExample {

    public static void main(String[] args) {
        AssetsApi apiInstance = new AssetsApi();
        Asset body = ; // Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.
        try {
            TransactionResponse result = apiInstance.mastersAssetsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssetsApi#mastersAssetsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Asset *body = ; // object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

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

// Create a new Asset from the contents in body
[apiInstance mastersAssetsPostWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.AssetsApi()
var body = ; // {{Asset}} object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new AssetsApi();
            var body = new Asset(); // Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

            try
            {
                // Create a new Asset from the contents in body
                TransactionResponse result = apiInstance.mastersAssetsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetsApi.mastersAssetsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiAssetsApi();
$body = ; // Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

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

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

my $api_instance = WWW::SwaggerClient::AssetsApi->new();
my $body = WWW::SwaggerClient::Object::Asset->new(); # Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

eval { 
    my $result = $api_instance->mastersAssetsPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AssetsApi->mastersAssetsPost: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AssetsApi()
body =  # Asset | object describing a new asset, assetId is string and must be unique, it is recommended to use a descriptiong name, and exclude spaces and special characters. Asset creation is restricted to users with device administration privileges.

try: 
    # Create a new Asset from the contents in body
    api_response = api_instance.masters_assets_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AssetsApi->mastersAssetsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Transaction response for the asset creation

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


InstallationSite

deviceEnfyoGet

Get details for the Enfyo Device being managed

Available to all valid device users. Get the details for the local Enfyo device being managed. additionally a name and description are available for user information.


/device/enfyo

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/device/enfyo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        try {
            Enfyo result = apiInstance.deviceEnfyoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#deviceEnfyoGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get details for the Enfyo Device being managed
[apiInstance deviceEnfyoGetWithCompletionHandler: 
              ^(Enfyo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();

            try
            {
                // Get details for the Enfyo Device being managed
                Enfyo result = apiInstance.deviceEnfyoGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.deviceEnfyoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->deviceEnfyoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->deviceEnfyoGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get details for the Enfyo Device being managed
    api_response = api_instance.device_enfyo_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->deviceEnfyoGet: %s\n" % e)

Parameters

Responses

Status: 200 - Enfyo router information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


editEnfyoParams

Edit details for Enfyo global properties

Edit the details for the local Enfyo or edit global IoT parameters for the local device. Name and description are available for user information, and sampling periods can be configured in this object. Available only to device administrators.


/device/enfyo

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/device/enfyo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Enfyo body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
}; // Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.
        try {
            TransactionResponse result = apiInstance.editEnfyoParams(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#editEnfyoParams");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstallationSiteApi;

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Enfyo body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
}; // Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.
        try {
            TransactionResponse result = apiInstance.editEnfyoParams(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#editEnfyoParams");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Enfyo *body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
}; // object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

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

// Edit details for Enfyo global properties
[apiInstance editEnfyoParamsWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.InstallationSiteApi()
var body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
}; // {{Enfyo}} object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();
            var body = new Enfyo(); // Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

            try
            {
                // Edit details for Enfyo global properties
                TransactionResponse result = apiInstance.editEnfyoParams(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.editEnfyoParams: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInstallationSiteApi();
$body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
}; // Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

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

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

my $api_instance = WWW::SwaggerClient::InstallationSiteApi->new();
my $body = WWW::SwaggerClient::Object::Enfyo->new(); # Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

eval { 
    my $result = $api_instance->editEnfyoParams(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->editEnfyoParams: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstallationSiteApi()
body = {
  "name" : "Enfyo New DeviceName",
  "description" : "long description for enfyo device",
  "secondsToFLush" : 15,
  "secondsToSample" : 1
} # Enfyo | object with one or more enfyo parameters to modify. Only name, description, secondsToSample and secondsToFLush modified, the protected fields are configured in fabrication time and cannot be modified.

try: 
    # Edit details for Enfyo global properties
    api_response = api_instance.edit_enfyo_params(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->editEnfyoParams: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the Orgenfyo parameters edit, contains message to user confirming updates in system

{"isOk":true,"affectedRows":1,"info":"Rows matched: 1  Changed: 0  Warnings: 0","message":"Device was updated successfully."}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


orgsLocalGet

Get details for the local organization

Available to all valid device users. Save the details about the organization and management data, this information is locally storaged and only synced to cloud under explicit request


/orgs/local

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/orgs/local"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        try {
            Org result = apiInstance.orgsLocalGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#orgsLocalGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get details for the local organization
[apiInstance orgsLocalGetWithCompletionHandler: 
              ^(Org output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();

            try
            {
                // Get details for the local organization
                Org result = apiInstance.orgsLocalGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.orgsLocalGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->orgsLocalGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->orgsLocalGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get details for the local organization
    api_response = api_instance.orgs_local_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->orgsLocalGet: %s\n" % e)

Parameters

Responses

Status: 200 - Local Org details

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


orgsLocalPut

Edit Organization information

Edit general information about the local organization, this information is locally storaged and only synced to cloud under explicit request. Available only to admin users


/orgs/local

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/orgs/local"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Org body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
}; // Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.
        try {
            TransactionResponse result = apiInstance.orgsLocalPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#orgsLocalPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstallationSiteApi;

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Org body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
}; // Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.
        try {
            TransactionResponse result = apiInstance.orgsLocalPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#orgsLocalPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Org *body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
}; // Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

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

// Edit Organization information 
[apiInstance orgsLocalPutWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.InstallationSiteApi()
var body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
}; // {{Org}} Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();
            var body = new Org(); // Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

            try
            {
                // Edit Organization information 
                TransactionResponse result = apiInstance.orgsLocalPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.orgsLocalPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInstallationSiteApi();
$body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
}; // Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

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

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

my $api_instance = WWW::SwaggerClient::InstallationSiteApi->new();
my $body = WWW::SwaggerClient::Object::Org->new(); # Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

eval { 
    my $result = $api_instance->orgsLocalPut(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->orgsLocalPut: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstallationSiteApi()
body = {
  "name" : "Local Org",
  "city" : "string",
  "country_code" : "ES",
  "description" : "new description for company or organization"
} # Org | Object with one or more org properties to modify. Only name, address, city, country and description can be modified. The protected fields are system administrated and shall not be edited.

try: 
    # Edit Organization information 
    api_response = api_instance.orgs_local_put(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->orgsLocalPut: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the Org edition, contains message to user confirming updates in system and grafana databases

{"isOk":true,"affectedRows":1,"message":"org information successfully updated"}
{"isOk":true,"affectedRows":1,"message":"org information successfully updated","usersUpd":{"changedRows":2},"grafanaUpd":{"message":"Organization updated"}}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


sitesLocalDashFolderGet

Get general details for the default grafana local installation folder

Available to all valid device users, shows a general information for the default Grafana folder for the local site.


/sites/local/dashFolder

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/sites/local/dashFolder"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        try {
            GrafanaFolder result = apiInstance.sitesLocalDashFolderGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalDashFolderGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get general details for the default grafana local installation folder
[apiInstance sitesLocalDashFolderGetWithCompletionHandler: 
              ^(GrafanaFolder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();

            try
            {
                // Get general details for the default grafana local installation folder
                GrafanaFolder result = apiInstance.sitesLocalDashFolderGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.sitesLocalDashFolderGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->sitesLocalDashFolderGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->sitesLocalDashFolderGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get general details for the default grafana local installation folder
    api_response = api_instance.sites_local_dash_folder_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->sitesLocalDashFolderGet: %s\n" % e)

Parameters

Responses

Status: 200 - Installation Dashboard Folder Details

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


sitesLocalDashboardsDashboardUidGet

Get general information for a local dashboard

Available to all valid device users, shows the detailed json model for the dashboard required. To request for the default dashboard in the local installation folder use "main" as the uid parameter.


/sites/local/dashboards/{dashboardUid}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/sites/local/dashboards/{dashboardUid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        InstallationSiteApi apiInstance = new InstallationSiteApi();
        String dashboardUid = dashboardUid_example; // String | a valid and accesible Grafana dashboard Uid
        try {
            GrafanaDashObj result = apiInstance.sitesLocalDashboardsDashboardUidGet(dashboardUid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalDashboardsDashboardUidGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstallationSiteApi;

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        String dashboardUid = dashboardUid_example; // String | a valid and accesible Grafana dashboard Uid
        try {
            GrafanaDashObj result = apiInstance.sitesLocalDashboardsDashboardUidGet(dashboardUid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalDashboardsDashboardUidGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *dashboardUid = dashboardUid_example; // a valid and accesible Grafana dashboard Uid

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

// Get general information for a local dashboard
[apiInstance sitesLocalDashboardsDashboardUidGetWith:dashboardUid
              completionHandler: ^(GrafanaDashObj output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.InstallationSiteApi()
var dashboardUid = dashboardUid_example; // {{String}} a valid and accesible Grafana dashboard Uid

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();
            var dashboardUid = dashboardUid_example;  // String | a valid and accesible Grafana dashboard Uid

            try
            {
                // Get general information for a local dashboard
                GrafanaDashObj result = apiInstance.sitesLocalDashboardsDashboardUidGet(dashboardUid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.sitesLocalDashboardsDashboardUidGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInstallationSiteApi();
$dashboardUid = dashboardUid_example; // String | a valid and accesible Grafana dashboard Uid

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

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

my $api_instance = WWW::SwaggerClient::InstallationSiteApi->new();
my $dashboardUid = dashboardUid_example; # String | a valid and accesible Grafana dashboard Uid

eval { 
    my $result = $api_instance->sitesLocalDashboardsDashboardUidGet(dashboardUid => $dashboardUid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->sitesLocalDashboardsDashboardUidGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstallationSiteApi()
dashboardUid = dashboardUid_example # String | a valid and accesible Grafana dashboard Uid

try: 
    # Get general information for a local dashboard
    api_response = api_instance.sites_local_dashboards_dashboard_uid_get(dashboardUid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->sitesLocalDashboardsDashboardUidGet: %s\n" % e)

Parameters

Path parameters
Name Description
dashboardUid*
String
a valid and accesible Grafana dashboard Uid
Required

Responses

Status: 200 - Installation Dashboard list

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


sitesLocalDashboardsGet

Get a list of dashboards in the local site folder

Available to all valid device users, shows a detailed list of dashboards in the default Grafana folder for the local site.


/sites/local/dashboards

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/sites/local/dashboards"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        try {
            array[GrafanaDashObj] result = apiInstance.sitesLocalDashboardsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalDashboardsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get a list of dashboards in the local site folder
[apiInstance sitesLocalDashboardsGetWithCompletionHandler: 
              ^(array[GrafanaDashObj] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();

            try
            {
                // Get a list of dashboards in the local site folder
                array[GrafanaDashObj] result = apiInstance.sitesLocalDashboardsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.sitesLocalDashboardsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->sitesLocalDashboardsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->sitesLocalDashboardsGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get a list of dashboards in the local site folder
    api_response = api_instance.sites_local_dashboards_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->sitesLocalDashboardsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Installation Dashboard list

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


sitesLocalGet

Get details for the installation site

Available to all valid device users, details about the installation site records notes and location about the installation site, this information is locally storaged and only synced to cloud under explicit request


/sites/local

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/sites/local"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        try {
            Site result = apiInstance.sitesLocalGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get details for the installation site
[apiInstance sitesLocalGetWithCompletionHandler: 
              ^(Site output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();

            try
            {
                // Get details for the installation site
                Site result = apiInstance.sitesLocalGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.sitesLocalGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->sitesLocalGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->sitesLocalGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get details for the installation site
    api_response = api_instance.sites_local_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->sitesLocalGet: %s\n" % e)

Parameters

Responses

Status: 200 - Installation Site details

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


sitesLocalPut

Edit Site installation details

Edit details for the installation site including location about the installation site, this information is locally storaged and only synced to cloud under explicit request. Available only to administrators.


/sites/local

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/sites/local"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstallationSiteApi;

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

public class InstallationSiteApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Site body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
}; // Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.
        try {
            TransactionResponse result = apiInstance.sitesLocalPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstallationSiteApi;

public class InstallationSiteApiExample {

    public static void main(String[] args) {
        InstallationSiteApi apiInstance = new InstallationSiteApi();
        Site body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
}; // Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.
        try {
            TransactionResponse result = apiInstance.sitesLocalPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstallationSiteApi#sitesLocalPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Site *body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
}; // object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

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

// Edit Site installation details
[apiInstance sitesLocalPutWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.InstallationSiteApi()
var body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
}; // {{Site}} object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new InstallationSiteApi();
            var body = new Site(); // Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

            try
            {
                // Edit Site installation details
                TransactionResponse result = apiInstance.sitesLocalPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstallationSiteApi.sitesLocalPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiInstallationSiteApi();
$body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
}; // Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

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

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

my $api_instance = WWW::SwaggerClient::InstallationSiteApi->new();
my $body = WWW::SwaggerClient::Object::Site->new(); # Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

eval { 
    my $result = $api_instance->sitesLocalPut(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstallationSiteApi->sitesLocalPut: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InstallationSiteApi()
body = {
  "name" : "Instalacion uno",
  "locationLat" : 43.215695171838654,
  "locationLong" : -1.9131374363496438,
  "locationAddr" : "street name, 1434, CityName, Countryname, CP 202R45",
  "country_code" : "ES"
} # Site | object with one or more site properties to modify. Only name, location address and country can be edited, theprotected fields are administrated by the system and shall not be edited.

try: 
    # Edit Site installation details
    api_response = api_instance.sites_local_put(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstallationSiteApi->sitesLocalPut: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the Site edition, contains message to user confirming updates in system and grafana databases

{"isOk":true,"affectedRows":1,"message":"the site data & name has been updated succesfully","folderUpd":{"id":66,"title":"new group name"},"teamUpd":{"message":"Team updated"}}
{"isOk":true,"affectedRows":1,"message":"the site data has been updated succesfully"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


Login

login

Standard login endpoint for the user in body.

The API provides endpoints for clear and hashed password login and account creation, clear password usage is discouraged to improve user information in unsafe environments. This endpoint responds with the header information required to use the API as well as the token and user information for the session opened


/auth/logIn

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/auth/logIn"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        Auth_logIn_body body = ; // Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.
        try {
            LoginObject result = apiInstance.login(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#login");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        Auth_logIn_body body = ; // Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.
        try {
            LoginObject result = apiInstance.login(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#login");
            e.printStackTrace();
        }
    }
}
Auth_logIn_body *body = ; // Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

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

// Standard login endpoint for the user in body.
[apiInstance loginWith:body
              completionHandler: ^(LoginObject output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');

var api = new EnfyoDeviceApi.LoginApi()
var body = ; // {{Auth_logIn_body}} Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

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

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

            var apiInstance = new LoginApi();
            var body = new Auth_logIn_body(); // Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

            try
            {
                // Standard login endpoint for the user in body.
                LoginObject result = apiInstance.login(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.login: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();
$body = ; // Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $body = WWW::SwaggerClient::Object::Auth_logIn_body->new(); # Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

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

# create an instance of the API class
api_instance = swagger_client.LoginApi()
body =  # Auth_logIn_body | Object to login in to the local system, email is optional. password must be hashed (SHA-256). In case your application does not support the hashing algorithm, you can use the logInClear endpoint.

try: 
    # Standard login endpoint for the user in body.
    api_response = api_instance.login(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->login: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - After a successful login the returned object will contain the generic information about the user, opened session, and current access permissions. The JWT JSON Web Token is contained in the accessToken value, this Token will be asked in all petitions to the server in the x-access-token header.

Status: 404 - Login Error - probably due to username or password error, or by inexistant account, check error message for detailed information.

{"isOk":false,"message":"Login error in auth.controller.userLogIn: User not Found"}

Status: 500 - Unexpected error - server error processing the request, usually error message or source_message in error object gives enough information to solve most common error sources.

{"isOk":false,"message":"Login error: user failure","source_message":"User object corrupted"}

loginclear

Login endpoint for usage with clear password in the user in body.

The API provides endpoints for clear and hashed password login and account creation, clear password usage is discouraged to improve user information in unsafe environments. This endpoint responds with the header information required to use the API as well as the token and user information for the session opened


/auth/logInClear

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/auth/logInClear"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        Auth_logInClear_body body = ; // Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.
        try {
            LoginObject result = apiInstance.loginclear(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginclear");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        Auth_logInClear_body body = ; // Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.
        try {
            LoginObject result = apiInstance.loginclear(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginclear");
            e.printStackTrace();
        }
    }
}
Auth_logInClear_body *body = ; // object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

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

// Login endpoint for usage with clear password in the user in body.
[apiInstance loginclearWith:body
              completionHandler: ^(LoginObject output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');

var api = new EnfyoDeviceApi.LoginApi()
var body = ; // {{Auth_logInClear_body}} object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

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

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

            var apiInstance = new LoginApi();
            var body = new Auth_logInClear_body(); // Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

            try
            {
                // Login endpoint for usage with clear password in the user in body.
                LoginObject result = apiInstance.loginclear(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.loginclear: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();
$body = ; // Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $body = WWW::SwaggerClient::Object::Auth_logInClear_body->new(); # Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

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

# create an instance of the API class
api_instance = swagger_client.LoginApi()
body =  # Auth_logInClear_body | object to login in to the local system. password must be clear (not SHA-256 hashed). If you need to login with hashed password, use the standard login endpoint instead.

try: 
    # Login endpoint for usage with clear password in the user in body.
    api_response = api_instance.loginclear(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->loginclear: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - After a successful login the returned object will contain the generic information about the user, opened session, and current access permissions. The JWT JSON Web Token is contained in the accessToken value, this Token will be asked in all petitions to the server in the x-access-token header.

Status: 403 - Login Error - probably due to username or password error, or by inexistant account, check error message for detailed information.

{"isOk":false,"message":"Login error in auth.controller.userLogIn: User not Found"}

Status: 500 - Unexpected error - server error processing the request, usually error message or source_message in error object gives enough information to solve most common error sources.

{"isOk":false,"message":"Login error: user failure","source_message":"User object corrupted"}

renewSession

Session renew endpoint

Endpoint for renew of current session in server side, it validates the JsonWebToken in and generates a new Token with a new expiry. No user or password is required to renew session, only JWT in header.


/auth/keepalive

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/auth/keepalive"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        LoginApi apiInstance = new LoginApi();
        String xAccessToken = xAccessToken_example; // String | Valid and active session's JSON Web Token to renew.
        try {
            inline_response_200 result = apiInstance.renewSession(xAccessToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#renewSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        String xAccessToken = xAccessToken_example; // String | Valid and active session's JSON Web Token to renew.
        try {
            inline_response_200 result = apiInstance.renewSession(xAccessToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#renewSession");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *xAccessToken = xAccessToken_example; // Valid and active session's JSON Web Token to renew.

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

// Session renew endpoint
[apiInstance renewSessionWith:xAccessToken
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.LoginApi()
var xAccessToken = xAccessToken_example; // {{String}} Valid and active session's JSON Web Token to renew.

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new LoginApi();
            var xAccessToken = xAccessToken_example;  // String | Valid and active session's JSON Web Token to renew.

            try
            {
                // Session renew endpoint
                inline_response_200 result = apiInstance.renewSession(xAccessToken);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.renewSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiLoginApi();
$xAccessToken = xAccessToken_example; // String | Valid and active session's JSON Web Token to renew.

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

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $xAccessToken = xAccessToken_example; # String | Valid and active session's JSON Web Token to renew.

eval { 
    my $result = $api_instance->renewSession(xAccessToken => $xAccessToken);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoginApi->renewSession: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LoginApi()
xAccessToken = xAccessToken_example # String | Valid and active session's JSON Web Token to renew.

try: 
    # Session renew endpoint
    api_response = api_instance.renew_session(xAccessToken)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->renewSession: %s\n" % e)

Parameters

Header parameters
Name Description
x-access-token*
String (jwt)
Valid and active session's JSON Web Token to renew.
Required

Responses

Status: 200 - Session renew response information object

Status: 400 - Request error

{"isOk":false,"message":"session expired or inexistent"}

Status: 500 - Unexpected server error

{"isOk":false,"message":"Session extension error","source_message":"Failed to fetch session object"}

rootGet

Welcome message to the API

This endpoint can be used as a global test, it is published in the first stages of the server init.


/

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"http://192.168.1.116:8080/api/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;

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

public class LoginApiExample {

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

public class LoginApiExample {

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

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

// Welcome message to the API
[apiInstance rootGetWithCompletionHandler: 
              ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');

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

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

            var apiInstance = new LoginApi();

            try
            {
                // Welcome message to the API
                TransactionResponse result = apiInstance.rootGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.rootGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Welcome message to the API
    api_response = api_instance.root_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->rootGet: %s\n" % e)

Parameters

Responses

Status: 200 - After a successful login the returned object will contain the generic information about the user, opened session, and current access permissions. The JWT JSON Web Token is contained in the accessToken value, this Token will be asked in all petitions to the server in the x-access-token header.

{"message":"Welcome to the Enfyo HTTP API."}

Status: 500 - Unexpected error - server error it will appear if the server has a severe error, or it is experiencing a global failure. If you are receiving this message in the root endpoint, please contact support services.

Unexpected internal server error
{"isOk":false,"message":"System cannot be initialized due to a detected clock error","source_message":"invalid date!"}

Masters

mastersAuthCodesGet

Get a list of valid AuthCodes and its descripotion in the running system, the list of Authorization Codes and its properties, including the description string are readonly and static for the entire system


/masters/authCodes

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/authCodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        try {
            array[AuthCode] result = apiInstance.mastersAuthCodesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersAuthCodesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get a list of valid AuthCodes and its descripotion in the running system, the list of Authorization Codes and its properties, including the description string are readonly and static for the entire system
[apiInstance mastersAuthCodesGetWithCompletionHandler: 
              ^(array[AuthCode] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();

            try
            {
                // Get a list of valid AuthCodes and its descripotion in the running system, the list of Authorization Codes and its properties, including the description string are readonly and static for the entire system
                array[AuthCode] result = apiInstance.mastersAuthCodesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersAuthCodesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->mastersAuthCodesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersAuthCodesGet: $@\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: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get a list of valid AuthCodes and its descripotion in the running system, the list of Authorization Codes and its properties, including the description string are readonly and static for the entire system
    api_response = api_instance.masters_auth_codes_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersAuthCodesGet: %s\n" % e)

Parameters

Responses

Status: 200 - Full list of valid authorization codes

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersAuthLevelsGet

Get a list of compatible Authorization Level codes and its description in the running system, the list of Authorization levels and its properties, including the description string are readonly and static for the entire system


/masters/authLevels

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/authLevels"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        try {
            array[AuthLevel] result = apiInstance.mastersAuthLevelsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersAuthLevelsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Get a list of compatible Authorization Level codes and its description in the running system, the list of Authorization levels and its properties, including the description string are readonly and static for the entire system
[apiInstance mastersAuthLevelsGetWithCompletionHandler: 
              ^(array[AuthLevel] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();

            try
            {
                // Get a list of compatible Authorization Level codes and its description in the running system, the list of Authorization levels and its properties, including the description string are readonly and static for the entire system
                array[AuthLevel] result = apiInstance.mastersAuthLevelsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersAuthLevelsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->mastersAuthLevelsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersAuthLevelsGet: $@\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: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Get a list of compatible Authorization Level codes and its description in the running system, the list of Authorization levels and its properties, including the description string are readonly and static for the entire system
    api_response = api_instance.masters_auth_levels_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersAuthLevelsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Full list of valid authorization levels

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersCountriesAlpha2CodeGet

Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties


/masters/countries/{alpha2Code}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/countries/{alpha2Code}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        MastersApi apiInstance = new MastersApi();
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            Country result = apiInstance.mastersCountriesAlpha2CodeGet(alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersCountriesAlpha2CodeGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersApi;

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            Country result = apiInstance.mastersCountriesAlpha2CodeGet(alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersCountriesAlpha2CodeGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *alpha2Code = alpha2Code_example; // 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

// Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
[apiInstance mastersCountriesAlpha2CodeGetWith:alpha2Code
              completionHandler: ^(Country output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

var api = new EnfyoDeviceApi.MastersApi()
var alpha2Code = alpha2Code_example; // {{String}} 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();
            var alpha2Code = alpha2Code_example;  // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

            try
            {
                // Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
                Country result = apiInstance.mastersCountriesAlpha2CodeGet(alpha2Code);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersCountriesAlpha2CodeGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersApi();
$alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

my $api_instance = WWW::SwaggerClient::MastersApi->new();
my $alpha2Code = alpha2Code_example; # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

eval { 
    my $result = $api_instance->mastersCountriesAlpha2CodeGet(alpha2Code => $alpha2Code);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersCountriesAlpha2CodeGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersApi()
alpha2Code = alpha2Code_example # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

try: 
    # Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
    api_response = api_instance.masters_countries_alpha2_code_get(alpha2Code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersCountriesAlpha2CodeGet: %s\n" % e)

Parameters

Path parameters
Name Description
alpha2Code*
String
2-characters identificator for country, according to ISO 3166-1 alpha2codes
Required

Responses

Status: 200 - Object details for requested country

{"name":"Spain","alpha2Code":"ES","alpha3Code":"ESP","numCode":724,"locationLat":40.46366882324219,"locationLong":-3.7492198944091797}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersCountriesGet

Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties


/masters/countries

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/countries?name=&alpha2Code=&alpha3Code="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        MastersApi apiInstance = new MastersApi();
        String name = name_example; // String | Search field for country name
        String alpha2Code = alpha2Code_example; // String | Search field forcountry alpha2code
        String alpha3Code = alpha3Code_example; // String | Search field for country alpha3code
        try {
            array[Country] result = apiInstance.mastersCountriesGet(name, alpha2Code, alpha3Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersCountriesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersApi;

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        String name = name_example; // String | Search field for country name
        String alpha2Code = alpha2Code_example; // String | Search field forcountry alpha2code
        String alpha3Code = alpha3Code_example; // String | Search field for country alpha3code
        try {
            array[Country] result = apiInstance.mastersCountriesGet(name, alpha2Code, alpha3Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersCountriesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *name = name_example; // Search field for country name (optional)
String *alpha2Code = alpha2Code_example; // Search field forcountry alpha2code (optional)
String *alpha3Code = alpha3Code_example; // Search field for country alpha3code (optional)

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

// Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
[apiInstance mastersCountriesGetWith:name
    alpha2Code:alpha2Code
    alpha3Code:alpha3Code
              completionHandler: ^(array[Country] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

var api = new EnfyoDeviceApi.MastersApi()
var opts = { 
  'name': name_example, // {{String}} Search field for country name
  'alpha2Code': alpha2Code_example, // {{String}} Search field forcountry alpha2code
  'alpha3Code': alpha3Code_example // {{String}} Search field for country alpha3code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.mastersCountriesGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();
            var name = name_example;  // String | Search field for country name (optional) 
            var alpha2Code = alpha2Code_example;  // String | Search field forcountry alpha2code (optional) 
            var alpha3Code = alpha3Code_example;  // String | Search field for country alpha3code (optional) 

            try
            {
                // Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
                array[Country] result = apiInstance.mastersCountriesGet(name, alpha2Code, alpha3Code);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersCountriesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersApi();
$name = name_example; // String | Search field for country name
$alpha2Code = alpha2Code_example; // String | Search field forcountry alpha2code
$alpha3Code = alpha3Code_example; // String | Search field for country alpha3code

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

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

my $api_instance = WWW::SwaggerClient::MastersApi->new();
my $name = name_example; # String | Search field for country name
my $alpha2Code = alpha2Code_example; # String | Search field forcountry alpha2code
my $alpha3Code = alpha3Code_example; # String | Search field for country alpha3code

eval { 
    my $result = $api_instance->mastersCountriesGet(name => $name, alpha2Code => $alpha2Code, alpha3Code => $alpha3Code);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersCountriesGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersApi()
name = name_example # String | Search field for country name (optional)
alpha2Code = alpha2Code_example # String | Search field forcountry alpha2code (optional)
alpha3Code = alpha3Code_example # String | Search field for country alpha3code (optional)

try: 
    # Get a list of system loaded countries and its properties for the must part the list is a variation of the ISO 3166-1 standard with extended description and location properties
    api_response = api_instance.masters_countries_get(name=name, alpha2Code=alpha2Code, alpha3Code=alpha3Code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersCountriesGet: %s\n" % e)

Parameters

Query parameters
Name Description
name
String
Search field for country name
alpha2Code
String
Search field forcountry alpha2code
alpha3Code
String
Search field for country alpha3code

Responses

Status: 200 - Full list of existing countries

[{"name":"Spain","alpha2Code":"ES","alpha3Code":"ESP","numCode":724,"locationLat":40.46366882324219,"locationLong":-3.7492198944091797},{"name":"France","alpha2Code":"FR","alpha3Code":"FRA","numCode":250,"locationLat":46.227638244628906,"locationLong":2.2137489318847656}]

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersGraphGroupsGet

shows a list of GraphGroups available in the system including enabled and disabled groups. This list varies depending on the software version installed


/masters/graphGroups

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/graphGroups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        try {
            array[GraphGroup] result = apiInstance.mastersGraphGroupsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersGraphGroupsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// shows a list of GraphGroups available in the system including enabled and disabled groups. This list varies depending on the software version installed
[apiInstance mastersGraphGroupsGetWithCompletionHandler: 
              ^(array[GraphGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();

            try
            {
                // shows a list of GraphGroups available in the system including enabled and disabled groups. This list varies depending on the software version installed
                array[GraphGroup] result = apiInstance.mastersGraphGroupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersGraphGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->mastersGraphGroupsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersGraphGroupsGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # shows a list of GraphGroups available in the system including enabled and disabled groups. This list varies depending on the software version installed
    api_response = api_instance.masters_graph_groups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersGraphGroupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Complete list of Graphic groups available in the device software version

[{"id":"MainControl","enabled":true,"config":{"showHistoryButton":true,"states":["workingMode"]}},{"id":"StandardBattery1","caption":"Installation Battery","description":"max. discharge power 4200W","enabled":true}]

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersGraphGroupsGraphGroupIdGet

Get a list of system preloaded graphgroups and its properties. Objects cannot be added or deleted as the realtime monitor of the web application is tightly coupled with this list


/masters/graphGroups/{graphGroupId}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/graphGroups/{graphGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        MastersApi apiInstance = new MastersApi();
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            GraphGroup result = apiInstance.mastersGraphGroupsGraphGroupIdGet(graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersGraphGroupsGraphGroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersApi;

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            GraphGroup result = apiInstance.mastersGraphGroupsGraphGroupIdGet(graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersGraphGroupsGraphGroupIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *graphGroupId = graphGroupId_example; // static GraphGroup identificator

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

// Get a list of system preloaded graphgroups and its properties. Objects cannot be added or deleted as the realtime monitor of the web application is tightly coupled with this list
[apiInstance mastersGraphGroupsGraphGroupIdGetWith:graphGroupId
              completionHandler: ^(GraphGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersApi()
var graphGroupId = graphGroupId_example; // {{String}} static GraphGroup identificator

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

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

            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();
            var graphGroupId = graphGroupId_example;  // String | static GraphGroup identificator

            try
            {
                // Get a list of system preloaded graphgroups and its properties. Objects cannot be added or deleted as the realtime monitor of the web application is tightly coupled with this list
                GraphGroup result = apiInstance.mastersGraphGroupsGraphGroupIdGet(graphGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersGraphGroupsGraphGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersApi();
$graphGroupId = graphGroupId_example; // String | static GraphGroup identificator

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

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

my $api_instance = WWW::SwaggerClient::MastersApi->new();
my $graphGroupId = graphGroupId_example; # String | static GraphGroup identificator

eval { 
    my $result = $api_instance->mastersGraphGroupsGraphGroupIdGet(graphGroupId => $graphGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersGraphGroupsGraphGroupIdGet: $@\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: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersApi()
graphGroupId = graphGroupId_example # String | static GraphGroup identificator

try: 
    # Get a list of system preloaded graphgroups and its properties. Objects cannot be added or deleted as the realtime monitor of the web application is tightly coupled with this list
    api_response = api_instance.masters_graph_groups_graph_group_id_get(graphGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersGraphGroupsGraphGroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
graphGroupId*
String
static GraphGroup identificator
Required

Responses

Status: 200 - Object details for requested GraphGroup

{"id":"ChargeControler1","caption":"Standard generic Solar charge controller","enabled":true}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersGraphGroupsGraphGroupIdPut

Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly


/masters/graphGroups/{graphGroupId}

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/graphGroups/{graphGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersApi;

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

public class MastersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        MastersApi apiInstance = new MastersApi();
        GraphGroup body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
}; // GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdPut(body, graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersGraphGroupsGraphGroupIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersApi;

public class MastersApiExample {

    public static void main(String[] args) {
        MastersApi apiInstance = new MastersApi();
        GraphGroup body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
}; // GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdPut(body, graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersApi#mastersGraphGroupsGraphGroupIdPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
GraphGroup *body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
}; // object with GraphGroup properties to modify, id is ReadOnly.
String *graphGroupId = graphGroupId_example; // static GraphGroup identificator

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

// Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
[apiInstance mastersGraphGroupsGraphGroupIdPutWith:body
    graphGroupId:graphGroupId
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.MastersApi()
var body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
}; // {{GraphGroup}} object with GraphGroup properties to modify, id is ReadOnly.
var graphGroupId = graphGroupId_example; // {{String}} static GraphGroup identificator

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersApi();
            var body = new GraphGroup(); // GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
            var graphGroupId = graphGroupId_example;  // String | static GraphGroup identificator

            try
            {
                // Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
                TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdPut(body, graphGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersApi.mastersGraphGroupsGraphGroupIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersApi();
$body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
}; // GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
$graphGroupId = graphGroupId_example; // String | static GraphGroup identificator

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

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

my $api_instance = WWW::SwaggerClient::MastersApi->new();
my $body = WWW::SwaggerClient::Object::GraphGroup->new(); # GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
my $graphGroupId = graphGroupId_example; # String | static GraphGroup identificator

eval { 
    my $result = $api_instance->mastersGraphGroupsGraphGroupIdPut(body => $body, graphGroupId => $graphGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersApi->mastersGraphGroupsGraphGroupIdPut: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersApi()
body = {
  "caption" : "Luxury superfast solar charge controller",
  "enabled" : true
} # GraphGroup | object with GraphGroup properties to modify, id is ReadOnly.
graphGroupId = graphGroupId_example # String | static GraphGroup identificator

try: 
    # Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
    api_response = api_instance.masters_graph_groups_graph_group_id_put(body, graphGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersApi->mastersGraphGroupsGraphGroupIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
graphGroupId*
String
static GraphGroup identificator
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the GraphGroup edition, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


MastersRestricted

mastersCountriesAlpha2CodeDelete

Restricted endpoint that deletes a specific country object, by its alpha2Code


/masters/countries/{alpha2Code}

Usage and SDK Samples

curl -X DELETE\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/countries/{alpha2Code}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersRestrictedApi;

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

public class MastersRestrictedApiExample {

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

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            TransactionResponse result = apiInstance.mastersCountriesAlpha2CodeDelete(alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesAlpha2CodeDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersRestrictedApi;

public class MastersRestrictedApiExample {

    public static void main(String[] args) {
        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            TransactionResponse result = apiInstance.mastersCountriesAlpha2CodeDelete(alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesAlpha2CodeDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *alpha2Code = alpha2Code_example; // 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

// Restricted endpoint that deletes a specific country object, by its alpha2Code
[apiInstance mastersCountriesAlpha2CodeDeleteWith:alpha2Code
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersRestrictedApi()
var alpha2Code = alpha2Code_example; // {{String}} 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersRestrictedApi();
            var alpha2Code = alpha2Code_example;  // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

            try
            {
                // Restricted endpoint that deletes a specific country object, by its alpha2Code
                TransactionResponse result = apiInstance.mastersCountriesAlpha2CodeDelete(alpha2Code);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersRestrictedApi.mastersCountriesAlpha2CodeDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersRestrictedApi();
$alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

my $api_instance = WWW::SwaggerClient::MastersRestrictedApi->new();
my $alpha2Code = alpha2Code_example; # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

eval { 
    my $result = $api_instance->mastersCountriesAlpha2CodeDelete(alpha2Code => $alpha2Code);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersRestrictedApi->mastersCountriesAlpha2CodeDelete: $@\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: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersRestrictedApi()
alpha2Code = alpha2Code_example # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

try: 
    # Restricted endpoint that deletes a specific country object, by its alpha2Code
    api_response = api_instance.masters_countries_alpha2_code_delete(alpha2Code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersRestrictedApi->mastersCountriesAlpha2CodeDelete: %s\n" % e)

Parameters

Path parameters
Name Description
alpha2Code*
String
2-characters identificator for country, according to ISO 3166-1 alpha2codes
Required

Responses

Status: 200 - Transaction response for the country object deletion, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersCountriesAlpha2CodePut

Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly


/masters/countries/{alpha2Code}

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/countries/{alpha2Code}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersRestrictedApi;

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

public class MastersRestrictedApiExample {

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

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        Country body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
}; // Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            TransactionResponse result = apiInstance.mastersCountriesAlpha2CodePut(body, alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesAlpha2CodePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersRestrictedApi;

public class MastersRestrictedApiExample {

    public static void main(String[] args) {
        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        Country body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
}; // Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
        String alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes
        try {
            TransactionResponse result = apiInstance.mastersCountriesAlpha2CodePut(body, alpha2Code);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesAlpha2CodePut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Country *body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
}; // object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
String *alpha2Code = alpha2Code_example; // 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

// Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
[apiInstance mastersCountriesAlpha2CodePutWith:body
    alpha2Code:alpha2Code
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersRestrictedApi()
var body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
}; // {{Country}} object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
var alpha2Code = alpha2Code_example; // {{String}} 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersRestrictedApi();
            var body = new Country(); // Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
            var alpha2Code = alpha2Code_example;  // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

            try
            {
                // Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
                TransactionResponse result = apiInstance.mastersCountriesAlpha2CodePut(body, alpha2Code);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersRestrictedApi.mastersCountriesAlpha2CodePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersRestrictedApi();
$body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
}; // Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
$alpha2Code = alpha2Code_example; // String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

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

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

my $api_instance = WWW::SwaggerClient::MastersRestrictedApi->new();
my $body = WWW::SwaggerClient::Object::Country->new(); # Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
my $alpha2Code = alpha2Code_example; # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

eval { 
    my $result = $api_instance->mastersCountriesAlpha2CodePut(body => $body, alpha2Code => $alpha2Code);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersRestrictedApi->mastersCountriesAlpha2CodePut: $@\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: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersRestrictedApi()
body = {
  "description" : "country location updated to the capitol instead of the geographic center",
  "locationLat" : 12.012345,
  "locationlong" : 45.678901
} # Country | object with country properties to modify, alpha2Code cannot be changed and it's readonly from its creation. This table  edition is restricted to system upgrade and maintenance tasks.
alpha2Code = alpha2Code_example # String | 2-characters identificator for country, according to ISO 3166-1 alpha2codes

try: 
    # Restricted endpoint to edit details about a specific country, alpha2Code is always readOnly
    api_response = api_instance.masters_countries_alpha2_code_put(body, alpha2Code)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersRestrictedApi->mastersCountriesAlpha2CodePut: %s\n" % e)

Parameters

Path parameters
Name Description
alpha2Code*
String
2-characters identificator for country, according to ISO 3166-1 alpha2codes
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the country edition, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersCountriesPost

Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks


/masters/countries

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/countries"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersRestrictedApi;

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

public class MastersRestrictedApiExample {

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

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        Country body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
}; // Country | New Country Object according to the standard ISO 3166-1
        try {
            TransactionResponse result = apiInstance.mastersCountriesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersRestrictedApi;

public class MastersRestrictedApiExample {

    public static void main(String[] args) {
        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        Country body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
}; // Country | New Country Object according to the standard ISO 3166-1
        try {
            TransactionResponse result = apiInstance.mastersCountriesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersCountriesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
Country *body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
}; // New Country Object according to the standard ISO 3166-1

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

// Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
[apiInstance mastersCountriesPostWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersRestrictedApi()
var body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
}; // {{Country}} New Country Object according to the standard ISO 3166-1

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

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

            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersRestrictedApi();
            var body = new Country(); // Country | New Country Object according to the standard ISO 3166-1

            try
            {
                // Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
                TransactionResponse result = apiInstance.mastersCountriesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersRestrictedApi.mastersCountriesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersRestrictedApi();
$body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
}; // Country | New Country Object according to the standard ISO 3166-1

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

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

my $api_instance = WWW::SwaggerClient::MastersRestrictedApi->new();
my $body = WWW::SwaggerClient::Object::Country->new(); # Country | New Country Object according to the standard ISO 3166-1

eval { 
    my $result = $api_instance->mastersCountriesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersRestrictedApi->mastersCountriesPost: $@\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: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersRestrictedApi()
body = {
  "numCode" : 724,
  "alpha2Code" : "ES",
  "alpha3Code" : "ESP",
  "name" : "Spain",
  "locationLat" : 40.46366882324219,
  "locationLong" : -3.7492198944091797
} # Country | New Country Object according to the standard ISO 3166-1

try: 
    # Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
    api_response = api_instance.masters_countries_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersRestrictedApi->mastersCountriesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the country addition, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersGraphGroupsGraphGroupIdDelete

Restricted endpoint that deletes a specific GraphGroup object, by its id


/masters/graphGroups/{graphGroupId}

Usage and SDK Samples

curl -X DELETE\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/masters/graphGroups/{graphGroupId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersRestrictedApi;

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

public class MastersRestrictedApiExample {

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

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdDelete(graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersGraphGroupsGraphGroupIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersRestrictedApi;

public class MastersRestrictedApiExample {

    public static void main(String[] args) {
        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        String graphGroupId = graphGroupId_example; // String | static GraphGroup identificator
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdDelete(graphGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersGraphGroupsGraphGroupIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *graphGroupId = graphGroupId_example; // static GraphGroup identificator

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

// Restricted endpoint that deletes a specific GraphGroup object, by its id
[apiInstance mastersGraphGroupsGraphGroupIdDeleteWith:graphGroupId
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersRestrictedApi()
var graphGroupId = graphGroupId_example; // {{String}} static GraphGroup identificator

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

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

            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersRestrictedApi();
            var graphGroupId = graphGroupId_example;  // String | static GraphGroup identificator

            try
            {
                // Restricted endpoint that deletes a specific GraphGroup object, by its id
                TransactionResponse result = apiInstance.mastersGraphGroupsGraphGroupIdDelete(graphGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersRestrictedApi.mastersGraphGroupsGraphGroupIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersRestrictedApi();
$graphGroupId = graphGroupId_example; // String | static GraphGroup identificator

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

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

my $api_instance = WWW::SwaggerClient::MastersRestrictedApi->new();
my $graphGroupId = graphGroupId_example; # String | static GraphGroup identificator

eval { 
    my $result = $api_instance->mastersGraphGroupsGraphGroupIdDelete(graphGroupId => $graphGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersRestrictedApi->mastersGraphGroupsGraphGroupIdDelete: $@\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: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersRestrictedApi()
graphGroupId = graphGroupId_example # String | static GraphGroup identificator

try: 
    # Restricted endpoint that deletes a specific GraphGroup object, by its id
    api_response = api_instance.masters_graph_groups_graph_group_id_delete(graphGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersRestrictedApi->mastersGraphGroupsGraphGroupIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
graphGroupId*
String
static GraphGroup identificator
Required

Responses

Status: 200 - Transaction response for the GraphGroup object deletion, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


mastersGraphGroupsPost

Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks


/masters/graphGroups

Usage and SDK Samples

curl -X POST\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/masters/graphGroups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MastersRestrictedApi;

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

public class MastersRestrictedApiExample {

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

        // Configure API key authorization: ApiKeyFactoryAuth
        ApiKeyAuth ApiKeyFactoryAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyFactoryAuth");
        ApiKeyFactoryAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyFactoryAuth.setApiKeyPrefix("Token");

        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        GraphGroup body = ; // GraphGroup | New GraphGroup Object
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersGraphGroupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MastersRestrictedApi;

public class MastersRestrictedApiExample {

    public static void main(String[] args) {
        MastersRestrictedApi apiInstance = new MastersRestrictedApi();
        GraphGroup body = ; // GraphGroup | New GraphGroup Object
        try {
            TransactionResponse result = apiInstance.mastersGraphGroupsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MastersRestrictedApi#mastersGraphGroupsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyFactoryAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
GraphGroup *body = ; // New GraphGroup Object

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

// Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
[apiInstance mastersGraphGroupsPostWith:body
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.MastersRestrictedApi()
var body = ; // {{GraphGroup}} New GraphGroup Object

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

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

            // Configure API key authorization: ApiKeyFactoryAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new MastersRestrictedApi();
            var body = new GraphGroup(); // GraphGroup | New GraphGroup Object

            try
            {
                // Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
                TransactionResponse result = apiInstance.mastersGraphGroupsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MastersRestrictedApi.mastersGraphGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiMastersRestrictedApi();
$body = ; // GraphGroup | New GraphGroup Object

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

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

my $api_instance = WWW::SwaggerClient::MastersRestrictedApi->new();
my $body = WWW::SwaggerClient::Object::GraphGroup->new(); # GraphGroup | New GraphGroup Object

eval { 
    my $result = $api_instance->mastersGraphGroupsPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MastersRestrictedApi->mastersGraphGroupsPost: $@\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: ApiKeyFactoryAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.MastersRestrictedApi()
body =  # GraphGroup | New GraphGroup Object

try: 
    # Factory restricted endpoint for upgrading of static Countries table, disabled for any user except in maintenance and upgrade tasks
    api_response = api_instance.masters_graph_groups_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MastersRestrictedApi->mastersGraphGroupsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the GraphGroup addition, contains message to user with information

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


Users

editUser

Edits user information details for an account

The users in the devices are linked to an account, thus it is not possible to change a username. the username "me" can be used to request details about the user of the current session. User editions are only accesible to device administrators, or when edition details for the user of the current session.


/users/{username}

Usage and SDK Samples

curl -X PUT\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://192.168.1.116:8080/api/users/{username}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        UsersApi apiInstance = new UsersApi();
        User body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
}; // User | object with user properties to modify.
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.editUser(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#editUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        User body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
}; // User | object with user properties to modify.
        String username = username_example; // String | a system registered account username
        try {
            TransactionResponse result = apiInstance.editUser(body, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#editUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
User *body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
}; // object with user properties to modify.
String *username = username_example; // a system registered account username

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

// Edits user information details for an account
[apiInstance editUserWith:body
    username:username
              completionHandler: ^(TransactionResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

var api = new EnfyoDeviceApi.UsersApi()
var body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
}; // {{User}} object with user properties to modify.
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new UsersApi();
            var body = new User(); // User | object with user properties to modify.
            var username = username_example;  // String | a system registered account username

            try
            {
                // Edits user information details for an account
                TransactionResponse result = apiInstance.editUser(body, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.editUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiUsersApi();
$body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
}; // User | object with user properties to modify.
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | object with user properties to modify.
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->editUser(body => $body, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->editUser: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body = {
  "name" : "Sarah",
  "lastName" : "Thunder",
  "email" : "myusername@domain.es",
  "description" : "test edition to user"
} # User | object with user properties to modify.
username = username_example # String | a system registered account username

try: 
    # Edits user information details for an account
    api_response = api_instance.edit_user(body, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->editUser: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Transaction response for the user account edit

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersGet

Gets a list of device users. Available to all valid device users


/users

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

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

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        try {
            array[User] result = apiInstance.usersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];

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

// Gets a list of device users. Available to all valid device users
[apiInstance usersGetWithCompletionHandler: 
              ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new UsersApi();

            try
            {
                // Gets a list of device users. Available to all valid device users
                array[User] result = apiInstance.usersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

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

# Configure API key authorization: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

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

try: 
    # Gets a list of device users. Available to all valid device users
    api_response = api_instance.users_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersGet: %s\n" % e)

Parameters

Responses

Status: 200 - User account details

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request


usersUsernameGet

Get details for a specific username.

Available to all valid device users, the username "me" can be used to request details about the user of the current session


/users/{username}

Usage and SDK Samples

curl -X GET\
-H "x-access-token: [[apiKey]]"\
-H "x-access-token: [[apiKey]]"\
-H "Accept: application/json"\
"http://192.168.1.116:8080/api/users/{username}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

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

        // Configure API key authorization: ApiKeyAdminAuth
        ApiKeyAuth ApiKeyAdminAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAdminAuth");
        ApiKeyAdminAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAdminAuth.setApiKeyPrefix("Token");

        // Configure API key authorization: ApiKeyUserAuth
        ApiKeyAuth ApiKeyUserAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyUserAuth");
        ApiKeyUserAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyUserAuth.setApiKeyPrefix("Token");

        UsersApi apiInstance = new UsersApi();
        String username = username_example; // String | a system registered account username
        try {
            User result = apiInstance.usersUsernameGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUsernameGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String username = username_example; // String | a system registered account username
        try {
            User result = apiInstance.usersUsernameGet(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUsernameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAdminAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
// Configure API key authorization: (authentication scheme: ApiKeyUserAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-access-token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-access-token"];
String *username = username_example; // a system registered account username

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

// Get details for a specific username.
[apiInstance usersUsernameGetWith:username
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EnfyoDeviceApi = require('enfyo_device_api');
var defaultClient = EnfyoDeviceApi.ApiClient.instance;

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

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

var api = new EnfyoDeviceApi.UsersApi()
var username = username_example; // {{String}} a system registered account username

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

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

            // Configure API key authorization: ApiKeyAdminAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");
            // Configure API key authorization: ApiKeyUserAuth
            Configuration.Default.ApiKey.Add("x-access-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("x-access-token", "Bearer");

            var apiInstance = new UsersApi();
            var username = username_example;  // String | a system registered account username

            try
            {
                // Get details for a specific username.
                User result = apiInstance.usersUsernameGet(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUsernameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiUsersApi();
$username = username_example; // String | a system registered account username

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $username = username_example; # String | a system registered account username

eval { 
    my $result = $api_instance->usersUsernameGet(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUsernameGet: $@\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: ApiKeyAdminAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'
# Configure API key authorization: ApiKeyUserAuth
swagger_client.configuration.api_key['x-access-token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-access-token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
username = username_example # String | a system registered account username

try: 
    # Get details for a specific username.
    api_response = api_instance.users_username_get(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersUsernameGet: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
a system registered account username
Required

Responses

Status: 200 - User account details

Status: 400 - Appears when the system detects an error in the input parameters or when the request body has a wrong format

{"isOk":"false,","message":"the request contains invalid characters."}
{"isOk":"false,","message":"the object you are trying to access does not exist"}
{"isOk":"false,","message":"Incomplete data, password and assignedPassword are mandatory fields"}

Status: 401 - Appears when the user has no privileges to run a specific action or while accessing restricted resources. Usually API endpoints are secured in 2 levels, User Scoped (AuthCode [100] = 1), and Administration rights. However specific system configuration endpoints are available only to factory maintenance personeel

{"isOk":false,"message":"Current user has not enought access rights to execute the request"}

Status: 403 - Appears when the resource is protected and an access token is missing or invalid, as a result of a request missing a login headers or having invalid tokens. For JSON Web Token use the x-access-token header and for bearer authoriuzation use the standard authorization header. It is also possible to have this response ehen you are trying to request for a protected endpoint with a fast response bearer object, check documentation to verify the endpoint authorization requirements.

{"isOk":false,"message":"No token provided! (closed session)","message_es":"No se ha encontrado token de seguridad (sesion no iniciada)"}
{"isOk":false,"message":"Unauthorized!","message_es":"Acceso no Autorizado"}
{"isOk":false,"message":"No jwt token or bearer token"}
{"isOk":false,"message":"Bearer token Invalid"}

Status: 500 - The server has encountered an error processing the request