All URIs are relative to https://www.koronacloud.com/web/api/v3
Method | HTTP request | Description |
---|---|---|
addCustomers | POST /accounts/{koronaAccountId}/customers | adds a batch of new customers |
deleteCustomer | DELETE /accounts/{koronaAccountId}/customers/{customerId} | deletes the single customer |
getCustomer | GET /accounts/{koronaAccountId}/customers/{customerId} | returns the single customer |
getCustomers | GET /accounts/{koronaAccountId}/customers | lists all customers |
updateCustomer | PATCH /accounts/{koronaAccountId}/customers/{customerId} | updates the single customer |
updateCustomers | PATCH /accounts/{koronaAccountId}/customers | updates a batch of customers |
[AddOrUpdateResult] addCustomers(body, koronaAccountId)
adds a batch of new customers
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.CustomersApi();
var body = [new KoronacloudApiV3.Customer()]; // [Customer] | an array of new customers
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.addCustomers(body, koronaAccountId, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | [Customer] | an array of new customers | |
koronaAccountId | String | account id of the korona.cloud account |
- Content-Type: application/json
- Accept: application/json
deleteCustomer(customerId, koronaAccountId)
deletes the single customer
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.CustomersApi();
var customerId = "customerId_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.deleteCustomer(customerId, koronaAccountId, callback);
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | id of the related object (important: id should match the uuid-format) | |
koronaAccountId | String | account id of the korona.cloud account |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Customer getCustomer(customerId, koronaAccountId)
returns the single customer
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.CustomersApi();
var customerId = "customerId_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.getCustomer(customerId, koronaAccountId, callback);
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | id of the related object (important: id should match the uuid-format) | |
koronaAccountId | String | account id of the korona.cloud account |
- Content-Type: application/json
- Accept: application/json
ResultListCustomer getCustomers(koronaAccountId, opts)
lists all customers
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.CustomersApi();
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.getCustomers(koronaAccountId, opts, callback);
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] |
- Content-Type: application/json
- Accept: application/json
updateCustomer(customerId, body, koronaAccountId)
updates the single customer
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.CustomersApi();
var customerId = "customerId_example"; // String | id of the related object (important: id should match the uuid-format)
var body = new KoronacloudApiV3.Customer(); // Customer | the properties to update of the customer
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.updateCustomer(customerId, body, koronaAccountId, callback);
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | id of the related object (important: id should match the uuid-format) | |
body | Customer | the properties to update of the customer | |
koronaAccountId | String | account id of the korona.cloud account |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[AddOrUpdateResult] updateCustomers(body, koronaAccountId)
updates a batch of customers
[number] must be set in the objects, otherwise the object cannot be updated
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.CustomersApi();
var body = [new KoronacloudApiV3.Customer()]; // [Customer] | an array of existing customers
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.updateCustomers(body, koronaAccountId, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | [Customer] | an array of existing customers | |
koronaAccountId | String | account id of the korona.cloud account |
- Content-Type: application/json
- Accept: application/json