Skip to content

Latest commit

 

History

History
265 lines (187 loc) · 8.8 KB

File metadata and controls

265 lines (187 loc) · 8.8 KB

Onepanel.ServiceConfigurationApi

All URIs are relative to https://localhost/api/v3/onepanel

Method HTTP request Description
getGuiMessage GET /zone/gui_messages/{id} Get settings of a Onezone GUI message
getZonePolicies GET /zone/policies Get Onezone policies
modifyGuiMessage PATCH /zone/gui_messages/{id} Modify settings of a Onezone GUI message
modifyZonePolicies PATCH /zone/policies Modify current Onezone policies

getGuiMessage

GuiMessage getGuiMessage(id)

Get settings of a Onezone GUI message

Returns settings of a message displayed in Onezone GUI.

Example

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.ServiceConfigurationApi();

var id = "id_example"; // String | Possible values are:   - cookie_consent_notification - for the contents of cookie consent popup   - privacy_policy - for the contents of the privacy policy document   - terms_of_use - for the contents of the Terms of Use document   - signin_notification - for the message displayed on the Onezone sign in screen 


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

Parameters

Name Type Description Notes
id String Possible values are: - cookie_consent_notification - for the contents of cookie consent popup - privacy_policy - for the contents of the privacy policy document - terms_of_use - for the contents of the Terms of Use document - signin_notification - for the message displayed on the Onezone sign in screen

Return type

GuiMessage

Authorization

api_key1, api_key2, basic

HTTP request headers

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

getZonePolicies

ZonePolicies getZonePolicies()

Get Onezone policies

Returns restrictions placed on Onezone operations such as registering Oneproviders.

Example

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.ServiceConfigurationApi();

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

Parameters

This endpoint does not need any parameter.

Return type

ZonePolicies

Authorization

api_key1, api_key2, basic

HTTP request headers

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

modifyGuiMessage

modifyGuiMessage(id, messageChange)

Modify settings of a Onezone GUI message

Enables, disables or modifies a message displayed in Onezone GUI.

Example

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.ServiceConfigurationApi();

var id = "id_example"; // String | Possible values are:   - cookie_consent_notification - for the contents of cookie consent popup   - privacy_policy - for the contents of the privacy policy document   - terms_of_use - for the contents of the Terms of Use document   - signin_notification - for the message displayed on the Onezone sign in screen 

var messageChange = new Onepanel.GuiMessage(); // GuiMessage | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.modifyGuiMessage(id, messageChange, callback);

Parameters

Name Type Description Notes
id String Possible values are: - cookie_consent_notification - for the contents of cookie consent popup - privacy_policy - for the contents of the privacy policy document - terms_of_use - for the contents of the Terms of Use document - signin_notification - for the message displayed on the Onezone sign in screen
messageChange GuiMessage

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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

modifyZonePolicies

modifyZonePolicies(zonePolicies)

Modify current Onezone policies

Modifies restrictions placed on Onezone operations such as registering providers.

Example

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.ServiceConfigurationApi();

var zonePolicies = new Onepanel.ZonePolicies(); // ZonePolicies | New values for Onezone policies.


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

Parameters

Name Type Description Notes
zonePolicies ZonePolicies New values for Onezone policies.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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