All URIs are relative to https://localhost/api/v3/onepanel
Method | HTTP request | Description |
---|---|---|
addProvider | POST /provider | Register provider |
getOnezoneInfo | GET /provider/onezone_info | Get Onezone information |
getProvider | GET /provider | Get provider details |
modifyProvider | PATCH /provider | Modify provider details |
removeProvider | DELETE /provider | Unregister provider |
addProvider(providerRegisterRequest)
Register provider
Registers provider in the zone.
var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;
// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';
// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';
var apiInstance = new Onepanel.OneproviderIdentityApi();
var providerRegisterRequest = new Onepanel.ProviderRegisterRequest(); // ProviderRegisterRequest | The new provider details.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addProvider(providerRegisterRequest, callback);
Name | Type | Description | Notes |
---|---|---|---|
providerRegisterRequest | ProviderRegisterRequest | The new provider details. |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined
OnezoneInfo getOnezoneInfo(opts)
Get Onezone information
Get information about a Onezone. Before registration, this endpoint requires a registration token and returns information about the Onezone which issued the token. If the Oneprovider is registered, returns information about the Onezone at which the provider is registered.
var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;
// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';
// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';
var apiInstance = new Onepanel.OneproviderIdentityApi();
var opts = {
'token': "token_example" // String | Oneprovider registration token obtained from Onezone. Required if the Oneprovider is not registered.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getOnezoneInfo(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
token | String | Oneprovider registration token obtained from Onezone. Required if the Oneprovider is not registered. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ProviderDetails getProvider()
Get provider details
Returns the basic configuration information of the provider.
var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;
// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';
// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';
var apiInstance = new Onepanel.OneproviderIdentityApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getProvider(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
modifyProvider(providerModifyRequest)
Modify provider details
Modifies basic provider details in the zone.
var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;
// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';
// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';
var apiInstance = new Onepanel.OneproviderIdentityApi();
var providerModifyRequest = new Onepanel.ProviderModifyRequest(); // ProviderModifyRequest | New values for provider configuration parameters which should be changed.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.modifyProvider(providerModifyRequest, callback);
Name | Type | Description | Notes |
---|---|---|---|
providerModifyRequest | ProviderModifyRequest | New values for provider configuration parameters which should be changed. |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined
removeProvider()
Unregister provider
Unregisters provider from the zone.
var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;
// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';
// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';
var apiInstance = new Onepanel.OneproviderIdentityApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.removeProvider(callback);
This endpoint does not need any parameter.
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined