All URIs are relative to https://localhost/api/v3/onepanel
Method | HTTP request | Description |
---|---|---|
getEmergencyPassphraseStatus | GET /emergency_passphrase | Get emergency passphrase status |
getWebCert | GET /web_cert | Get information about SSL certificates configuration and status |
modifyWebCert | PATCH /web_cert | Modify SSL certificate configuration |
setEmergencyPassphrase | PUT /emergency_passphrase | Set emergency passphrase |
EmergencyPassphraseStatus getEmergencyPassphraseStatus()
Get emergency passphrase status
Returns information whether emergency passphrase is set.
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.SecurityApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getEmergencyPassphraseStatus(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
WebCert getWebCert()
Get information about SSL certificates configuration and status
Returns information about SSL certificate status and renewal configuration.
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.SecurityApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getWebCert(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
modifyWebCert(webCertModifyRequest)
Modify SSL certificate configuration
Modifies configuration regarding certificate management. Allows enabling or disabling certificate autorenewal using Let's Encrypt service.
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.SecurityApi();
var webCertModifyRequest = new Onepanel.WebCertModifyRequest(); // WebCertModifyRequest | New values for certificate management configuration.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.modifyWebCert(webCertModifyRequest, callback);
Name | Type | Description | Notes |
---|---|---|---|
webCertModifyRequest | WebCertModifyRequest | New values for certificate management configuration. |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined
setEmergencyPassphrase(emergencyPassphrase)
Set emergency passphrase
Sets passphrase which can be used to access the Onepanel REST API and emergency Onepanel GUI. May be invoked without credentials when no passphrase is set.
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.SecurityApi();
var emergencyPassphrase = new Onepanel.EmergencyPassphraseChangeRequest(); // EmergencyPassphraseChangeRequest |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.setEmergencyPassphrase(emergencyPassphrase, callback);
Name | Type | Description | Notes |
---|---|---|---|
emergencyPassphrase | EmergencyPassphraseChangeRequest |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined