Skip to content

Latest commit

 

History

History
executable file
·
356 lines (239 loc) · 9.94 KB

File metadata and controls

executable file
·
356 lines (239 loc) · 9.94 KB

KoronacloudApiV3.TagsApi

All URIs are relative to https://www.koronacloud.com/web/api/v3

Method HTTP request Description
addTags POST /accounts/{koronaAccountId}/tags adds a batch of new tags
deleteTag DELETE /accounts/{koronaAccountId}/tags/{tagId} deletes the single tag
getTag GET /accounts/{koronaAccountId}/tags/{tagId} returns the single tag
getTags GET /accounts/{koronaAccountId}/tags lists all tags
updateTag PATCH /accounts/{koronaAccountId}/tags/{tagId} updates the single tag
updateTags PATCH /accounts/{koronaAccountId}/tags updates a batch of tags

addTags

[AddOrUpdateResult] addTags(body, koronaAccountId)

adds a batch of new tags

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var body = [new KoronacloudApiV3.Tag()]; // [Tag] | array of new tags

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addTags(body, koronaAccountId, callback);

Parameters

Name Type Description Notes
body [Tag] array of new tags
koronaAccountId String account id of the korona.cloud account

Return type

[AddOrUpdateResult]

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteTag

deleteTag(tagId, koronaAccountId)

deletes the single tag

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var tagId = "tagId_example"; // String | id of the related object (important: id should match the uuid-format)

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteTag(tagId, koronaAccountId, callback);

Parameters

Name Type Description Notes
tagId String id of the related object (important: id should match the uuid-format)
koronaAccountId String account id of the korona.cloud account

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTag

Tag getTag(tagId, koronaAccountId)

returns the single tag

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var tagId = "tagId_example"; // String | id of the related object (important: id should match the uuid-format)

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTag(tagId, koronaAccountId, callback);

Parameters

Name Type Description Notes
tagId String id of the related object (important: id should match the uuid-format)
koronaAccountId String account id of the korona.cloud account

Return type

Tag

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTags

ResultListTag getTags(koronaAccountId, opts)

lists all tags

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account

var opts = { 
  'page': 56, // Number | number of the page to fetch
  'size': 56, // Number | amount of objects to return per page
  'sort': "sort_example", // String | attribute to sort by (multiple separated by comma; max. 5)
  'revision': 789, // Number | last revision number, objects with a greater revision than this will be returned
  'includeDeleted': true // Boolean | indicates deleted objects should be loaded or not (default: false)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTags(koronaAccountId, opts, callback);

Parameters

Name Type Description Notes
koronaAccountId String account id of the korona.cloud account
page Number number of the page to fetch [optional]
size Number amount of objects to return per page [optional]
sort String attribute to sort by (multiple separated by comma; max. 5) [optional]
revision Number last revision number, objects with a greater revision than this will be returned [optional]
includeDeleted Boolean indicates deleted objects should be loaded or not (default: false) [optional]

Return type

ResultListTag

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateTag

updateTag(tagId, body, koronaAccountId)

updates the single tag

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var tagId = "tagId_example"; // String | id of the related object (important: id should match the uuid-format)

var body = new KoronacloudApiV3.Tag(); // Tag | the properties to update of the tag

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateTag(tagId, body, koronaAccountId, callback);

Parameters

Name Type Description Notes
tagId String id of the related object (important: id should match the uuid-format)
body Tag the properties to update of the tag
koronaAccountId String account id of the korona.cloud account

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateTags

[AddOrUpdateResult] updateTags(body, koronaAccountId)

updates a batch of tags

[number] must be set in the objects, otherwise the object cannot be updated

Example

var KoronacloudApiV3 = require('cloud-api-v3-js-client');
var defaultClient = KoronacloudApiV3.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new KoronacloudApiV3.TagsApi();

var body = [new KoronacloudApiV3.Tag()]; // [Tag] | array of existing tags

var koronaAccountId = "koronaAccountId_example"; // String | account id of the korona.cloud account


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateTags(body, koronaAccountId, callback);

Parameters

Name Type Description Notes
body [Tag] array of existing tags
koronaAccountId String account id of the korona.cloud account

Return type

[AddOrUpdateResult]

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json