Difference between revisions of "API: Nameserver"

From BrainyCP
Jump to: navigation, search
m (Protected "API: Nameserver" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(No difference)

Revision as of 13:07, 26 July 2021

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

bindserver

Start/stop/restart of nameserver.

operation

 
Username (post or get) * - username;

password (post or get) * - user password;

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

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

command (post or get) * - choice

commands:

start - Start bind server;

restart - restart the bind server;

stop - stop the bind server.

language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Command completed', detail [console message];
error: 100, mess: 'Error in command writing', detail [list of commands];
error: 101, mess: 'Error in command execution';
error: 400, mess: 'Unfortunately, the module is not available to you.'

bindserver

Show list of ns-servers by default.

list_ns_server

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
list_ns_server (post or get) * - constant, operation name;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'List of NS servers', detail [list_ns_server];
error: 100, mess: 'The list of NS servers is empty';
error: 400, mess: 'Unfortunately, the module is not available to you.'

bindserver

Editing the default ns-server list (adding, deleting, replacing, reordering).

edit_ns_server

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
edit_ns_server (post or get) * - constant, operation name;
operetion (post or get) * - takes values:
delete - Delete ns server;
add - add ns server;
edit_number - change the order;
edit_claster - Takes an array of key values.
When you select add, the required parameters are host, ip (Hostname and its ip).
If you select delete, the required parameters are host (Delete selected host).
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'The NS records table is saved by default';
error: 1, mess: 'The specified zone name is invalid';
error: 2, mess: 'The specified IP address is invalid';
error: 100, mess: 'The value must be an array';
error: 400, mess: 'Unfortunately, the module is not available to you.'

bindserver

Reassembling.

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
rebild (post or get) * - constant, operation name;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'The NS records table was successfully rebuilt';
error: 400, mess: 'Unfortunately, the module is not available to you.'

bindserver

Show cluster.

show_claster

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
show_claster (post or get) * - constant, operation name;
language (post or get) - can take the value: en / ru (ru by default).

 

error: 0, message: 'View cluster array', detail [array_claster]; error: 100, message: 'The cluster array is empty'; error: 400, message: 'Unfortunately, the module is not available to you.'

bindserver

Generate and save key.

token

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
token (post or get) * - constant, operation name;
command (post or get) * - command:
generate - key generation;
save - save the key.
When choosing save:
token (post or get) * - the key to be saved.
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Key generated', detail [key];
error: 100, mess: 'Error in key generation';
error: 101, mess: 'Empty or invalid key value';
error: 400, mess: 'Unfortunately, the module is not available to you.'

bindserver

Delete server from cluster.

delete_cluster

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
delete_cluster (post or get) * - constant, operation name;
ip (post or get) * - the ip-address of the server to be removed from the cluster;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, message: 'Delete request completed';
error: 100, message: 'Incorrect ip address entered';
error: 400, message: 'Unfortunately, the module is not available to you.'

bindserver

Edit server in cluster.

edit_cluster

 

username (post or get) * - username; password (post or get) * - user password; bindserver (post or get) * - constant, module name; edit_cluster (post or get) * - constant, operation name; ip (post or get) * - the ip-address of the edited server from the cluster; host (post or get) * - host of the edited server; key (post or get) * - sha256 key; type (post or get) * - takes 2 values ​​one, two; enable (post or get) - default 0; language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess: 'Sucessfully edited';
error: 100, mess: 'Invalid value type', detail [type];
error: 101, mess: 'Invalid ID';
error: 102, mess: 'Invalid IP Address';
error: 103, mess: 'Invalid HOST';
error: 104, mess: 'Invalid key';
error: 106, mess: 'There is no connection to server'.

bindserver

Adding server to cluster.

add_cluster

username (post or get) * - username;
password (post or get) * - user password;
bindserver (post or get) * - constant, module name;
edit_cluster (post or get) * - constant, operation name;
ip (post or get) * - the ip-address of the server added to the cluster;
host (post or get) * - host of the added server;
key (post or get) * - sha256 key;
type (post or get) * - takes 2 values ​​one, two;
language (post or get) - can take the value: en / ru (ru by default).
error: 0, mess:
error: 100, mess: 'Invalid ip-address entered';
error: 101, mess: 'Missing host value';
error: 102, mess: 'Missing key value';
error: 103, mess: 'Invalid value type', detail [type];
error: 106, mess: 'There is no connection to server';
error: 110, mess: 'Another error';
error: 400, mess: 'Unfortunately, the module is not available to you.'

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