API: Manage webserver

From BrainyCP
Revision as of 13:13, 26 July 2021 by Alenka (talk | contribs) (Protected "API: Manage webserver" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))

Jump to: navigation, search
Administrative functions require API root rights in order to use any login hosted on the server. If you do not have root rights, you can only use your login.
Incoming data marked with an asterisk are required.

Module

Function

Incoming data

Error variants

apacserver

Setting a password for a directory.

set_password

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
set_password (post or get) * - constant, operation name;
directory (post or get) * - directory;
password (post) * - password;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Success';
error: -1, mess: 'The directory does not exist or the format is invalid';
error: -1, mess: 'Weak password';
error: -2, mess: 'The password for this folder already exists';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Removing a directory

.

delete_password

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
delete_password (post or get) * - constant, operation name;
directory (post or get) * - directory;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Success';
error: -1, mess: 'Not completed';
error: 100, mess: 'The directory does not exist or the format is invalid';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Browse password-protected directories.

list_directory

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
list_directory (post or get) * - constant, operation name;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'List of password-protected directories', detail [array_directory];
error: 100, mess: 'The list of password-protected directories is empty';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Redirect from http to https / https to http.

add_http

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
add_http (post or get) * - constant, operation name;
site (post or get) * - domain for redirection;
type (post or get) * - type of redirection (http, https);
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Forwarding added successfully';
error: -1, mess: 'This type of forwarding already exists;
error: -1, mess: 'A redirect already exists for this site .;
error: 100, mess: 'This is not yours', detail [list_domain;
error: 101, mess: 'Non-existent type', detail [array_type];
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Show list of sites.

list_http

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
list_http (post or get) * - constant, operation name;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'List of domains', detail [array_domain];
error: 100, mess: 'The list of domains is empty';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Listing directories.

list_directory_http

username (post or get) * - username;

password (post or get) * - user password;

apacserver (post or get) * - constant, module name;

list_directory_http (post or get) * - constant, operation name;

user_edit (post or get) - the name of the user being edited;

language (post or get) - can take the value: en / ru (ru by default).

error: 0, mess: 'List of Directories', detail [array_directory];
error: 100, mess: 'Directory List is empty';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Delete directory.

delete_http

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
delete_http (post or get) * - constant, operation name;
site (post or get) * - domain (redirect to be deleted);
uniq_id (post or get) * - unique identifier;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Forwarding successfully deleted';
error: -1, mess: 'There are no rights for this operation!';
error: 100, mess: 'This is not yours';
error: 400, message: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Display a list of redirects.

list_www

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
list_www (post or get) * - constant, operation name;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, message: 'Forwarding list', detail [array_forwarding];
error: 100, message: 'The forwarding list is empty';
error: 400, message: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Delete redirect

delete_www

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
delete_www (post or get) * - constant, operation name;
uniq_id (post or get) * - uical identifier (needed for deletion);
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Forwarding successfully deleted';
error: -1, mess: 'There are no rights for this operation!';
error: 100, mess: 'The unic_id was entered incorrectly. Or this redirection is no longer there ';
error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.

apacserver

Web-redirect

add_www

username (post or get) * - username;
password (post or get) * - user password;
apacserver (post or get) * - constant, module name;
add_www (post or get) * - constant, operation name;
domain (post) * - domain;
select_www (post or get) * - redirect method;
site_forwarding (post) * - where the redirect leads;
src (post or get) * - path for forwarding;
draft (post or get) - false by default;
user_edit (post or get) - the name of the user being edited;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Forwarding added successfully';
error: -1, mess: 'This type of forwarding already exists';
error: -1, mess: 'Invalid destination format';
error: -1, mess: 'Invalid site name format';
error: -1, mess: 'There are no rights for this operation!';
error: 101, mess: 'Domain does not exist.', detail [array_list_domain];
error: 102, mess: 'Forwarding assigned incorrectly', detail [array_list_forwarding];
error: 103, mess: 'No forwarding path specified'.

Other useful articles:

API: подключение

API: мониторинг

API: статус веб-сервера

API: автоустановщик CMS

API: настройка бекапов

API: трансфер между серверами

API: антивирус

API: настройки сервера

API: управление веб-сервером

API: базы данных

API: пользовательские сертификаты

API: управление почтовыми ящиками

API: информация о сервере

API: почта

API: управление DNS-зонами

API: использование трафика

API: почтовые ящики клиента

API: установка веб-сервера

API: логирование

API: сервер имен

API: хост-аккаунты

API: менеджер приложений

API: сертификаты сервисов

API: CRON

API: менеджер процессов

API: сетевые инструменты

API: FTP-сервер

API: менеджер IP-адресов

API: средняя нагрузка

API: MySQL processlist