CoreStack External API

CloudAccounts

createCloudAccount

CoreStack allows to onboard AWS cloud account using two different authentication protocols - Access Key & Assume Role. Access key being the default and widely used authentication protocol, Assume Role option is more secure as suggested by AWS. This method allows onboarding of Cloud Account using Access Key. Details on the Access Key can be found in the link https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html. Use method 'createCloudAccountAssumeRole' for onboarding cloud account in CoreStack using Assume Role.


/v1/{tenant_id}/cloud_accounts

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        CloudAccountCreateRequest cloudAccountCreateRequest = ; // CloudAccountCreateRequest | 
        try {
            CloudAccountCreateResponse result = apiInstance.createCloudAccount(tenantId, cloudAccountCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#createCloudAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        CloudAccountCreateRequest cloudAccountCreateRequest = ; // CloudAccountCreateRequest | 
        try {
            CloudAccountCreateResponse result = apiInstance.createCloudAccount(tenantId, cloudAccountCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#createCloudAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
CloudAccountCreateRequest *cloudAccountCreateRequest = ; // 

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

[apiInstance createCloudAccountWith:tenantId
    cloudAccountCreateRequest:cloudAccountCreateRequest
              completionHandler: ^(CloudAccountCreateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountCreateRequest = ; // {CloudAccountCreateRequest} 


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

namespace Example
{
    public class createCloudAccountExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountCreateRequest = new CloudAccountCreateRequest(); // CloudAccountCreateRequest | 

            try
            {
                CloudAccountCreateResponse result = apiInstance.createCloudAccount(tenantId, cloudAccountCreateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.createCloudAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountCreateRequest = ; // CloudAccountCreateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountCreateRequest = WWW::SwaggerClient::Object::CloudAccountCreateRequest->new(); # CloudAccountCreateRequest | 

eval { 
    my $result = $api_instance->createCloudAccount(tenantId => $tenantId, cloudAccountCreateRequest => $cloudAccountCreateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->createCloudAccount: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountCreateRequest =  # CloudAccountCreateRequest | 

try: 
    api_response = api_instance.create_cloud_account(tenantId, cloudAccountCreateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->createCloudAccount: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
Body parameters
Name Description
cloudAccountCreateRequest *

Responses

Status: 201 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createCloudAccountAssumeRole

CoreStack allows to onboard AWS cloud account using two different authentication protocols - Access Key & Assume Role. Access key being the default and widely used authentication protocol, Assume Role option is more secure as suggested by AWS. This method allows onboarding of Cloud Account using Assume Role. Details on the Assume Role can be found in the link https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html. Use method 'createCloudAccount' for onboarding cloud account in CoreStack using Access Key.


/v1/{tenant_id}/cloud_accounts/assume_role

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/assume_role"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        CloudAccountAssumeRoleCreateRequest cloudAccountAssumeRoleCreateRequest = ; // CloudAccountAssumeRoleCreateRequest | 
        try {
            CloudAccountCreateResponse result = apiInstance.createCloudAccountAssumeRole(tenantId, cloudAccountAssumeRoleCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#createCloudAccountAssumeRole");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        CloudAccountAssumeRoleCreateRequest cloudAccountAssumeRoleCreateRequest = ; // CloudAccountAssumeRoleCreateRequest | 
        try {
            CloudAccountCreateResponse result = apiInstance.createCloudAccountAssumeRole(tenantId, cloudAccountAssumeRoleCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#createCloudAccountAssumeRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
CloudAccountAssumeRoleCreateRequest *cloudAccountAssumeRoleCreateRequest = ; // 

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

[apiInstance createCloudAccountAssumeRoleWith:tenantId
    cloudAccountAssumeRoleCreateRequest:cloudAccountAssumeRoleCreateRequest
              completionHandler: ^(CloudAccountCreateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountAssumeRoleCreateRequest = ; // {CloudAccountAssumeRoleCreateRequest} 


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

namespace Example
{
    public class createCloudAccountAssumeRoleExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountAssumeRoleCreateRequest = new CloudAccountAssumeRoleCreateRequest(); // CloudAccountAssumeRoleCreateRequest | 

            try
            {
                CloudAccountCreateResponse result = apiInstance.createCloudAccountAssumeRole(tenantId, cloudAccountAssumeRoleCreateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.createCloudAccountAssumeRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountAssumeRoleCreateRequest = ; // CloudAccountAssumeRoleCreateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountAssumeRoleCreateRequest = WWW::SwaggerClient::Object::CloudAccountAssumeRoleCreateRequest->new(); # CloudAccountAssumeRoleCreateRequest | 

eval { 
    my $result = $api_instance->createCloudAccountAssumeRole(tenantId => $tenantId, cloudAccountAssumeRoleCreateRequest => $cloudAccountAssumeRoleCreateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->createCloudAccountAssumeRole: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountAssumeRoleCreateRequest =  # CloudAccountAssumeRoleCreateRequest | 

try: 
    api_response = api_instance.create_cloud_account_assume_role(tenantId, cloudAccountAssumeRoleCreateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->createCloudAccountAssumeRole: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
Body parameters
Name Description
cloudAccountAssumeRoleCreateRequest *

Responses

Status: 201 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteCloudAccount

Delete a specific cloud account. Please note all the configurations, like jobs, templates, schedules will be delete. An attempt will be made to delete the settings made in Native cloud service by the corestack but the credentials has to be correct and the user should have relevant permissions else it will be left unchanged.


/v1/{tenant_id}/cloud_accounts/{cloud_account_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/{cloud_account_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        try {
            CloudAccountDeleteResponse result = apiInstance.deleteCloudAccount(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#deleteCloudAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        try {
            CloudAccountDeleteResponse result = apiInstance.deleteCloudAccount(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#deleteCloudAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
String *cloudAccountId = cloudAccountId_example; // Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

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

[apiInstance deleteCloudAccountWith:tenantId
    cloudAccountId:cloudAccountId
              completionHandler: ^(CloudAccountDeleteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountId = cloudAccountId_example; // {String} Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.


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

namespace Example
{
    public class deleteCloudAccountExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountId = cloudAccountId_example;  // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

            try
            {
                CloudAccountDeleteResponse result = apiInstance.deleteCloudAccount(tenantId, cloudAccountId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.deleteCloudAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountId = cloudAccountId_example; # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

eval { 
    my $result = $api_instance->deleteCloudAccount(tenantId => $tenantId, cloudAccountId => $cloudAccountId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->deleteCloudAccount: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountId = cloudAccountId_example # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

try: 
    api_response = api_instance.delete_cloud_account(tenantId, cloudAccountId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->deleteCloudAccount: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
cloud_account_id*
String
Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describeCloudAccount

Get details of a specific cloud account within a given tenant.


/v1/{tenant_id}/cloud_accounts/{cloud_account_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/{cloud_account_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        try {
            CloudAccountDescribeResponse result = apiInstance.describeCloudAccount(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#describeCloudAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        try {
            CloudAccountDescribeResponse result = apiInstance.describeCloudAccount(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#describeCloudAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
String *cloudAccountId = cloudAccountId_example; // Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

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

[apiInstance describeCloudAccountWith:tenantId
    cloudAccountId:cloudAccountId
              completionHandler: ^(CloudAccountDescribeResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountId = cloudAccountId_example; // {String} Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.


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

namespace Example
{
    public class describeCloudAccountExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountId = cloudAccountId_example;  // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

            try
            {
                CloudAccountDescribeResponse result = apiInstance.describeCloudAccount(tenantId, cloudAccountId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.describeCloudAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountId = cloudAccountId_example; # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

eval { 
    my $result = $api_instance->describeCloudAccount(tenantId => $tenantId, cloudAccountId => $cloudAccountId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->describeCloudAccount: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountId = cloudAccountId_example # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

try: 
    api_response = api_instance.describe_cloud_account(tenantId, cloudAccountId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->describeCloudAccount: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
cloud_account_id*
String
Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listCloudAccounts

List all cloud accounts for a given tenant.


/v1/{tenant_id}/cloud_accounts

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        try {
            CloudAccountListResponse result = apiInstance.listCloudAccounts(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#listCloudAccounts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        try {
            CloudAccountListResponse result = apiInstance.listCloudAccounts(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#listCloudAccounts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

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

[apiInstance listCloudAccountsWith:tenantId
              completionHandler: ^(CloudAccountListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.


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

namespace Example
{
    public class listCloudAccountsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

            try
            {
                CloudAccountListResponse result = apiInstance.listCloudAccounts(tenantId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.listCloudAccounts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

eval { 
    my $result = $api_instance->listCloudAccounts(tenantId => $tenantId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->listCloudAccounts: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

try: 
    api_response = api_instance.list_cloud_accounts(tenantId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->listCloudAccounts: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


reDiscoverResources

Triggering Rediscover action will synch all the resources(Created/Deleted/Modified) of the target Cloud account with CoreStack Inventory. Based on the number of resources available in the Subscription and the number of regions managed through CoreStack, rediscovery might take sometime couple of hours.


/v1/{tenant_id}/cloud_accounts/{cloud_account_id}/rediscover

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/{cloud_account_id}/rediscover"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | 
        String cloudAccountId = cloudAccountId_example; // String | 
        try {
            CloudAccountRediscoverResponse result = apiInstance.reDiscoverResources(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#reDiscoverResources");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | 
        String cloudAccountId = cloudAccountId_example; // String | 
        try {
            CloudAccountRediscoverResponse result = apiInstance.reDiscoverResources(tenantId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#reDiscoverResources");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // 
String *cloudAccountId = cloudAccountId_example; // 

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

[apiInstance reDiscoverResourcesWith:tenantId
    cloudAccountId:cloudAccountId
              completionHandler: ^(CloudAccountRediscoverResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} 

var cloudAccountId = cloudAccountId_example; // {String} 


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

namespace Example
{
    public class reDiscoverResourcesExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | 
            var cloudAccountId = cloudAccountId_example;  // String | 

            try
            {
                CloudAccountRediscoverResponse result = apiInstance.reDiscoverResources(tenantId, cloudAccountId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.reDiscoverResources: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | 
$cloudAccountId = cloudAccountId_example; // String | 

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | 
my $cloudAccountId = cloudAccountId_example; # String | 

eval { 
    my $result = $api_instance->reDiscoverResources(tenantId => $tenantId, cloudAccountId => $cloudAccountId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->reDiscoverResources: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | 
cloudAccountId = cloudAccountId_example # String | 

try: 
    api_response = api_instance.re_discover_resources(tenantId, cloudAccountId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->reDiscoverResources: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Required
cloud_account_id*
String
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateCloudAccount

Updates the existing AWS cloud account created with access_key authentication for a given tenant. It is possible to change the authentication protocol from Access Key to Assume Role and vice versa. Use this method to update cloud account with Access Key authentication. For details to use Assume Role refer to method 'updateCloudAccountAssumeRole'.


/v1/{tenant_id}/cloud_accounts/{cloud_account_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/{cloud_account_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        CloudAccountUpdateRequest cloudAccountUpdateRequest = ; // CloudAccountUpdateRequest | 
        try {
            CloudAccountUpdateResponse result = apiInstance.updateCloudAccount(tenantId, cloudAccountId, cloudAccountUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#updateCloudAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        CloudAccountUpdateRequest cloudAccountUpdateRequest = ; // CloudAccountUpdateRequest | 
        try {
            CloudAccountUpdateResponse result = apiInstance.updateCloudAccount(tenantId, cloudAccountId, cloudAccountUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#updateCloudAccount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
String *cloudAccountId = cloudAccountId_example; // Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
CloudAccountUpdateRequest *cloudAccountUpdateRequest = ; // 

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

[apiInstance updateCloudAccountWith:tenantId
    cloudAccountId:cloudAccountId
    cloudAccountUpdateRequest:cloudAccountUpdateRequest
              completionHandler: ^(CloudAccountUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountId = cloudAccountId_example; // {String} Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

var cloudAccountUpdateRequest = ; // {CloudAccountUpdateRequest} 


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

namespace Example
{
    public class updateCloudAccountExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountId = cloudAccountId_example;  // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
            var cloudAccountUpdateRequest = new CloudAccountUpdateRequest(); // CloudAccountUpdateRequest | 

            try
            {
                CloudAccountUpdateResponse result = apiInstance.updateCloudAccount(tenantId, cloudAccountId, cloudAccountUpdateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.updateCloudAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
$cloudAccountUpdateRequest = ; // CloudAccountUpdateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountId = cloudAccountId_example; # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
my $cloudAccountUpdateRequest = WWW::SwaggerClient::Object::CloudAccountUpdateRequest->new(); # CloudAccountUpdateRequest | 

eval { 
    my $result = $api_instance->updateCloudAccount(tenantId => $tenantId, cloudAccountId => $cloudAccountId, cloudAccountUpdateRequest => $cloudAccountUpdateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->updateCloudAccount: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountId = cloudAccountId_example # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
cloudAccountUpdateRequest =  # CloudAccountUpdateRequest | 

try: 
    api_response = api_instance.update_cloud_account(tenantId, cloudAccountId, cloudAccountUpdateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->updateCloudAccount: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
cloud_account_id*
String
Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
Required
Body parameters
Name Description
cloudAccountUpdateRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateCloudAccountAssumeRole

Updates the existing AWS cloud account created with assume_role authentication for a given tenant. It is possible to change the authentication protocol from Assume Role to Access Key and vice versa. Use this method to update cloud account with Assume Role authentication. For details to use Access Key refer to method 'updateCloudAccount'.


/v1/{tenant_id}/cloud_accounts/{cloud_account_id}/assume_role

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/cloud_accounts/{cloud_account_id}/assume_role"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CloudAccountsApi;

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

public class CloudAccountsApiExample {

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

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

        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        CloudAccountAssumeRoleUpdateRequest cloudAccountAssumeRoleUpdateRequest = ; // CloudAccountAssumeRoleUpdateRequest | 
        try {
            CloudAccountUpdateResponse result = apiInstance.updateCloudAccountAssumeRole(tenantId, cloudAccountId, cloudAccountAssumeRoleUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#updateCloudAccountAssumeRole");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CloudAccountsApi;

public class CloudAccountsApiExample {

    public static void main(String[] args) {
        CloudAccountsApi apiInstance = new CloudAccountsApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
        String cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
        CloudAccountAssumeRoleUpdateRequest cloudAccountAssumeRoleUpdateRequest = ; // CloudAccountAssumeRoleUpdateRequest | 
        try {
            CloudAccountUpdateResponse result = apiInstance.updateCloudAccountAssumeRole(tenantId, cloudAccountId, cloudAccountAssumeRoleUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CloudAccountsApi#updateCloudAccountAssumeRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
String *cloudAccountId = cloudAccountId_example; // Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
CloudAccountAssumeRoleUpdateRequest *cloudAccountAssumeRoleUpdateRequest = ; // 

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

[apiInstance updateCloudAccountAssumeRoleWith:tenantId
    cloudAccountId:cloudAccountId
    cloudAccountAssumeRoleUpdateRequest:cloudAccountAssumeRoleUpdateRequest
              completionHandler: ^(CloudAccountUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.CloudAccountsApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.

var cloudAccountId = cloudAccountId_example; // {String} Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.

var cloudAccountAssumeRoleUpdateRequest = ; // {CloudAccountAssumeRoleUpdateRequest} 


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

namespace Example
{
    public class updateCloudAccountAssumeRoleExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new CloudAccountsApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
            var cloudAccountId = cloudAccountId_example;  // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
            var cloudAccountAssumeRoleUpdateRequest = new CloudAccountAssumeRoleUpdateRequest(); // CloudAccountAssumeRoleUpdateRequest | 

            try
            {
                CloudAccountUpdateResponse result = apiInstance.updateCloudAccountAssumeRole(tenantId, cloudAccountId, cloudAccountAssumeRoleUpdateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CloudAccountsApi.updateCloudAccountAssumeRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\CloudAccountsApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
$cloudAccountId = cloudAccountId_example; // String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
$cloudAccountAssumeRoleUpdateRequest = ; // CloudAccountAssumeRoleUpdateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::CloudAccountsApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
my $cloudAccountId = cloudAccountId_example; # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
my $cloudAccountAssumeRoleUpdateRequest = WWW::SwaggerClient::Object::CloudAccountAssumeRoleUpdateRequest->new(); # CloudAccountAssumeRoleUpdateRequest | 

eval { 
    my $result = $api_instance->updateCloudAccountAssumeRole(tenantId => $tenantId, cloudAccountId => $cloudAccountId, cloudAccountAssumeRoleUpdateRequest => $cloudAccountAssumeRoleUpdateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CloudAccountsApi->updateCloudAccountAssumeRole: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CloudAccountsApi()
tenantId = tenantId_example # String | Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
cloudAccountId = cloudAccountId_example # String | Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
cloudAccountAssumeRoleUpdateRequest =  # CloudAccountAssumeRoleUpdateRequest | 

try: 
    api_response = api_instance.update_cloud_account_assume_role(tenantId, cloudAccountId, cloudAccountAssumeRoleUpdateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CloudAccountsApi->updateCloudAccountAssumeRole: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create cloud account which is a unique id can be retrieved using the list tenant api.
Required
cloud_account_id*
String
Specify the cloud account id to update, cloud account id is unique can be obtained from the list cloud account api.
Required
Body parameters
Name Description
cloudAccountAssumeRoleUpdateRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Inventory

getInventoryCount

Get inventory category count based on the cloud and cloud account will list categories & Get inventory resource count based on the cloud and cloud account will list all resources with resource_category, resource_type, resource and will list only the count on number of resources available in particular category


/v1/{tenant_id}/inventory/count

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/inventory/count?service_name="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

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

public class InventoryApiExample {

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

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

        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        CategoryCountRequest categoryCountRequest = ; // CategoryCountRequest | 
        String serviceName = serviceName_example; // String | Name of the cloud
        try {
            CategoryCountResponse result = apiInstance.getInventoryCount(tenantId, categoryCountRequest, serviceName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getInventoryCount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        CategoryCountRequest categoryCountRequest = ; // CategoryCountRequest | 
        String serviceName = serviceName_example; // String | Name of the cloud
        try {
            CategoryCountResponse result = apiInstance.getInventoryCount(tenantId, categoryCountRequest, serviceName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getInventoryCount");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the inventory
CategoryCountRequest *categoryCountRequest = ; // 
String *serviceName = serviceName_example; // Name of the cloud (optional) (default to AWS)

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

[apiInstance getInventoryCountWith:tenantId
    categoryCountRequest:categoryCountRequest
    serviceName:serviceName
              completionHandler: ^(CategoryCountResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.InventoryApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the inventory

var categoryCountRequest = ; // {CategoryCountRequest} 

var opts = { 
  'serviceName': serviceName_example // {String} Name of the cloud
};

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

namespace Example
{
    public class getInventoryCountExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new InventoryApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the inventory
            var categoryCountRequest = new CategoryCountRequest(); // CategoryCountRequest | 
            var serviceName = serviceName_example;  // String | Name of the cloud (optional)  (default to AWS)

            try
            {
                CategoryCountResponse result = apiInstance.getInventoryCount(tenantId, categoryCountRequest, serviceName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.getInventoryCount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\InventoryApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
$categoryCountRequest = ; // CategoryCountRequest | 
$serviceName = serviceName_example; // String | Name of the cloud

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

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

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the inventory
my $categoryCountRequest = WWW::SwaggerClient::Object::CategoryCountRequest->new(); # CategoryCountRequest | 
my $serviceName = serviceName_example; # String | Name of the cloud

eval { 
    my $result = $api_instance->getInventoryCount(tenantId => $tenantId, categoryCountRequest => $categoryCountRequest, serviceName => $serviceName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->getInventoryCount: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
tenantId = tenantId_example # String | Specify the tenant Id for the inventory
categoryCountRequest =  # CategoryCountRequest | 
serviceName = serviceName_example # String | Name of the cloud (optional) (default to AWS)

try: 
    api_response = api_instance.get_inventory_count(tenantId, categoryCountRequest, serviceName=serviceName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->getInventoryCount: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the inventory
Required
Body parameters
Name Description
categoryCountRequest *
Query parameters
Name Description
service_name
String
Name of the cloud

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getInventoryDetails

Get resource details based on the cloud accounts, category, component, resource and filters can be applied based on the cloud and cloud account for ex: AWS will have regions in filters and Azure will have resource group as filters for listing resources.


/v1/{tenant_id}/inventory/resources

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/inventory/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

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

public class InventoryApiExample {

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

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

        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        InventoryResourceDetailsRequest inventoryResourceDetailsRequest = ; // InventoryResourceDetailsRequest | 
        try {
            InventoryResourceDetails result = apiInstance.getInventoryDetails(tenantId, inventoryResourceDetailsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getInventoryDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        InventoryResourceDetailsRequest inventoryResourceDetailsRequest = ; // InventoryResourceDetailsRequest | 
        try {
            InventoryResourceDetails result = apiInstance.getInventoryDetails(tenantId, inventoryResourceDetailsRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#getInventoryDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the inventory
InventoryResourceDetailsRequest *inventoryResourceDetailsRequest = ; // 

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

[apiInstance getInventoryDetailsWith:tenantId
    inventoryResourceDetailsRequest:inventoryResourceDetailsRequest
              completionHandler: ^(InventoryResourceDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.InventoryApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the inventory

var inventoryResourceDetailsRequest = ; // {InventoryResourceDetailsRequest} 


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

namespace Example
{
    public class getInventoryDetailsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new InventoryApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the inventory
            var inventoryResourceDetailsRequest = new InventoryResourceDetailsRequest(); // InventoryResourceDetailsRequest | 

            try
            {
                InventoryResourceDetails result = apiInstance.getInventoryDetails(tenantId, inventoryResourceDetailsRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.getInventoryDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\InventoryApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
$inventoryResourceDetailsRequest = ; // InventoryResourceDetailsRequest | 

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

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

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the inventory
my $inventoryResourceDetailsRequest = WWW::SwaggerClient::Object::InventoryResourceDetailsRequest->new(); # InventoryResourceDetailsRequest | 

eval { 
    my $result = $api_instance->getInventoryDetails(tenantId => $tenantId, inventoryResourceDetailsRequest => $inventoryResourceDetailsRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->getInventoryDetails: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
tenantId = tenantId_example # String | Specify the tenant Id for the inventory
inventoryResourceDetailsRequest =  # InventoryResourceDetailsRequest | 

try: 
    api_response = api_instance.get_inventory_details(tenantId, inventoryResourceDetailsRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->getInventoryDetails: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the inventory
Required
Body parameters
Name Description
inventoryResourceDetailsRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listInventoryFilters

Get all the available filters for the corresponding cloud.Listing filter attributes will help us in getting resource details with the filters listed can be applied on the resource details call and this api is only to list filtersfor ex: AWS will have regions and tags as filters available and Azure will have resource groups and tags as filters


/v1/{tenant_id}/inventory/filters

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/inventory/filters?service_name="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryApi;

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

public class InventoryApiExample {

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

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

        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        String serviceName = serviceName_example; // String | Name of the cloud
        try {
            InventoryResponse result = apiInstance.listInventoryFilters(tenantId, serviceName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#listInventoryFilters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryApi;

public class InventoryApiExample {

    public static void main(String[] args) {
        InventoryApi apiInstance = new InventoryApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
        String serviceName = serviceName_example; // String | Name of the cloud
        try {
            InventoryResponse result = apiInstance.listInventoryFilters(tenantId, serviceName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryApi#listInventoryFilters");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the inventory
String *serviceName = serviceName_example; // Name of the cloud (optional) (default to AWS)

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

[apiInstance listInventoryFiltersWith:tenantId
    serviceName:serviceName
              completionHandler: ^(InventoryResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.InventoryApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the inventory

var opts = { 
  'serviceName': serviceName_example // {String} Name of the cloud
};

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

namespace Example
{
    public class listInventoryFiltersExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new InventoryApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the inventory
            var serviceName = serviceName_example;  // String | Name of the cloud (optional)  (default to AWS)

            try
            {
                InventoryResponse result = apiInstance.listInventoryFilters(tenantId, serviceName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryApi.listInventoryFilters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\InventoryApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the inventory
$serviceName = serviceName_example; // String | Name of the cloud

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

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

my $api_instance = WWW::SwaggerClient::InventoryApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the inventory
my $serviceName = serviceName_example; # String | Name of the cloud

eval { 
    my $result = $api_instance->listInventoryFilters(tenantId => $tenantId, serviceName => $serviceName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryApi->listInventoryFilters: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.InventoryApi()
tenantId = tenantId_example # String | Specify the tenant Id for the inventory
serviceName = serviceName_example # String | Name of the cloud (optional) (default to AWS)

try: 
    api_response = api_instance.list_inventory_filters(tenantId, serviceName=serviceName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryApi->listInventoryFilters: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the inventory
Required
Query parameters
Name Description
service_name
String
Name of the cloud

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Policy

createPolicy

Creates a new policy under the tenant which will generate a unique policy id in the response this is can be used to describe details about the policy, update policy, execute or delete policy. However the policy will be accessible based on its scope Account scope - All users under that account will have access to describe and execute. Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access scripts to describe and execute. Tenant admins can update/delete. Private - User who created will only have access.


/v1/{tenant_id}/policies

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
        CreatePolicyRequest createPolicyRequest = ; // CreatePolicyRequest | 
        try {
            PolicyData result = apiInstance.createPolicy(tenantId, createPolicyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#createPolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
        CreatePolicyRequest createPolicyRequest = ; // CreatePolicyRequest | 
        try {
            PolicyData result = apiInstance.createPolicy(tenantId, createPolicyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#createPolicy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
CreatePolicyRequest *createPolicyRequest = ; // 

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

[apiInstance createPolicyWith:tenantId
    createPolicyRequest:createPolicyRequest
              completionHandler: ^(PolicyData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api

var createPolicyRequest = ; // {CreatePolicyRequest} 


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

namespace Example
{
    public class createPolicyExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
            var createPolicyRequest = new CreatePolicyRequest(); // CreatePolicyRequest | 

            try
            {
                PolicyData result = apiInstance.createPolicy(tenantId, createPolicyRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.createPolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
$createPolicyRequest = ; // CreatePolicyRequest | 

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
my $createPolicyRequest = WWW::SwaggerClient::Object::CreatePolicyRequest->new(); # CreatePolicyRequest | 

eval { 
    my $result = $api_instance->createPolicy(tenantId => $tenantId, createPolicyRequest => $createPolicyRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->createPolicy: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
createPolicyRequest =  # CreatePolicyRequest | 

try: 
    api_response = api_instance.create_policy(tenantId, createPolicyRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->createPolicy: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to create policy which is a unique id can be retrieved using the list tenant api
Required
Body parameters
Name Description
createPolicyRequest *

Responses

Status: 201 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deletePolicy

Delete a policy which is no more required


/v1/{tenant_id}/policies/{policy_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies/{policy_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
        String policyId = policyId_example; // String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api
        try {
            PolicyRemovalResponse result = apiInstance.deletePolicy(tenantId, policyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#deletePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
        String policyId = policyId_example; // String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api
        try {
            PolicyRemovalResponse result = apiInstance.deletePolicy(tenantId, policyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#deletePolicy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
String *policyId = policyId_example; // specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api

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

[apiInstance deletePolicyWith:tenantId
    policyId:policyId
              completionHandler: ^(PolicyRemovalResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api

var policyId = policyId_example; // {String} specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api


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

namespace Example
{
    public class deletePolicyExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
            var policyId = policyId_example;  // String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api

            try
            {
                PolicyRemovalResponse result = apiInstance.deletePolicy(tenantId, policyId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.deletePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
$policyId = policyId_example; // String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
my $policyId = policyId_example; # String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api

eval { 
    my $result = $api_instance->deletePolicy(tenantId => $tenantId, policyId => $policyId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->deletePolicy: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
policyId = policyId_example # String | specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api

try: 
    api_response = api_instance.delete_policy(tenantId, policyId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->deletePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to delete policy which is a unique id can be retrieved from the list tenant api
Required
policy_id*
String
specify the policy id of the policy to delete, policy id is unique can be obtained from the list policy api
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describePolicy

Describe the already created Polices


/v1/{tenant_id}/policies/{policy_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies/{policy_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to retrieve which is a unique id can be obtained using list policy api
        try {
            PolicyViewResponse result = apiInstance.describePolicy(tenantId, policyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#describePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to retrieve which is a unique id can be obtained using list policy api
        try {
            PolicyViewResponse result = apiInstance.describePolicy(tenantId, policyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#describePolicy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
String *policyId = policyId_example; // specify the policy id to retrieve which is a unique id can be obtained using list policy api

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

[apiInstance describePolicyWith:tenantId
    policyId:policyId
              completionHandler: ^(PolicyViewResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api

var policyId = policyId_example; // {String} specify the policy id to retrieve which is a unique id can be obtained using list policy api


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

namespace Example
{
    public class describePolicyExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
            var policyId = policyId_example;  // String | specify the policy id to retrieve which is a unique id can be obtained using list policy api

            try
            {
                PolicyViewResponse result = apiInstance.describePolicy(tenantId, policyId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.describePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
$policyId = policyId_example; // String | specify the policy id to retrieve which is a unique id can be obtained using list policy api

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
my $policyId = policyId_example; # String | specify the policy id to retrieve which is a unique id can be obtained using list policy api

eval { 
    my $result = $api_instance->describePolicy(tenantId => $tenantId, policyId => $policyId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->describePolicy: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
policyId = policyId_example # String | specify the policy id to retrieve which is a unique id can be obtained using list policy api

try: 
    api_response = api_instance.describe_policy(tenantId, policyId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->describePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to get policy which is a unique id can be obtained using the list tenant api
Required
policy_id*
String
specify the policy id to retrieve which is a unique id can be obtained using list policy api
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describePolicyRecommendations

This is the api to view the recommendation associated with the policy and the resourceswhich will get effected on execution of the recommendations. We can also get a idea on theactions which can be performed


/v1/{tenant_id}/recommendations/{recommendation_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/recommendations/{recommendation_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
        String recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
        try {
            PolicyRecommendationViewResponseModel result = apiInstance.describePolicyRecommendations(tenantId, recommendationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#describePolicyRecommendations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
        String recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
        try {
            PolicyRecommendationViewResponseModel result = apiInstance.describePolicyRecommendations(tenantId, recommendationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#describePolicyRecommendations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
String *recommendationId = recommendationId_example; // This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

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

[apiInstance describePolicyRecommendationsWith:tenantId
    recommendationId:recommendationId
              completionHandler: ^(PolicyRecommendationViewResponseModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api

var recommendationId = recommendationId_example; // {String} This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response


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

namespace Example
{
    public class describePolicyRecommendationsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
            var recommendationId = recommendationId_example;  // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

            try
            {
                PolicyRecommendationViewResponseModel result = apiInstance.describePolicyRecommendations(tenantId, recommendationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.describePolicyRecommendations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
$recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
my $recommendationId = recommendationId_example; # String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

eval { 
    my $result = $api_instance->describePolicyRecommendations(tenantId => $tenantId, recommendationId => $recommendationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->describePolicyRecommendations: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
recommendationId = recommendationId_example # String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

try: 
    api_response = api_instance.describe_policy_recommendations(tenantId, recommendationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->describePolicyRecommendations: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the recommendation which is a unique value can be obtained from the list tenant api
Required
recommendation_id*
String
This is a unique identifier for recommendation, can be obtained from the PolicyRecommendations api response
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


executePolicy

Execute policy will return a unique job id the status of the policy can be checked using the Job details api where you can pass the unique id generated to get the details or errors if any on execution


/v1/{tenant_id}/policies/{policy_id}/execute

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies/{policy_id}/execute"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to execute, policy id can be obtained from the list policy api
        PolicyExecuteRequestModel policyExecuteRequestModel = ; // PolicyExecuteRequestModel | 
        try {
            PolicyExecuteResponseModel result = apiInstance.executePolicy(tenantId, policyId, policyExecuteRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#executePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to execute, policy id can be obtained from the list policy api
        PolicyExecuteRequestModel policyExecuteRequestModel = ; // PolicyExecuteRequestModel | 
        try {
            PolicyExecuteResponseModel result = apiInstance.executePolicy(tenantId, policyId, policyExecuteRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#executePolicy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
String *policyId = policyId_example; // specify the policy id to execute, policy id can be obtained from the list policy api
PolicyExecuteRequestModel *policyExecuteRequestModel = ; // 

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

[apiInstance executePolicyWith:tenantId
    policyId:policyId
    policyExecuteRequestModel:policyExecuteRequestModel
              completionHandler: ^(PolicyExecuteResponseModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api

var policyId = policyId_example; // {String} specify the policy id to execute, policy id can be obtained from the list policy api

var policyExecuteRequestModel = ; // {PolicyExecuteRequestModel} 


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

namespace Example
{
    public class executePolicyExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
            var policyId = policyId_example;  // String | specify the policy id to execute, policy id can be obtained from the list policy api
            var policyExecuteRequestModel = new PolicyExecuteRequestModel(); // PolicyExecuteRequestModel | 

            try
            {
                PolicyExecuteResponseModel result = apiInstance.executePolicy(tenantId, policyId, policyExecuteRequestModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.executePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
$policyId = policyId_example; // String | specify the policy id to execute, policy id can be obtained from the list policy api
$policyExecuteRequestModel = ; // PolicyExecuteRequestModel | 

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
my $policyId = policyId_example; # String | specify the policy id to execute, policy id can be obtained from the list policy api
my $policyExecuteRequestModel = WWW::SwaggerClient::Object::PolicyExecuteRequestModel->new(); # PolicyExecuteRequestModel | 

eval { 
    my $result = $api_instance->executePolicy(tenantId => $tenantId, policyId => $policyId, policyExecuteRequestModel => $policyExecuteRequestModel);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->executePolicy: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
policyId = policyId_example # String | specify the policy id to execute, policy id can be obtained from the list policy api
policyExecuteRequestModel =  # PolicyExecuteRequestModel | 

try: 
    api_response = api_instance.execute_policy(tenantId, policyId, policyExecuteRequestModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->executePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id of the policy to be executed, this can be obtained using the list tenant api
Required
policy_id*
String
specify the policy id to execute, policy id can be obtained from the list policy api
Required
Body parameters
Name Description
policyExecuteRequestModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


executeRecommendation

This is the api to execute recommendations for a policy violation, The recommended steps to resolve the violations can be executed with the help of data like action_name, resource_recommendation_id, will be available in Recommendation View API.The Recommendations can be executed with dynamic parameter which may or may not be passed in the input


/v1/{tenant_id}/recommendations/{recommendation_id}

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/recommendations/{recommendation_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
        String recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
        ExecuteRecommendationRequestModel executeRecommendationRequestModel = ; // ExecuteRecommendationRequestModel | 
        try {
            ExecuteRecommendationResponseModel result = apiInstance.executeRecommendation(tenantId, recommendationId, executeRecommendationRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#executeRecommendation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
        String recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
        ExecuteRecommendationRequestModel executeRecommendationRequestModel = ; // ExecuteRecommendationRequestModel | 
        try {
            ExecuteRecommendationResponseModel result = apiInstance.executeRecommendation(tenantId, recommendationId, executeRecommendationRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#executeRecommendation");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
String *recommendationId = recommendationId_example; // This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
ExecuteRecommendationRequestModel *executeRecommendationRequestModel = ; // 

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

[apiInstance executeRecommendationWith:tenantId
    recommendationId:recommendationId
    executeRecommendationRequestModel:executeRecommendationRequestModel
              completionHandler: ^(ExecuteRecommendationResponseModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api

var recommendationId = recommendationId_example; // {String} This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response

var executeRecommendationRequestModel = ; // {ExecuteRecommendationRequestModel} 


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

namespace Example
{
    public class executeRecommendationExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
            var recommendationId = recommendationId_example;  // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
            var executeRecommendationRequestModel = new ExecuteRecommendationRequestModel(); // ExecuteRecommendationRequestModel | 

            try
            {
                ExecuteRecommendationResponseModel result = apiInstance.executeRecommendation(tenantId, recommendationId, executeRecommendationRequestModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.executeRecommendation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
$recommendationId = recommendationId_example; // String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
$executeRecommendationRequestModel = ; // ExecuteRecommendationRequestModel | 

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
my $recommendationId = recommendationId_example; # String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
my $executeRecommendationRequestModel = WWW::SwaggerClient::Object::ExecuteRecommendationRequestModel->new(); # ExecuteRecommendationRequestModel | 

eval { 
    my $result = $api_instance->executeRecommendation(tenantId => $tenantId, recommendationId => $recommendationId, executeRecommendationRequestModel => $executeRecommendationRequestModel);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->executeRecommendation: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
recommendationId = recommendationId_example # String | This is a unique identifier for recommendation, can be obtained from the  PolicyRecommendations api response
executeRecommendationRequestModel =  # ExecuteRecommendationRequestModel | 

try: 
    api_response = api_instance.execute_recommendation(tenantId, recommendationId, executeRecommendationRequestModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->executeRecommendation: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to execute recommendation, this is a unique id can be retrieved using the list tenant api
Required
recommendation_id*
String
This is a unique identifier for recommendation, can be obtained from the PolicyRecommendations api response
Required
Body parameters
Name Description
executeRecommendationRequestModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


jobDetails

Retrieve policy job details using the unique job id, this can be used to check the statusof the policy execution or any failure


/v1/{tenant_id}/policy_jobs/{job_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policy_jobs/{job_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
        String jobId = jobId_example; // String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response
        try {
            JobExecutionDetailsResponseModel result = apiInstance.jobDetails(tenantId, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#jobDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
        String jobId = jobId_example; // String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response
        try {
            JobExecutionDetailsResponseModel result = apiInstance.jobDetails(tenantId, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#jobDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
String *jobId = jobId_example; // specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response

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

[apiInstance jobDetailsWith:tenantId
    jobId:jobId
              completionHandler: ^(JobExecutionDetailsResponseModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api

var jobId = jobId_example; // {String} specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response


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

namespace Example
{
    public class jobDetailsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
            var jobId = jobId_example;  // String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response

            try
            {
                JobExecutionDetailsResponseModel result = apiInstance.jobDetails(tenantId, jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.jobDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
$jobId = jobId_example; // String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
my $jobId = jobId_example; # String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response

eval { 
    my $result = $api_instance->jobDetails(tenantId => $tenantId, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->jobDetails: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
jobId = jobId_example # String | specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response

try: 
    api_response = api_instance.job_details(tenantId, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->jobDetails: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
Required
job_id*
String
specify the job id to retrieve details of policy execution, job id is unique can be obtained from the execute policy response
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listPolicies

List all the policies. Global Policies Scope- All user will have access to Corestack Marketplace Policies these policies cannot be updated and deleted can be only describe and executed. Account Scope:- All users under that account will have access to view and execute Only Account admins can update/delete the policies.Tenant Scope - Users with access to the specific tenant will have access to policies who can describe or execute policies. Tenant admins can only update/delete. Private Scope - User who created will only have access


/v1/{tenant_id}/policies

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies?engine_type=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
        String engineType = engineType_example; // String | Engine types filter
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            PolicyListResponse result = apiInstance.listPolicies(tenantId, engineType, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#listPolicies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
        String engineType = engineType_example; // String | Engine types filter
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            PolicyListResponse result = apiInstance.listPolicies(tenantId, engineType, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#listPolicies");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
String *engineType = engineType_example; // Engine types filter (optional)
Integer *limit = 56; // Number of records to display (optional)
Integer *page = 56; // Page number (optional)

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

[apiInstance listPoliciesWith:tenantId
    engineType:engineType
    limit:limit
    page:page
              completionHandler: ^(PolicyListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api

var opts = { 
  'engineType': engineType_example, // {String} Engine types filter
  'limit': 56, // {Integer} Number of records to display
  'page': 56 // {Integer} Page number
};

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

namespace Example
{
    public class listPoliciesExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
            var engineType = engineType_example;  // String | Engine types filter (optional) 
            var limit = 56;  // Integer | Number of records to display (optional) 
            var page = 56;  // Integer | Page number (optional) 

            try
            {
                PolicyListResponse result = apiInstance.listPolicies(tenantId, engineType, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.listPolicies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
$engineType = engineType_example; // String | Engine types filter
$limit = 56; // Integer | Number of records to display
$page = 56; // Integer | Page number

try {
    $result = $api_instance->listPolicies($tenantId, $engineType, $limit, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PolicyApi->listPolicies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PolicyApi;

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
my $engineType = engineType_example; # String | Engine types filter
my $limit = 56; # Integer | Number of records to display
my $page = 56; # Integer | Page number

eval { 
    my $result = $api_instance->listPolicies(tenantId => $tenantId, engineType => $engineType, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->listPolicies: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to list policies which is a unique id can be obtained using  the list tenant api
engineType = engineType_example # String | Engine types filter (optional)
limit = 56 # Integer | Number of records to display (optional)
page = 56 # Integer | Page number (optional)

try: 
    api_response = api_instance.list_policies(tenantId, engineType=engineType, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->listPolicies: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to list policies which is a unique id can be obtained using the list tenant api
Required
Query parameters
Name Description
engine_type
String
Engine types filter
limit
Integer
Number of records to display
page
Integer
Page number

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


policyRecommendations

Policy recommendations are the guide line to the users to solve a policy violation by executing the recommendations the this can be a instruction or a combination of multipleinstructions defined to solve a problem


/v1/{tenant_id}/recommendations

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/recommendations?policy_id=&cloud_account_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
        String policyId = policyId_example; // String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
        String cloudAccountId = cloudAccountId_example; // String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api
        try {
            PolicyRecommendationResponseModelList result = apiInstance.policyRecommendations(tenantId, policyId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#policyRecommendations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
        String policyId = policyId_example; // String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
        String cloudAccountId = cloudAccountId_example; // String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api
        try {
            PolicyRecommendationResponseModelList result = apiInstance.policyRecommendations(tenantId, policyId, cloudAccountId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#policyRecommendations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
String *policyId = policyId_example; // specify the policy id for the recommendations which is a unique id can be obtained from policy listing api (optional)
String *cloudAccountId = cloudAccountId_example; // specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api (optional)

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

[apiInstance policyRecommendationsWith:tenantId
    policyId:policyId
    cloudAccountId:cloudAccountId
              completionHandler: ^(PolicyRecommendationResponseModelList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api

var opts = { 
  'policyId': policyId_example, // {String} specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
  'cloudAccountId': cloudAccountId_example // {String} specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api
};

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

namespace Example
{
    public class policyRecommendationsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
            var policyId = policyId_example;  // String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api (optional) 
            var cloudAccountId = cloudAccountId_example;  // String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api (optional) 

            try
            {
                PolicyRecommendationResponseModelList result = apiInstance.policyRecommendations(tenantId, policyId, cloudAccountId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.policyRecommendations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
$policyId = policyId_example; // String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
$cloudAccountId = cloudAccountId_example; // String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
my $policyId = policyId_example; # String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
my $cloudAccountId = cloudAccountId_example; # String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api

eval { 
    my $result = $api_instance->policyRecommendations(tenantId => $tenantId, policyId => $policyId, cloudAccountId => $cloudAccountId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->policyRecommendations: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
policyId = policyId_example # String | specify the policy id for the recommendations which is a unique id can be obtained from policy listing api (optional)
cloudAccountId = cloudAccountId_example # String | specify the cloud account id  for the recommendation which is a unique id can be retrieved from the cloud listing api (optional)

try: 
    api_response = api_instance.policy_recommendations(tenantId, policyId=policyId, cloudAccountId=cloudAccountId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->policyRecommendations: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id for the policy which is a unique value can be obtained from the list tenant api
Required
Query parameters
Name Description
policy_id
String
specify the policy id for the recommendations which is a unique id can be obtained from policy listing api
cloud_account_id
String
specify the cloud account id for the recommendation which is a unique id can be retrieved from the cloud listing api

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updatePolicy

Update Policy details if required after creation using the api, the update by a user depends on the scope of the policy created check create policy docs for more details on the scope


/v1/{tenant_id}/policies/{policy_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/policies/{policy_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PolicyApi;

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

public class PolicyApiExample {

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

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

        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to update which is a unique id can be retrieved using list policy api
        UpdatePolicyRequestModel updatePolicyRequestModel = ; // UpdatePolicyRequestModel | 
        try {
            UpdatePolicyRequest result = apiInstance.updatePolicy(tenantId, policyId, updatePolicyRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#updatePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PolicyApi;

public class PolicyApiExample {

    public static void main(String[] args) {
        PolicyApi apiInstance = new PolicyApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
        String policyId = policyId_example; // String | specify the policy id to update which is a unique id can be retrieved using list policy api
        UpdatePolicyRequestModel updatePolicyRequestModel = ; // UpdatePolicyRequestModel | 
        try {
            UpdatePolicyRequest result = apiInstance.updatePolicy(tenantId, policyId, updatePolicyRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PolicyApi#updatePolicy");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
String *policyId = policyId_example; // specify the policy id to update which is a unique id can be retrieved using list policy api
UpdatePolicyRequestModel *updatePolicyRequestModel = ; // 

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

[apiInstance updatePolicyWith:tenantId
    policyId:policyId
    updatePolicyRequestModel:updatePolicyRequestModel
              completionHandler: ^(UpdatePolicyRequest output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.PolicyApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api

var policyId = policyId_example; // {String} specify the policy id to update which is a unique id can be retrieved using list policy api

var updatePolicyRequestModel = ; // {UpdatePolicyRequestModel} 


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

namespace Example
{
    public class updatePolicyExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new PolicyApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
            var policyId = policyId_example;  // String | specify the policy id to update which is a unique id can be retrieved using list policy api
            var updatePolicyRequestModel = new UpdatePolicyRequestModel(); // UpdatePolicyRequestModel | 

            try
            {
                UpdatePolicyRequest result = apiInstance.updatePolicy(tenantId, policyId, updatePolicyRequestModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PolicyApi.updatePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PolicyApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
$policyId = policyId_example; // String | specify the policy id to update which is a unique id can be retrieved using list policy api
$updatePolicyRequestModel = ; // UpdatePolicyRequestModel | 

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

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

my $api_instance = WWW::SwaggerClient::PolicyApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
my $policyId = policyId_example; # String | specify the policy id to update which is a unique id can be retrieved using list policy api
my $updatePolicyRequestModel = WWW::SwaggerClient::Object::UpdatePolicyRequestModel->new(); # UpdatePolicyRequestModel | 

eval { 
    my $result = $api_instance->updatePolicy(tenantId => $tenantId, policyId => $policyId, updatePolicyRequestModel => $updatePolicyRequestModel);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PolicyApi->updatePolicy: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PolicyApi()
tenantId = tenantId_example # String | Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
policyId = policyId_example # String | specify the policy id to update which is a unique id can be retrieved using list policy api
updatePolicyRequestModel =  # UpdatePolicyRequestModel | 

try: 
    api_response = api_instance.update_policy(tenantId, policyId, updatePolicyRequestModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PolicyApi->updatePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to update policy which is a unique id can be retrieved using the list tenant api
Required
policy_id*
String
specify the policy id to update which is a unique id can be retrieved using list policy api
Required
Body parameters
Name Description
updatePolicyRequestModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Roles

listRoles

This GET method is used to retrieve the list of Roles available within a specific tenant.


/v1/{tenant_id}/roles

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/roles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

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

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

        RolesApi apiInstance = new RolesApi();
        String tenantId = tenantId_example; // String | 
        try {
            RoleListResponse result = apiInstance.listRoles(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRoles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String tenantId = tenantId_example; // String | 
        try {
            RoleListResponse result = apiInstance.listRoles(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // 

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

[apiInstance listRolesWith:tenantId
              completionHandler: ^(RoleListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.RolesApi()

var tenantId = tenantId_example; // {String} 


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

namespace Example
{
    public class listRolesExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new RolesApi();
            var tenantId = tenantId_example;  // String | 

            try
            {
                RoleListResponse result = apiInstance.listRoles(tenantId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.listRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\RolesApi();
$tenantId = tenantId_example; // String | 

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

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $tenantId = tenantId_example; # String | 

eval { 
    my $result = $api_instance->listRoles(tenantId => $tenantId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->listRoles: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.RolesApi()
tenantId = tenantId_example # String | 

try: 
    api_response = api_instance.list_roles(tenantId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->listRoles: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


ScriptJobs

describeScriptJob

View script job details.


/v1/{tenant_id}/scriptjobs/{script_job_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scriptjobs/{script_job_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptJobsApi;

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

public class ScriptJobsApiExample {

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

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

        ScriptJobsApi apiInstance = new ScriptJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptJobId = scriptJobId_example; // String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response
        try {
            ScriptJobDataView result = apiInstance.describeScriptJob(tenantId, scriptJobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptJobsApi#describeScriptJob");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptJobsApi;

public class ScriptJobsApiExample {

    public static void main(String[] args) {
        ScriptJobsApi apiInstance = new ScriptJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptJobId = scriptJobId_example; // String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response
        try {
            ScriptJobDataView result = apiInstance.describeScriptJob(tenantId, scriptJobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptJobsApi#describeScriptJob");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
String *scriptJobId = scriptJobId_example; // ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response

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

[apiInstance describeScriptJobWith:tenantId
    scriptJobId:scriptJobId
              completionHandler: ^(ScriptJobDataView output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptJobsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var scriptJobId = scriptJobId_example; // {String} ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response


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

namespace Example
{
    public class describeScriptJobExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptJobsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var scriptJobId = scriptJobId_example;  // String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response

            try
            {
                ScriptJobDataView result = apiInstance.describeScriptJob(tenantId, scriptJobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptJobsApi.describeScriptJob: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptJobsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$scriptJobId = scriptJobId_example; // String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response

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

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

my $api_instance = WWW::SwaggerClient::ScriptJobsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $scriptJobId = scriptJobId_example; # String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response

eval { 
    my $result = $api_instance->describeScriptJob(tenantId => $tenantId, scriptJobId => $scriptJobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptJobsApi->describeScriptJob: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptJobsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
scriptJobId = scriptJobId_example # String | ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response

try: 
    api_response = api_instance.describe_script_job(tenantId, scriptJobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptJobsApi->describeScriptJob: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
script_job_id*
String
ID of the script_job. This can be fetched from listScriptJobs API/scriptExecute response
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listScriptJobs

This API will list all script jobs initiated by the logged in user.


/v1/{tenant_id}/scriptjobs

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scriptjobs?limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptJobsApi;

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

public class ScriptJobsApiExample {

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

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

        ScriptJobsApi apiInstance = new ScriptJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            ScriptJobListResponse result = apiInstance.listScriptJobs(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptJobsApi#listScriptJobs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptJobsApi;

public class ScriptJobsApiExample {

    public static void main(String[] args) {
        ScriptJobsApi apiInstance = new ScriptJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            ScriptJobListResponse result = apiInstance.listScriptJobs(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptJobsApi#listScriptJobs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
Integer *limit = 56; // Number of records to display (optional)
Integer *page = 56; // Page number (optional)

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

[apiInstance listScriptJobsWith:tenantId
    limit:limit
    page:page
              completionHandler: ^(ScriptJobListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptJobsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var opts = { 
  'limit': 56, // {Integer} Number of records to display
  'page': 56 // {Integer} Page number
};

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

namespace Example
{
    public class listScriptJobsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptJobsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var limit = 56;  // Integer | Number of records to display (optional) 
            var page = 56;  // Integer | Page number (optional) 

            try
            {
                ScriptJobListResponse result = apiInstance.listScriptJobs(tenantId, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptJobsApi.listScriptJobs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptJobsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$limit = 56; // Integer | Number of records to display
$page = 56; // Integer | Page number

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

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

my $api_instance = WWW::SwaggerClient::ScriptJobsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $limit = 56; # Integer | Number of records to display
my $page = 56; # Integer | Page number

eval { 
    my $result = $api_instance->listScriptJobs(tenantId => $tenantId, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptJobsApi->listScriptJobs: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptJobsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
limit = 56 # Integer | Number of records to display (optional)
page = 56 # Integer | Page number (optional)

try: 
    api_response = api_instance.list_script_jobs(tenantId, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptJobsApi->listScriptJobs: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
Query parameters
Name Description
limit
Integer
Number of records to display
page
Integer
Page number

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Scripts

createScript

Creates a new script under the tenant. However the script will be accessible based on its scope. Global Scripts - All user will have access to Corestack's Marketplace Scripts (Can view and execute). Account - All users under that account will have access (Can view and execute). Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access scripts (Can view and execute). Tenant admins can update/delete. Private - User who created will only have access.


/v1/{tenant_id}/scripts

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        CreateScriptRequest createScriptRequest = ; // CreateScriptRequest | 
        try {
            CreateScriptResponse result = apiInstance.createScript(tenantId, createScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#createScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        CreateScriptRequest createScriptRequest = ; // CreateScriptRequest | 
        try {
            CreateScriptResponse result = apiInstance.createScript(tenantId, createScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#createScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
CreateScriptRequest *createScriptRequest = ; // 

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

[apiInstance createScriptWith:tenantId
    createScriptRequest:createScriptRequest
              completionHandler: ^(CreateScriptResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var createScriptRequest = ; // {CreateScriptRequest} 


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

namespace Example
{
    public class createScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var createScriptRequest = new CreateScriptRequest(); // CreateScriptRequest | 

            try
            {
                CreateScriptResponse result = apiInstance.createScript(tenantId, createScriptRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.createScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$createScriptRequest = ; // CreateScriptRequest | 

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $createScriptRequest = WWW::SwaggerClient::Object::CreateScriptRequest->new(); # CreateScriptRequest | 

eval { 
    my $result = $api_instance->createScript(tenantId => $tenantId, createScriptRequest => $createScriptRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->createScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
createScriptRequest =  # CreateScriptRequest | 

try: 
    api_response = api_instance.create_script(tenantId, createScriptRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->createScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
Body parameters
Name Description
createScriptRequest *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteScript

Deletes a script. Cannot undo this action, so be cautious when performing this operation. Use updateScript to make the script as inactive if required


/v1/{tenant_id}/scripts/{script_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts/{script_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        try {
            ScriptDeleteResponse result = apiInstance.deleteScript(tenantId, scriptId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#deleteScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        try {
            ScriptDeleteResponse result = apiInstance.deleteScript(tenantId, scriptId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#deleteScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
String *scriptId = scriptId_example; // ID of the script. This can be fetched from listScripts API

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

[apiInstance deleteScriptWith:tenantId
    scriptId:scriptId
              completionHandler: ^(ScriptDeleteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var scriptId = scriptId_example; // {String} ID of the script. This can be fetched from listScripts API


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

namespace Example
{
    public class deleteScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var scriptId = scriptId_example;  // String | ID of the script. This can be fetched from listScripts API

            try
            {
                ScriptDeleteResponse result = apiInstance.deleteScript(tenantId, scriptId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.deleteScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $scriptId = scriptId_example; # String | ID of the script. This can be fetched from listScripts API

eval { 
    my $result = $api_instance->deleteScript(tenantId => $tenantId, scriptId => $scriptId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->deleteScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
scriptId = scriptId_example # String | ID of the script. This can be fetched from listScripts API

try: 
    api_response = api_instance.delete_script(tenantId, scriptId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->deleteScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
script_id*
String
ID of the script. This can be fetched from listScripts API
Required

Responses

Status: 200 - Deleted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describeScript

This API will provide detailed information about the script.


/v1/{tenant_id}/scripts/{script_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts/{script_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        try {
            ScriptDataView result = apiInstance.describeScript(tenantId, scriptId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#describeScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        try {
            ScriptDataView result = apiInstance.describeScript(tenantId, scriptId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#describeScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
String *scriptId = scriptId_example; // ID of the script. This can be fetched from listScripts API

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

[apiInstance describeScriptWith:tenantId
    scriptId:scriptId
              completionHandler: ^(ScriptDataView output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var scriptId = scriptId_example; // {String} ID of the script. This can be fetched from listScripts API


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

namespace Example
{
    public class describeScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var scriptId = scriptId_example;  // String | ID of the script. This can be fetched from listScripts API

            try
            {
                ScriptDataView result = apiInstance.describeScript(tenantId, scriptId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.describeScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $scriptId = scriptId_example; # String | ID of the script. This can be fetched from listScripts API

eval { 
    my $result = $api_instance->describeScript(tenantId => $tenantId, scriptId => $scriptId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->describeScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
scriptId = scriptId_example # String | ID of the script. This can be fetched from listScripts API

try: 
    api_response = api_instance.describe_script(tenantId, scriptId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->describeScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
script_id*
String
ID of the script. This can be fetched from listScripts API
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


executeScript

Execute scripts. Ansible script supports executing single script in multiple machines. Chef/Puppet/Shell executing multiple scripts against multiple target machines.


/v1/{tenant_id}/scripts/execute

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts/execute"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        ExecuteScriptRequest executeScriptRequest = ; // ExecuteScriptRequest | 
        try {
            ExecuteResponse result = apiInstance.executeScript(tenantId, executeScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#executeScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        ExecuteScriptRequest executeScriptRequest = ; // ExecuteScriptRequest | 
        try {
            ExecuteResponse result = apiInstance.executeScript(tenantId, executeScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#executeScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
ExecuteScriptRequest *executeScriptRequest = ; // 

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

[apiInstance executeScriptWith:tenantId
    executeScriptRequest:executeScriptRequest
              completionHandler: ^(ExecuteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var executeScriptRequest = ; // {ExecuteScriptRequest} 


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

namespace Example
{
    public class executeScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var executeScriptRequest = new ExecuteScriptRequest(); // ExecuteScriptRequest | 

            try
            {
                ExecuteResponse result = apiInstance.executeScript(tenantId, executeScriptRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.executeScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$executeScriptRequest = ; // ExecuteScriptRequest | 

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $executeScriptRequest = WWW::SwaggerClient::Object::ExecuteScriptRequest->new(); # ExecuteScriptRequest | 

eval { 
    my $result = $api_instance->executeScript(tenantId => $tenantId, executeScriptRequest => $executeScriptRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->executeScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
executeScriptRequest =  # ExecuteScriptRequest | 

try: 
    api_response = api_instance.execute_script(tenantId, executeScriptRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->executeScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
Body parameters
Name Description
executeScriptRequest *

Responses

Status: 200 - Execution Initiated

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listScripts

List all the scripts. Global Scripts - All user will have access to Corestack's Marketplace Scripts (Can view and execute). Account - All users under that account will have access (Can view and execute). Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access scripts (Can view and execute). Tenant admins can update/delete. Private - User who created will only have access.


/v1/{tenant_id}/scripts

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts?types=&category=&limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String types = types_example; // String | Script types to filter. Allowed Values: chef, ansible, puppet, shell
        String category = category_example; // String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            ScriptListResponse result = apiInstance.listScripts(tenantId, types, category, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#listScripts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String types = types_example; // String | Script types to filter. Allowed Values: chef, ansible, puppet, shell
        String category = category_example; // String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            ScriptListResponse result = apiInstance.listScripts(tenantId, types, category, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#listScripts");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
String *types = types_example; // Script types to filter. Allowed Values: chef, ansible, puppet, shell (optional)
String *category = category_example; // Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others (optional)
Integer *limit = 56; // Number of records to display (optional)
Integer *page = 56; // Page number (optional)

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

[apiInstance listScriptsWith:tenantId
    types:types
    category:category
    limit:limit
    page:page
              completionHandler: ^(ScriptListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var opts = { 
  'types': types_example, // {String} Script types to filter. Allowed Values: chef, ansible, puppet, shell
  'category': category_example, // {String} Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
  'limit': 56, // {Integer} Number of records to display
  'page': 56 // {Integer} Page number
};

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

namespace Example
{
    public class listScriptsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var types = types_example;  // String | Script types to filter. Allowed Values: chef, ansible, puppet, shell (optional) 
            var category = category_example;  // String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others (optional) 
            var limit = 56;  // Integer | Number of records to display (optional) 
            var page = 56;  // Integer | Page number (optional) 

            try
            {
                ScriptListResponse result = apiInstance.listScripts(tenantId, types, category, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.listScripts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$types = types_example; // String | Script types to filter. Allowed Values: chef, ansible, puppet, shell
$category = category_example; // String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
$limit = 56; // Integer | Number of records to display
$page = 56; // Integer | Page number

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $types = types_example; # String | Script types to filter. Allowed Values: chef, ansible, puppet, shell
my $category = category_example; # String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
my $limit = 56; # Integer | Number of records to display
my $page = 56; # Integer | Page number

eval { 
    my $result = $api_instance->listScripts(tenantId => $tenantId, types => $types, category => $category, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->listScripts: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
types = types_example # String | Script types to filter. Allowed Values: chef, ansible, puppet, shell (optional)
category = category_example # String | Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others (optional)
limit = 56 # Integer | Number of records to display (optional)
page = 56 # Integer | Page number (optional)

try: 
    api_response = api_instance.list_scripts(tenantId, types=types, category=category, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->listScripts: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
Query parameters
Name Description
types
String
Script types to filter. Allowed Values: chef, ansible, puppet, shell
category
String
Script types to filter. Allowed Values: Application, Languages, Database, Security, System, Web Server, Others
limit
Integer
Number of records to display
page
Integer
Page number

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


scanScript

Scans a script to check if all dependencies(if any) are satisfied. This API will also return parameters available in script for chef and parameter & hosts available in the script for ansible


/v1/{tenant_id}/scripts/scan

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts/scan"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        ScriptScanRequest scriptScanRequest = ; // ScriptScanRequest | 
        try {
            ScanScriptResponse result = apiInstance.scanScript(tenantId, scriptScanRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#scanScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        ScriptScanRequest scriptScanRequest = ; // ScriptScanRequest | 
        try {
            ScanScriptResponse result = apiInstance.scanScript(tenantId, scriptScanRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#scanScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
ScriptScanRequest *scriptScanRequest = ; // 

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

[apiInstance scanScriptWith:tenantId
    scriptScanRequest:scriptScanRequest
              completionHandler: ^(ScanScriptResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var scriptScanRequest = ; // {ScriptScanRequest} 


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

namespace Example
{
    public class scanScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var scriptScanRequest = new ScriptScanRequest(); // ScriptScanRequest | 

            try
            {
                ScanScriptResponse result = apiInstance.scanScript(tenantId, scriptScanRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.scanScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$scriptScanRequest = ; // ScriptScanRequest | 

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $scriptScanRequest = WWW::SwaggerClient::Object::ScriptScanRequest->new(); # ScriptScanRequest | 

eval { 
    my $result = $api_instance->scanScript(tenantId => $tenantId, scriptScanRequest => $scriptScanRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->scanScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
scriptScanRequest =  # ScriptScanRequest | 

try: 
    api_response = api_instance.scan_script(tenantId, scriptScanRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->scanScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
Body parameters
Name Description
scriptScanRequest *

Responses

Status: 200 - Scanned successfully

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateScript

Updates script details such as name, script path, dependencies etc.,


/v1/{tenant_id}/scripts/{script_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/scripts/{script_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ScriptsApi;

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

public class ScriptsApiExample {

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

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

        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        CreateScriptRequest createScriptRequest = ; // CreateScriptRequest | 
        try {
            CreateScriptResponse result = apiInstance.updateScript(tenantId, scriptId, createScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#updateScript");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScriptsApi;

public class ScriptsApiExample {

    public static void main(String[] args) {
        ScriptsApi apiInstance = new ScriptsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
        String scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
        CreateScriptRequest createScriptRequest = ; // CreateScriptRequest | 
        try {
            CreateScriptResponse result = apiInstance.updateScript(tenantId, scriptId, createScriptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScriptsApi#updateScript");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from listTenants API
String *scriptId = scriptId_example; // ID of the script. This can be fetched from listScripts API
CreateScriptRequest *createScriptRequest = ; // 

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

[apiInstance updateScriptWith:tenantId
    scriptId:scriptId
    createScriptRequest:createScriptRequest
              completionHandler: ^(CreateScriptResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.ScriptsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from listTenants API

var scriptId = scriptId_example; // {String} ID of the script. This can be fetched from listScripts API

var createScriptRequest = ; // {CreateScriptRequest} 


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

namespace Example
{
    public class updateScriptExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new ScriptsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from listTenants API
            var scriptId = scriptId_example;  // String | ID of the script. This can be fetched from listScripts API
            var createScriptRequest = new CreateScriptRequest(); // CreateScriptRequest | 

            try
            {
                CreateScriptResponse result = apiInstance.updateScript(tenantId, scriptId, createScriptRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScriptsApi.updateScript: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\ScriptsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from listTenants API
$scriptId = scriptId_example; // String | ID of the script. This can be fetched from listScripts API
$createScriptRequest = ; // CreateScriptRequest | 

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

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

my $api_instance = WWW::SwaggerClient::ScriptsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from listTenants API
my $scriptId = scriptId_example; # String | ID of the script. This can be fetched from listScripts API
my $createScriptRequest = WWW::SwaggerClient::Object::CreateScriptRequest->new(); # CreateScriptRequest | 

eval { 
    my $result = $api_instance->updateScript(tenantId => $tenantId, scriptId => $scriptId, createScriptRequest => $createScriptRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScriptsApi->updateScript: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ScriptsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from listTenants API
scriptId = scriptId_example # String | ID of the script. This can be fetched from listScripts API
createScriptRequest =  # CreateScriptRequest | 

try: 
    api_response = api_instance.update_script(tenantId, scriptId, createScriptRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScriptsApi->updateScript: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from listTenants API
Required
script_id*
String
ID of the script. This can be fetched from listScripts API
Required
Body parameters
Name Description
createScriptRequest *

Responses

Status: 200 - Updated

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


TemplateJobs

listTemplatesJobs

Jobs represent an instance of a Template or Script. Every time a Template or Script is executed, a Job is created. Jobs provide a reference of the execution, during and any time after it.


/v1/{tenant_id}/jobs

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/jobs?limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplateJobsApi;

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

public class TemplateJobsApiExample {

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

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

        TemplateJobsApi apiInstance = new TemplateJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            TemplateJobListResponse result = apiInstance.listTemplatesJobs(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplateJobsApi#listTemplatesJobs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplateJobsApi;

public class TemplateJobsApiExample {

    public static void main(String[] args) {
        TemplateJobsApi apiInstance = new TemplateJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            TemplateJobListResponse result = apiInstance.listTemplatesJobs(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplateJobsApi#listTemplatesJobs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from list tenants API
Integer *limit = 56; // Number of records to display (optional)
Integer *page = 56; // Page number (optional)

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

[apiInstance listTemplatesJobsWith:tenantId
    limit:limit
    page:page
              completionHandler: ^(TemplateJobListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplateJobsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from list tenants API

var opts = { 
  'limit': 56, // {Integer} Number of records to display
  'page': 56 // {Integer} Page number
};

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

namespace Example
{
    public class listTemplatesJobsExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplateJobsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from list tenants API
            var limit = 56;  // Integer | Number of records to display (optional) 
            var page = 56;  // Integer | Page number (optional) 

            try
            {
                TemplateJobListResponse result = apiInstance.listTemplatesJobs(tenantId, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplateJobsApi.listTemplatesJobs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplateJobsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
$limit = 56; // Integer | Number of records to display
$page = 56; // Integer | Page number

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

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

my $api_instance = WWW::SwaggerClient::TemplateJobsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from list tenants API
my $limit = 56; # Integer | Number of records to display
my $page = 56; # Integer | Page number

eval { 
    my $result = $api_instance->listTemplatesJobs(tenantId => $tenantId, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplateJobsApi->listTemplatesJobs: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplateJobsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from list tenants API
limit = 56 # Integer | Number of records to display (optional)
page = 56 # Integer | Page number (optional)

try: 
    api_response = api_instance.list_templates_jobs(tenantId, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplateJobsApi->listTemplatesJobs: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from list tenants API
Required
Query parameters
Name Description
limit
Integer
Number of records to display
page
Integer
Page number

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


viewTemplateJob

View Template job details


/v1/{tenant_id}/jobs/{job_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/jobs/{job_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplateJobsApi;

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

public class TemplateJobsApiExample {

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

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

        TemplateJobsApi apiInstance = new TemplateJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
        String jobId = jobId_example; // String | ID of the template_job. This can be fetched from listTemplateJobs API response
        try {
            TemplateJobUpdateResponse result = apiInstance.viewTemplateJob(tenantId, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplateJobsApi#viewTemplateJob");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplateJobsApi;

public class TemplateJobsApiExample {

    public static void main(String[] args) {
        TemplateJobsApi apiInstance = new TemplateJobsApi();
        String tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
        String jobId = jobId_example; // String | ID of the template_job. This can be fetched from listTemplateJobs API response
        try {
            TemplateJobUpdateResponse result = apiInstance.viewTemplateJob(tenantId, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplateJobsApi#viewTemplateJob");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // ID of the tenant. This can be fetched from list tenants API
String *jobId = jobId_example; // ID of the template_job. This can be fetched from listTemplateJobs API response

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

[apiInstance viewTemplateJobWith:tenantId
    jobId:jobId
              completionHandler: ^(TemplateJobUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplateJobsApi()

var tenantId = tenantId_example; // {String} ID of the tenant. This can be fetched from list tenants API

var jobId = jobId_example; // {String} ID of the template_job. This can be fetched from listTemplateJobs API response


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

namespace Example
{
    public class viewTemplateJobExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplateJobsApi();
            var tenantId = tenantId_example;  // String | ID of the tenant. This can be fetched from list tenants API
            var jobId = jobId_example;  // String | ID of the template_job. This can be fetched from listTemplateJobs API response

            try
            {
                TemplateJobUpdateResponse result = apiInstance.viewTemplateJob(tenantId, jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplateJobsApi.viewTemplateJob: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplateJobsApi();
$tenantId = tenantId_example; // String | ID of the tenant. This can be fetched from list tenants API
$jobId = jobId_example; // String | ID of the template_job. This can be fetched from listTemplateJobs API response

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

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

my $api_instance = WWW::SwaggerClient::TemplateJobsApi->new();
my $tenantId = tenantId_example; # String | ID of the tenant. This can be fetched from list tenants API
my $jobId = jobId_example; # String | ID of the template_job. This can be fetched from listTemplateJobs API response

eval { 
    my $result = $api_instance->viewTemplateJob(tenantId => $tenantId, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplateJobsApi->viewTemplateJob: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplateJobsApi()
tenantId = tenantId_example # String | ID of the tenant. This can be fetched from list tenants API
jobId = jobId_example # String | ID of the template_job. This can be fetched from listTemplateJobs API response

try: 
    api_response = api_instance.view_template_job(tenantId, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplateJobsApi->viewTemplateJob: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
ID of the tenant. This can be fetched from list tenants API
Required
job_id*
String
ID of the template_job. This can be fetched from listTemplateJobs API response
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Templates

createTemplate

Creates a new Template under the tenant. However the script will be accessible based on its scope. Global Templates - All user will have access to CoreStack's Marketplace Templates (Can view and execute). Account - All users under that account will have access (Can view and execute). Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access template (Can view and execute). Tenant admins can update/delete. Private - User who created will only have access.


/v1/{tenant_id}/templates

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create a template and this can be fetched from list tenants API
        CreateTemplateRequest createTemplateRequest = ; // CreateTemplateRequest | 
        try {
            TemplateCreateResponse result = apiInstance.createTemplate(tenantId, createTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#createTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to create a template and this can be fetched from list tenants API
        CreateTemplateRequest createTemplateRequest = ; // CreateTemplateRequest | 
        try {
            TemplateCreateResponse result = apiInstance.createTemplate(tenantId, createTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#createTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to create a template and this can be fetched from list tenants API
CreateTemplateRequest *createTemplateRequest = ; // 

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

[apiInstance createTemplateWith:tenantId
    createTemplateRequest:createTemplateRequest
              completionHandler: ^(TemplateCreateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to create a template and this can be fetched from list tenants API

var createTemplateRequest = ; // {CreateTemplateRequest} 


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

namespace Example
{
    public class createTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to create a template and this can be fetched from list tenants API
            var createTemplateRequest = new CreateTemplateRequest(); // CreateTemplateRequest | 

            try
            {
                TemplateCreateResponse result = apiInstance.createTemplate(tenantId, createTemplateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.createTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant id to create a template and this can be fetched from list tenants API
$createTemplateRequest = ; // CreateTemplateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to create a template and this can be fetched from list tenants API
my $createTemplateRequest = WWW::SwaggerClient::Object::CreateTemplateRequest->new(); # CreateTemplateRequest | 

eval { 
    my $result = $api_instance->createTemplate(tenantId => $tenantId, createTemplateRequest => $createTemplateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->createTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant id to create a template and this can be fetched from list tenants API
createTemplateRequest =  # CreateTemplateRequest | 

try: 
    api_response = api_instance.create_template(tenantId, createTemplateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->createTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to create a template and this can be fetched from list tenants API
Required
Body parameters
Name Description
createTemplateRequest *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteTemplate

Delete a Template which is no more required


/v1/{tenant_id}/templates/{template_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
        String templateId = templateId_example; // String | specify the template id of the template to delete, template id is unique can be obtained from the list template api
        try {
            TemplateRemoveResModel result = apiInstance.deleteTemplate(tenantId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#deleteTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
        String templateId = templateId_example; // String | specify the template id of the template to delete, template id is unique can be obtained from the list template api
        try {
            TemplateRemoveResModel result = apiInstance.deleteTemplate(tenantId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#deleteTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
String *templateId = templateId_example; // specify the template id of the template to delete, template id is unique can be obtained from the list template api

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

[apiInstance deleteTemplateWith:tenantId
    templateId:templateId
              completionHandler: ^(TemplateRemoveResModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api

var templateId = templateId_example; // {String} specify the template id of the template to delete, template id is unique can be obtained from the list template api


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

namespace Example
{
    public class deleteTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
            var templateId = templateId_example;  // String | specify the template id of the template to delete, template id is unique can be obtained from the list template api

            try
            {
                TemplateRemoveResModel result = apiInstance.deleteTemplate(tenantId, templateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.deleteTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
$templateId = templateId_example; // String | specify the template id of the template to delete, template id is unique can be obtained from the list template api

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
my $templateId = templateId_example; # String | specify the template id of the template to delete, template id is unique can be obtained from the list template api

eval { 
    my $result = $api_instance->deleteTemplate(tenantId => $tenantId, templateId => $templateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->deleteTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
templateId = templateId_example # String | specify the template id of the template to delete, template id is unique can be obtained from the list template api

try: 
    api_response = api_instance.delete_template(tenantId, templateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->deleteTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to delete template which is a unique id can be retrieved from the list tenant api
Required
template_id*
String
specify the template id of the template to delete, template id is unique can be obtained from the list template api
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describeTemplate

Describe the already created Templates


/v1/{tenant_id}/templates/{template_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to retrieve, which is a unique id can be obtained using list template api
        try {
            TemplateViewResponse result = apiInstance.describeTemplate(tenantId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#describeTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to retrieve, which is a unique id can be obtained using list template api
        try {
            TemplateViewResponse result = apiInstance.describeTemplate(tenantId, templateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#describeTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
String *templateId = templateId_example; // specify the template id to retrieve, which is a unique id can be obtained using list template api

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

[apiInstance describeTemplateWith:tenantId
    templateId:templateId
              completionHandler: ^(TemplateViewResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api

var templateId = templateId_example; // {String} specify the template id to retrieve, which is a unique id can be obtained using list template api


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

namespace Example
{
    public class describeTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
            var templateId = templateId_example;  // String | specify the template id to retrieve, which is a unique id can be obtained using list template api

            try
            {
                TemplateViewResponse result = apiInstance.describeTemplate(tenantId, templateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.describeTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
$templateId = templateId_example; // String | specify the template id to retrieve, which is a unique id can be obtained using list template api

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
my $templateId = templateId_example; # String | specify the template id to retrieve, which is a unique id can be obtained using list template api

eval { 
    my $result = $api_instance->describeTemplate(tenantId => $tenantId, templateId => $templateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->describeTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
templateId = templateId_example # String | specify the template id to retrieve, which is a unique id can be obtained using list template api

try: 
    api_response = api_instance.describe_template(tenantId, templateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->describeTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to get template, which is a unique id can be obtained using the list tenant api
Required
template_id*
String
specify the template id to retrieve, which is a unique id can be obtained using list template api
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


executeTemplate

Execute template will return a unique job id the status of the template can be checked using the Job details api where you can pass the unique id generated to get the details or errors if any on execution


/v1/{tenant_id}/templates/{template_id}/execute

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates/{template_id}/execute"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
        TemplateExecuteReqModel templateExecuteReqModel = ; // TemplateExecuteReqModel | 
        try {
            TemplateExecuteResponse result = apiInstance.executeTemplate(tenantId, templateId, templateExecuteReqModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#executeTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
        TemplateExecuteReqModel templateExecuteReqModel = ; // TemplateExecuteReqModel | 
        try {
            TemplateExecuteResponse result = apiInstance.executeTemplate(tenantId, templateId, templateExecuteReqModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#executeTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
String *templateId = templateId_example; // specify the template id to execute, template id can be obtained from the list template api
TemplateExecuteReqModel *templateExecuteReqModel = ; // 

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

[apiInstance executeTemplateWith:tenantId
    templateId:templateId
    templateExecuteReqModel:templateExecuteReqModel
              completionHandler: ^(TemplateExecuteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api

var templateId = templateId_example; // {String} specify the template id to execute, template id can be obtained from the list template api

var templateExecuteReqModel = ; // {TemplateExecuteReqModel} 


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

namespace Example
{
    public class executeTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
            var templateId = templateId_example;  // String | specify the template id to execute, template id can be obtained from the list template api
            var templateExecuteReqModel = new TemplateExecuteReqModel(); // TemplateExecuteReqModel | 

            try
            {
                TemplateExecuteResponse result = apiInstance.executeTemplate(tenantId, templateId, templateExecuteReqModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.executeTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
$templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
$templateExecuteReqModel = ; // TemplateExecuteReqModel | 

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
my $templateId = templateId_example; # String | specify the template id to execute, template id can be obtained from the list template api
my $templateExecuteReqModel = WWW::SwaggerClient::Object::TemplateExecuteReqModel->new(); # TemplateExecuteReqModel | 

eval { 
    my $result = $api_instance->executeTemplate(tenantId => $tenantId, templateId => $templateId, templateExecuteReqModel => $templateExecuteReqModel);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->executeTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
templateId = templateId_example # String | specify the template id to execute, template id can be obtained from the list template api
templateExecuteReqModel =  # TemplateExecuteReqModel | 

try: 
    api_response = api_instance.execute_template(tenantId, templateId, templateExecuteReqModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->executeTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
Required
template_id*
String
specify the template id to execute, template id can be obtained from the list template api
Required
Body parameters
Name Description
templateExecuteReqModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listTemplates

List all the Templates. Global Scope - All the users will have access to view and execute CoreStack Marketplace Templates will not have access to update/delete the templates. Account Scope - All users under account scope will have access to view and execute the templates, only Account admins can update/delete the templates. Tenant Scope - Users having access to the specific tenant can view or execute templates. Tenant admins can only have the access toupdate/delete the templates. Private Scope - Templates created by the user will only have access for the templates under private scope.


/v1/{tenant_id}/templates

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates?limit=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to get the templates and this can be fetched from list tenant API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            TemplateListResponse result = apiInstance.listTemplates(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#listTemplates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant id to get the templates and this can be fetched from list tenant API
        Integer limit = 56; // Integer | Number of records to display
        Integer page = 56; // Integer | Page number
        try {
            TemplateListResponse result = apiInstance.listTemplates(tenantId, limit, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#listTemplates");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant id to get the templates and this can be fetched from list tenant API
Integer *limit = 56; // Number of records to display (optional)
Integer *page = 56; // Page number (optional)

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

[apiInstance listTemplatesWith:tenantId
    limit:limit
    page:page
              completionHandler: ^(TemplateListResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant id to get the templates and this can be fetched from list tenant API

var opts = { 
  'limit': 56, // {Integer} Number of records to display
  'page': 56 // {Integer} Page number
};

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

namespace Example
{
    public class listTemplatesExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant id to get the templates and this can be fetched from list tenant API
            var limit = 56;  // Integer | Number of records to display (optional) 
            var page = 56;  // Integer | Page number (optional) 

            try
            {
                TemplateListResponse result = apiInstance.listTemplates(tenantId, limit, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.listTemplates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant id to get the templates and this can be fetched from list tenant API
$limit = 56; // Integer | Number of records to display
$page = 56; // Integer | Page number

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant id to get the templates and this can be fetched from list tenant API
my $limit = 56; # Integer | Number of records to display
my $page = 56; # Integer | Page number

eval { 
    my $result = $api_instance->listTemplates(tenantId => $tenantId, limit => $limit, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->listTemplates: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant id to get the templates and this can be fetched from list tenant API
limit = 56 # Integer | Number of records to display (optional)
page = 56 # Integer | Page number (optional)

try: 
    api_response = api_instance.list_templates(tenantId, limit=limit, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->listTemplates: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant id to get the templates and this can be fetched from list tenant API
Required
Query parameters
Name Description
limit
Integer
Number of records to display
page
Integer
Page number

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateTemplate

Update Template details if required after creation using the api, the update by a user depends on the scope of the template created check create template docs for more details on the scope


/v1/{tenant_id}/templates/{template_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
        String templateId = templateId_example; // String | specify the template id to update which is a unique id can be retrieved using list template api
        CreateTemplateRequest createTemplateRequest = ; // CreateTemplateRequest | 
        try {
            TemplateUpdateResponse result = apiInstance.updateTemplate(tenantId, templateId, createTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#updateTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
        String templateId = templateId_example; // String | specify the template id to update which is a unique id can be retrieved using list template api
        CreateTemplateRequest createTemplateRequest = ; // CreateTemplateRequest | 
        try {
            TemplateUpdateResponse result = apiInstance.updateTemplate(tenantId, templateId, createTemplateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#updateTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
String *templateId = templateId_example; // specify the template id to update which is a unique id can be retrieved using list template api
CreateTemplateRequest *createTemplateRequest = ; // 

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

[apiInstance updateTemplateWith:tenantId
    templateId:templateId
    createTemplateRequest:createTemplateRequest
              completionHandler: ^(TemplateUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api

var templateId = templateId_example; // {String} specify the template id to update which is a unique id can be retrieved using list template api

var createTemplateRequest = ; // {CreateTemplateRequest} 


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

namespace Example
{
    public class updateTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
            var templateId = templateId_example;  // String | specify the template id to update which is a unique id can be retrieved using list template api
            var createTemplateRequest = new CreateTemplateRequest(); // CreateTemplateRequest | 

            try
            {
                TemplateUpdateResponse result = apiInstance.updateTemplate(tenantId, templateId, createTemplateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.updateTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
$templateId = templateId_example; // String | specify the template id to update which is a unique id can be retrieved using list template api
$createTemplateRequest = ; // CreateTemplateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
my $templateId = templateId_example; # String | specify the template id to update which is a unique id can be retrieved using list template api
my $createTemplateRequest = WWW::SwaggerClient::Object::CreateTemplateRequest->new(); # CreateTemplateRequest | 

eval { 
    my $result = $api_instance->updateTemplate(tenantId => $tenantId, templateId => $templateId, createTemplateRequest => $createTemplateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->updateTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
templateId = templateId_example # String | specify the template id to update which is a unique id can be retrieved using list template api
createTemplateRequest =  # CreateTemplateRequest | 

try: 
    api_response = api_instance.update_template(tenantId, templateId, createTemplateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->updateTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id to update template which is a unique id can be retrieved using the list tenant api
Required
template_id*
String
specify the template id to update which is a unique id can be retrieved using list template api
Required
Body parameters
Name Description
createTemplateRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


validateTemplate

Validates the Service Account and the input parameters provided for a templatebefore executing the template


/v1/{tenant_id}/templates/{template_id}/validate

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/{tenant_id}/templates/{template_id}/validate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

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

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

        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
        TemplateValidateReqModel templateValidateReqModel = ; // TemplateValidateReqModel | 
        try {
            TemplateValidateResponse result = apiInstance.validateTemplate(tenantId, templateId, templateValidateReqModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#validateTemplate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
        String templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
        TemplateValidateReqModel templateValidateReqModel = ; // TemplateValidateReqModel | 
        try {
            TemplateValidateResponse result = apiInstance.validateTemplate(tenantId, templateId, templateValidateReqModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#validateTemplate");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
String *templateId = templateId_example; // specify the template id to execute, template id can be obtained from the list template api
TemplateValidateReqModel *templateValidateReqModel = ; // 

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

[apiInstance validateTemplateWith:tenantId
    templateId:templateId
    templateValidateReqModel:templateValidateReqModel
              completionHandler: ^(TemplateValidateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TemplatesApi()

var tenantId = tenantId_example; // {String} Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api

var templateId = templateId_example; // {String} specify the template id to execute, template id can be obtained from the list template api

var templateValidateReqModel = ; // {TemplateValidateReqModel} 


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

namespace Example
{
    public class validateTemplateExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TemplatesApi();
            var tenantId = tenantId_example;  // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
            var templateId = templateId_example;  // String | specify the template id to execute, template id can be obtained from the list template api
            var templateValidateReqModel = new TemplateValidateReqModel(); // TemplateValidateReqModel | 

            try
            {
                TemplateValidateResponse result = apiInstance.validateTemplate(tenantId, templateId, templateValidateReqModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.validateTemplate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TemplatesApi();
$tenantId = tenantId_example; // String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
$templateId = templateId_example; // String | specify the template id to execute, template id can be obtained from the list template api
$templateValidateReqModel = ; // TemplateValidateReqModel | 

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

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $tenantId = tenantId_example; # String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
my $templateId = templateId_example; # String | specify the template id to execute, template id can be obtained from the list template api
my $templateValidateReqModel = WWW::SwaggerClient::Object::TemplateValidateReqModel->new(); # TemplateValidateReqModel | 

eval { 
    my $result = $api_instance->validateTemplate(tenantId => $tenantId, templateId => $templateId, templateValidateReqModel => $templateValidateReqModel);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->validateTemplate: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TemplatesApi()
tenantId = tenantId_example # String | Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
templateId = templateId_example # String | specify the template id to execute, template id can be obtained from the list template api
templateValidateReqModel =  # TemplateValidateReqModel | 

try: 
    api_response = api_instance.validate_template(tenantId, templateId, templateValidateReqModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->validateTemplate: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Specify the tenant Id of the template to be executed, this can be obtained using the list tenant api
Required
template_id*
String
specify the template id to execute, template id can be obtained from the list template api
Required
Body parameters
Name Description
templateValidateReqModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Tenants

createTenant

Creates a new tenant under a CoreStack account. There can be multiple tenants within a CoreStack account.


/v1/tenants

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/tenants"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TenantsApi;

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

public class TenantsApiExample {

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

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

        TenantsApi apiInstance = new TenantsApi();
        CreateTenantRequest createTenantRequest = ; // CreateTenantRequest | 
        try {
            TenantCreateResponse result = apiInstance.createTenant(createTenantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#createTenant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TenantsApi;

public class TenantsApiExample {

    public static void main(String[] args) {
        TenantsApi apiInstance = new TenantsApi();
        CreateTenantRequest createTenantRequest = ; // CreateTenantRequest | 
        try {
            TenantCreateResponse result = apiInstance.createTenant(createTenantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#createTenant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

CreateTenantRequest *createTenantRequest = ; // 

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

[apiInstance createTenantWith:createTenantRequest
              completionHandler: ^(TenantCreateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TenantsApi()

var createTenantRequest = ; // {CreateTenantRequest} 


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

namespace Example
{
    public class createTenantExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TenantsApi();
            var createTenantRequest = new CreateTenantRequest(); // CreateTenantRequest | 

            try
            {
                TenantCreateResponse result = apiInstance.createTenant(createTenantRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TenantsApi.createTenant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TenantsApi();
$createTenantRequest = ; // CreateTenantRequest | 

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

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

my $api_instance = WWW::SwaggerClient::TenantsApi->new();
my $createTenantRequest = WWW::SwaggerClient::Object::CreateTenantRequest->new(); # CreateTenantRequest | 

eval { 
    my $result = $api_instance->createTenant(createTenantRequest => $createTenantRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TenantsApi->createTenant: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TenantsApi()
createTenantRequest =  # CreateTenantRequest | 

try: 
    api_response = api_instance.create_tenant(createTenantRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TenantsApi->createTenant: %s\n" % e)

Parameters

Body parameters
Name Description
createTenantRequest *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteTenant

Delete a tenant by its Id. Cannot undo this action, so be cautious when performing this operation. Use updateTenant to make the tenant as suspended if required.


/v1/tenants/{tenant_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/tenants/{tenant_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TenantsApi;

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

public class TenantsApiExample {

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

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

        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the tenant to be deleted.
        try {
            TenantRemovalResponse result = apiInstance.deleteTenant(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#deleteTenant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TenantsApi;

public class TenantsApiExample {

    public static void main(String[] args) {
        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the tenant to be deleted.
        try {
            TenantRemovalResponse result = apiInstance.deleteTenant(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#deleteTenant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Id of the tenant to be deleted.

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

[apiInstance deleteTenantWith:tenantId
              completionHandler: ^(TenantRemovalResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TenantsApi()

var tenantId = tenantId_example; // {String} Id of the tenant to be deleted.


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

namespace Example
{
    public class deleteTenantExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TenantsApi();
            var tenantId = tenantId_example;  // String | Id of the tenant to be deleted.

            try
            {
                TenantRemovalResponse result = apiInstance.deleteTenant(tenantId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TenantsApi.deleteTenant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TenantsApi();
$tenantId = tenantId_example; // String | Id of the tenant to be deleted.

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

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

my $api_instance = WWW::SwaggerClient::TenantsApi->new();
my $tenantId = tenantId_example; # String | Id of the tenant to be deleted.

eval { 
    my $result = $api_instance->deleteTenant(tenantId => $tenantId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TenantsApi->deleteTenant: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TenantsApi()
tenantId = tenantId_example # String | Id of the tenant to be deleted.

try: 
    api_response = api_instance.delete_tenant(tenantId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TenantsApi->deleteTenant: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Id of the tenant to be deleted.
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getTenant

Retreive a tenant by its Id. If you're unsure of the tenant_id, use listTenant operation to list all tenants under a CoreStack account and fetch the needed tenant_id.


/v1/tenants/{tenant_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/tenants/{tenant_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TenantsApi;

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

public class TenantsApiExample {

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

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

        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the tenant ot be retrieved.
        try {
            GetTenantResponse result = apiInstance.getTenant(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#getTenant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TenantsApi;

public class TenantsApiExample {

    public static void main(String[] args) {
        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the tenant ot be retrieved.
        try {
            GetTenantResponse result = apiInstance.getTenant(tenantId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#getTenant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Id of the tenant ot be retrieved.

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

[apiInstance getTenantWith:tenantId
              completionHandler: ^(GetTenantResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TenantsApi()

var tenantId = tenantId_example; // {String} Id of the tenant ot be retrieved.


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

namespace Example
{
    public class getTenantExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TenantsApi();
            var tenantId = tenantId_example;  // String | Id of the tenant ot be retrieved.

            try
            {
                GetTenantResponse result = apiInstance.getTenant(tenantId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TenantsApi.getTenant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TenantsApi();
$tenantId = tenantId_example; // String | Id of the tenant ot be retrieved.

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

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

my $api_instance = WWW::SwaggerClient::TenantsApi->new();
my $tenantId = tenantId_example; # String | Id of the tenant ot be retrieved.

eval { 
    my $result = $api_instance->getTenant(tenantId => $tenantId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TenantsApi->getTenant: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TenantsApi()
tenantId = tenantId_example # String | Id of the tenant ot be retrieved.

try: 
    api_response = api_instance.get_tenant(tenantId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TenantsApi->getTenant: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Id of the tenant ot be retrieved.
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listTenant

There can be multiple tenants within a CoreStack account. List all tenants the user is mapped under a CoreStack account. If there are 3 tenants and user performing this operation has access to only 2 tenants then only those 2 tenants will be returned.


/v1/tenants

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/tenants"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TenantsApi;

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

public class TenantsApiExample {

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

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

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

public class TenantsApiExample {

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

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

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


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

[apiInstance listTenantWithCompletionHandler: 
              ^(ListTenantResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TenantsApi()

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

namespace Example
{
    public class listTenantExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TenantsApi();

            try
            {
                ListTenantResponse result = apiInstance.listTenant();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TenantsApi.listTenant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->listTenant();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TenantsApi->listTenant: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

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

try: 
    api_response = api_instance.list_tenant()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TenantsApi->listTenant: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateTenant

Update a tenant's status, description & metadata using its id. No operation can be performed when a tenant is made suspended.


/v1/tenants/{tenant_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/tenants/{tenant_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TenantsApi;

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

public class TenantsApiExample {

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

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

        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the CoreStack account under which the tenant to be updated.
        UpdateTenantRequest updateTenantRequest = ; // UpdateTenantRequest | 
        try {
            TenantUpdateResponse result = apiInstance.updateTenant(tenantId, updateTenantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#updateTenant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TenantsApi;

public class TenantsApiExample {

    public static void main(String[] args) {
        TenantsApi apiInstance = new TenantsApi();
        String tenantId = tenantId_example; // String | Id of the CoreStack account under which the tenant to be updated.
        UpdateTenantRequest updateTenantRequest = ; // UpdateTenantRequest | 
        try {
            TenantUpdateResponse result = apiInstance.updateTenant(tenantId, updateTenantRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TenantsApi#updateTenant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *tenantId = tenantId_example; // Id of the CoreStack account under which the tenant to be updated.
UpdateTenantRequest *updateTenantRequest = ; // 

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

[apiInstance updateTenantWith:tenantId
    updateTenantRequest:updateTenantRequest
              completionHandler: ^(TenantUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.TenantsApi()

var tenantId = tenantId_example; // {String} Id of the CoreStack account under which the tenant to be updated.

var updateTenantRequest = ; // {UpdateTenantRequest} 


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

namespace Example
{
    public class updateTenantExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new TenantsApi();
            var tenantId = tenantId_example;  // String | Id of the CoreStack account under which the tenant to be updated.
            var updateTenantRequest = new UpdateTenantRequest(); // UpdateTenantRequest | 

            try
            {
                TenantUpdateResponse result = apiInstance.updateTenant(tenantId, updateTenantRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TenantsApi.updateTenant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\TenantsApi();
$tenantId = tenantId_example; // String | Id of the CoreStack account under which the tenant to be updated.
$updateTenantRequest = ; // UpdateTenantRequest | 

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

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

my $api_instance = WWW::SwaggerClient::TenantsApi->new();
my $tenantId = tenantId_example; # String | Id of the CoreStack account under which the tenant to be updated.
my $updateTenantRequest = WWW::SwaggerClient::Object::UpdateTenantRequest->new(); # UpdateTenantRequest | 

eval { 
    my $result = $api_instance->updateTenant(tenantId => $tenantId, updateTenantRequest => $updateTenantRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TenantsApi->updateTenant: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TenantsApi()
tenantId = tenantId_example # String | Id of the CoreStack account under which the tenant to be updated.
updateTenantRequest =  # UpdateTenantRequest | 

try: 
    api_response = api_instance.update_tenant(tenantId, updateTenantRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TenantsApi->updateTenant: %s\n" % e)

Parameters

Path parameters
Name Description
tenant_id*
String
Id of the CoreStack account under which the tenant to be updated.
Required
Body parameters
Name Description
updateTenantRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Tokens

authToken

CoreStack requires Auth token to be passed in all the API headers. Auth token has to be generated and it is valid only for an hour. New token can be generated using this API. Extract Auth-token, Tenant Id & Account Id from the response. This will be required in most of the API calls


/v1/auth/tokens

Usage and SDK Samples

curl -X POST "https://localhost/v1/auth/tokens"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TokensApi;

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

public class TokensApiExample {

    public static void main(String[] args) {
        
        TokensApi apiInstance = new TokensApi();
        AuthRequest authRequest = ; // AuthRequest | 
        try {
            AuthResponse result = apiInstance.authToken(authRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#authToken");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TokensApi;

public class TokensApiExample {

    public static void main(String[] args) {
        TokensApi apiInstance = new TokensApi();
        AuthRequest authRequest = ; // AuthRequest | 
        try {
            AuthResponse result = apiInstance.authToken(authRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#authToken");
            e.printStackTrace();
        }
    }
}
AuthRequest *authRequest = ; // 

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

[apiInstance authTokenWith:authRequest
              completionHandler: ^(AuthResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');

var api = new CorestackExternalApi.TokensApi()

var authRequest = ; // {AuthRequest} 


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

namespace Example
{
    public class authTokenExample
    {
        public void main()
        {
            
            var apiInstance = new TokensApi();
            var authRequest = new AuthRequest(); // AuthRequest | 

            try
            {
                AuthResponse result = apiInstance.authToken(authRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TokensApi.authToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TokensApi();
$authRequest = ; // AuthRequest | 

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

my $api_instance = WWW::SwaggerClient::TokensApi->new();
my $authRequest = WWW::SwaggerClient::Object::AuthRequest->new(); # AuthRequest | 

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

# create an instance of the API class
api_instance = swagger_client.TokensApi()
authRequest =  # AuthRequest | 

try: 
    api_response = api_instance.auth_token(authRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TokensApi->authToken: %s\n" % e)

Parameters

Body parameters
Name Description
authRequest *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


refreshToken

Token generated in authToken API will be valid for an hour. Post that access_token will automatically expire. When the access_token is expired, there are two options. 1) use the authToken API to generate a new token 2) use refreshToken API to extend the validity of the current token.The refreshed token will also expire after an hour, refer to expires_at in the response for the validity of the token. When the refreshed token also expires, call again the refreshToken API to extend it further. Like wise a token can extended 3 times, refer to refresh_count in the response. After 3 refresh attempts, token will expire and cannot be extended any further. Need to use authToken API to generate a new token.


/v1/auth/tokens/refresh

Usage and SDK Samples

curl -X POST "https://localhost/v1/auth/tokens/refresh"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TokensApi;

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

public class TokensApiExample {

    public static void main(String[] args) {
        
        TokensApi apiInstance = new TokensApi();
        RefreshTokenRequestModel refreshTokenRequestModel = ; // RefreshTokenRequestModel | 
        try {
            RefreshTokenResponseModel result = apiInstance.refreshToken(refreshTokenRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#refreshToken");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TokensApi;

public class TokensApiExample {

    public static void main(String[] args) {
        TokensApi apiInstance = new TokensApi();
        RefreshTokenRequestModel refreshTokenRequestModel = ; // RefreshTokenRequestModel | 
        try {
            RefreshTokenResponseModel result = apiInstance.refreshToken(refreshTokenRequestModel);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#refreshToken");
            e.printStackTrace();
        }
    }
}
RefreshTokenRequestModel *refreshTokenRequestModel = ; // 

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

[apiInstance refreshTokenWith:refreshTokenRequestModel
              completionHandler: ^(RefreshTokenResponseModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');

var api = new CorestackExternalApi.TokensApi()

var refreshTokenRequestModel = ; // {RefreshTokenRequestModel} 


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

namespace Example
{
    public class refreshTokenExample
    {
        public void main()
        {
            
            var apiInstance = new TokensApi();
            var refreshTokenRequestModel = new RefreshTokenRequestModel(); // RefreshTokenRequestModel | 

            try
            {
                RefreshTokenResponseModel result = apiInstance.refreshToken(refreshTokenRequestModel);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TokensApi.refreshToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TokensApi();
$refreshTokenRequestModel = ; // RefreshTokenRequestModel | 

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

my $api_instance = WWW::SwaggerClient::TokensApi->new();
my $refreshTokenRequestModel = WWW::SwaggerClient::Object::RefreshTokenRequestModel->new(); # RefreshTokenRequestModel | 

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

# create an instance of the API class
api_instance = swagger_client.TokensApi()
refreshTokenRequestModel =  # RefreshTokenRequestModel | 

try: 
    api_response = api_instance.refresh_token(refreshTokenRequestModel)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TokensApi->refreshToken: %s\n" % e)

Parameters

Body parameters
Name Description
refreshTokenRequestModel *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Users

changePassword

Update the password of the user. This password will be used for login to portal and it will not affect the Access Key / Secret Key associated with the user. Cannot update password of another user within the same CoreStack account. Can be updated for the user associated with Access Key / Secret Key


/v1/users/{user_id}/changepassword

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/users/{user_id}/changepassword"
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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        ChangePasswordRequest changePasswordRequest = ; // ChangePasswordRequest | 
        try {
            ChangePasswordResponse result = apiInstance.changePassword(userId, changePasswordRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changePassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        ChangePasswordRequest changePasswordRequest = ; // ChangePasswordRequest | 
        try {
            ChangePasswordResponse result = apiInstance.changePassword(userId, changePasswordRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changePassword");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *userId = userId_example; // 
ChangePasswordRequest *changePasswordRequest = ; // 

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

[apiInstance changePasswordWith:userId
    changePasswordRequest:changePasswordRequest
              completionHandler: ^(ChangePasswordResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userId = userId_example; // {String} 

var changePasswordRequest = ; // {ChangePasswordRequest} 


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

namespace Example
{
    public class changePasswordExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userId = userId_example;  // String | 
            var changePasswordRequest = new ChangePasswordRequest(); // ChangePasswordRequest | 

            try
            {
                ChangePasswordResponse result = apiInstance.changePassword(userId, changePasswordRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.changePassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = userId_example; // String | 
$changePasswordRequest = ; // ChangePasswordRequest | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = userId_example; # String | 
my $changePasswordRequest = WWW::SwaggerClient::Object::ChangePasswordRequest->new(); # ChangePasswordRequest | 

eval { 
    my $result = $api_instance->changePassword(userId => $userId, changePasswordRequest => $changePasswordRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->changePassword: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = userId_example # String | 
changePasswordRequest =  # ChangePasswordRequest | 

try: 
    api_response = api_instance.change_password(userId, changePasswordRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->changePassword: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
String
Required
Body parameters
Name Description
changePasswordRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


changeTimezone

Update the timezone settings of the user. In CoreStack portal, wherever the datatime is shown it is converted to the timezone set to the user. Cannot update timezone of another user within the same CoreStack account. Can be updated for the user associated with Access Key / Secret Key


/v1/users/{user_id}/changetimezone

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/users/{user_id}/changetimezone"
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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        ChangeTimezoneRequest changeTimezoneRequest = ; // ChangeTimezoneRequest | 
        try {
            ChangeTimezoneResponse result = apiInstance.changeTimezone(userId, changeTimezoneRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeTimezone");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        ChangeTimezoneRequest changeTimezoneRequest = ; // ChangeTimezoneRequest | 
        try {
            ChangeTimezoneResponse result = apiInstance.changeTimezone(userId, changeTimezoneRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeTimezone");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *userId = userId_example; // 
ChangeTimezoneRequest *changeTimezoneRequest = ; // 

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

[apiInstance changeTimezoneWith:userId
    changeTimezoneRequest:changeTimezoneRequest
              completionHandler: ^(ChangeTimezoneResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userId = userId_example; // {String} 

var changeTimezoneRequest = ; // {ChangeTimezoneRequest} 


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

namespace Example
{
    public class changeTimezoneExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userId = userId_example;  // String | 
            var changeTimezoneRequest = new ChangeTimezoneRequest(); // ChangeTimezoneRequest | 

            try
            {
                ChangeTimezoneResponse result = apiInstance.changeTimezone(userId, changeTimezoneRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.changeTimezone: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = userId_example; // String | 
$changeTimezoneRequest = ; // ChangeTimezoneRequest | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = userId_example; # String | 
my $changeTimezoneRequest = WWW::SwaggerClient::Object::ChangeTimezoneRequest->new(); # ChangeTimezoneRequest | 

eval { 
    my $result = $api_instance->changeTimezone(userId => $userId, changeTimezoneRequest => $changeTimezoneRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->changeTimezone: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = userId_example # String | 
changeTimezoneRequest =  # ChangeTimezoneRequest | 

try: 
    api_response = api_instance.change_timezone(userId, changeTimezoneRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->changeTimezone: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
String
Required
Body parameters
Name Description
changeTimezoneRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createUser

Creates an user within a CoreStack account and assign different roles for different tenants. There can be multiple tenants within a CoreStack account. User will be created at the account level and mapped to multiple tenants as needed.


/v1/users

Usage and SDK Samples

curl -X POST -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        UserCreateRequest userCreateRequest = ; // UserCreateRequest | 
        try {
            UserCreateResponse result = apiInstance.createUser(userCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        UserCreateRequest userCreateRequest = ; // UserCreateRequest | 
        try {
            UserCreateResponse result = apiInstance.createUser(userCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

UserCreateRequest *userCreateRequest = ; // 

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

[apiInstance createUserWith:userCreateRequest
              completionHandler: ^(UserCreateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userCreateRequest = ; // {UserCreateRequest} 


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

namespace Example
{
    public class createUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userCreateRequest = new UserCreateRequest(); // UserCreateRequest | 

            try
            {
                UserCreateResponse result = apiInstance.createUser(userCreateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userCreateRequest = ; // UserCreateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userCreateRequest = WWW::SwaggerClient::Object::UserCreateRequest->new(); # UserCreateRequest | 

eval { 
    my $result = $api_instance->createUser(userCreateRequest => $userCreateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createUser: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userCreateRequest =  # UserCreateRequest | 

try: 
    api_response = api_instance.create_user(userCreateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createUser: %s\n" % e)

Parameters

Body parameters
Name Description
userCreateRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteUser

Deletes the User from CoreStack system. This operation cannot be undone.


/v1/users/{user_id}

Usage and SDK Samples

curl -X DELETE -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/users/{user_id}"
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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        try {
            UserDeleteResponse result = apiInstance.deleteUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        try {
            UserDeleteResponse result = apiInstance.deleteUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *userId = userId_example; // 

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

[apiInstance deleteUserWith:userId
              completionHandler: ^(UserDeleteResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userId = userId_example; // {String} 


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

namespace Example
{
    public class deleteUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userId = userId_example;  // String | 

            try
            {
                UserDeleteResponse result = apiInstance.deleteUser(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.deleteUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = userId_example; // String | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = userId_example; # String | 

eval { 
    my $result = $api_instance->deleteUser(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->deleteUser: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = userId_example # String | 

try: 
    api_response = api_instance.delete_user(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->deleteUser: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
String
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


describeUser

Describes an User by ID. This provides detailed information about a user


/v1/users/{user_id}

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/users/{user_id}"
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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        try {
            UserDescribeResponse result = apiInstance.describeUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#describeUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        try {
            UserDescribeResponse result = apiInstance.describeUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#describeUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *userId = userId_example; // 

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

[apiInstance describeUserWith:userId
              completionHandler: ^(UserDescribeResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userId = userId_example; // {String} 


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

namespace Example
{
    public class describeUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userId = userId_example;  // String | 

            try
            {
                UserDescribeResponse result = apiInstance.describeUser(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.describeUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = userId_example; // String | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = userId_example; # String | 

eval { 
    my $result = $api_instance->describeUser(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->describeUser: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = userId_example # String | 

try: 
    api_response = api_instance.describe_user(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->describeUser: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
String
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


listUser

List all users within a CoreStack account.


/v1/users

Usage and SDK Samples

curl -X GET -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

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

public class UsersApiExample {

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

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

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


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

[apiInstance listUserWithCompletionHandler: 
              ^(UserResponseList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

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

namespace Example
{
    public class listUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();

            try
            {
                UserResponseList result = apiInstance.listUser();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.listUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

eval { 
    my $result = $api_instance->listUser();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->listUser: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

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

try: 
    api_response = api_instance.list_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->listUser: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateUser

Updates a user and their role assignment in multiple tenants.


/v1/users/{user_id}

Usage and SDK Samples

curl -X PUT -H "X-Auth-Token: [[apiKey]]" -H "X-Auth-User: [[apiKey]]" "https://localhost/v1/users/{user_id}"
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: auth_token
        ApiKeyAuth auth_token = (ApiKeyAuth) defaultClient.getAuthentication("auth_token");
        auth_token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //auth_token.setApiKeyPrefix("Token");

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

        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        UserUpdateRequest userUpdateRequest = ; // UserUpdateRequest | 
        try {
            UserUpdateResponse result = apiInstance.updateUser(userId, userUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = userId_example; // String | 
        UserUpdateRequest userUpdateRequest = ; // UserUpdateRequest | 
        try {
            UserUpdateResponse result = apiInstance.updateUser(userId, userUpdateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

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

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

String *userId = userId_example; // 
UserUpdateRequest *userUpdateRequest = ; // 

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

[apiInstance updateUserWith:userId
    userUpdateRequest:userUpdateRequest
              completionHandler: ^(UserUpdateResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorestackExternalApi = require('corestack_external_api');
var defaultClient = CorestackExternalApi.ApiClient.instance;

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

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

var api = new CorestackExternalApi.UsersApi()

var userId = userId_example; // {String} 

var userUpdateRequest = ; // {UserUpdateRequest} 


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

namespace Example
{
    public class updateUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: auth_token
            Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
            // Configure API key authorization: auth_user
            Configuration.Default.ApiKey.Add("X-Auth-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Auth-User", "Bearer");

            var apiInstance = new UsersApi();
            var userId = userId_example;  // String | 
            var userUpdateRequest = new UserUpdateRequest(); // UserUpdateRequest | 

            try
            {
                UserUpdateResponse result = apiInstance.updateUser(userId, userUpdateRequest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.updateUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = userId_example; // String | 
$userUpdateRequest = ; // UserUpdateRequest | 

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

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = userId_example; # String | 
my $userUpdateRequest = WWW::SwaggerClient::Object::UserUpdateRequest->new(); # UserUpdateRequest | 

eval { 
    my $result = $api_instance->updateUser(userId => $userId, userUpdateRequest => $userUpdateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->updateUser: $@\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: auth_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Configure API key authorization: auth_user
swagger_client.configuration.api_key['X-Auth-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-User'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = userId_example # String | 
userUpdateRequest =  # UserUpdateRequest | 

try: 
    api_response = api_instance.update_user(userId, userUpdateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->updateUser: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
String
Required
Body parameters
Name Description
userUpdateRequest *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error