Difference between revisions of "API: Configuring backups"
From BrainyCP
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
| | ||
− | + | <div data-placeholder="Перевод" dir="ltr">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.</div> <div data-placeholder="Перевод" dir="ltr">Incoming data marked with an asterisk are required.</div> | |
− | |||
− | |||
− | |||
− | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
|- | |- | ||
− | | <p dir="ltr" style="text-align: center;">''' | + | | <p dir="ltr" style="text-align: center;">'''Module'''</p> |
− | | <p dir="ltr" style="text-align: center;">''' | + | | <p dir="ltr" style="text-align: center;">'''Function'''</p> |
− | | <p dir="ltr" style="text-align: center;">''' | + | | <p dir="ltr" style="text-align: center;">'''Incoming data'''</p> |
− | | <p dir="ltr" style="text-align: center;">''' | + | | <p dir="ltr" style="text-align: center;">'''Error variants'''</p> |
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 17: | Line 13: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Display backup jobs for the user. | |
list_jobs_backup | list_jobs_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">list_backup (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">user_edit (post or get) - List of backup jobs for the user;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Displaying an array of tasks', detail [array_list_job];</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'There are no jobs';</div> <div data-placeholder="Перевод" dir="ltr">error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.</div> |
− | |||
− | password (post | ||
− | |||
− | backup (post | ||
− | |||
− | list_backup(post | ||
− | |||
− | user_edit (post | ||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
− | error:400, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 46: | Line 24: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Display backup list | |
list_backup | list_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">list_backup (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">user_edit (post or get) - List of backups for the user;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'List backup', detail [array_list_backup];</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'The backup list is empty';</div> <div data-placeholder="Перевод" dir="ltr">error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.</div> |
− | |||
− | password (post | ||
− | |||
− | backup (post | ||
− | |||
− | list_backup(post | ||
− | |||
− | user_edit (post | ||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
− | error:400, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 75: | Line 35: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Create new backup task. | |
add_backup | add_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">add_backup (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox);</div> <div data-placeholder="Перевод" dir="ltr">local_path (post or get) * - default (empty).</div> <div data-placeholder="Перевод" dir="ltr">When choosing local:</div> <div data-placeholder="Перевод" dir="ltr">local_path (post or get) * - default (/).</div> <div data-placeholder="Перевод" dir="ltr">When selecting remote:</div> <div data-placeholder="Перевод" dir="ltr">remoteip (post or get) * - remote server;</div> |
− | username (post | + | |
− | + | <div data-placeholder="Перевод" dir="ltr">remote_folder (post or get) * - remote folder;</div> <div data-placeholder="Перевод" dir="ltr">type_auth (post or get) * - authentication type key, pass.</div> <div data-placeholder="Перевод" dir="ltr">remote_port (post or get) * - remote port, for ftp, ssh</div> <div data-placeholder="Перевод" dir="ltr">When selecting key:</div> <div data-placeholder="Перевод" dir="ltr">public_key (post) * —public key;</div> <div data-placeholder="Перевод" dir="ltr">private_key (post) * - private key. If pass is selected:</div> <div data-placeholder="Перевод" dir="ltr">remote_login (post or get) * - remote login;</div> <div data-placeholder="Перевод" dir="ltr">remote_pass (post or get) * - remote password (it is better to transfer post).</div> <div data-placeholder="Перевод" dir="ltr">remote_port (post or get) * - remote port.</div> <div data-placeholder="Перевод" dir="ltr">token - Token to the remote storage (empty by default):</div> <div data-placeholder="Перевод" dir="ltr">compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch):</div> <div data-placeholder="Перевод" dir="ltr">maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0):</div> <div data-placeholder="Перевод" dir="ltr">speed_limit (post or get) * - default 0 (no speed limit). When choosing tar:</div> <div data-placeholder="Перевод" dir="ltr">level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values to choose from day, week, month: If week is selected:</div> <div data-placeholder="Перевод" dir="ltr">select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month:</div> <div data-placeholder="Перевод" dir="ltr">select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month);</div> <div data-placeholder="Перевод" dir="ltr">time (post or get) * - backup start time example 21-20 (hours, minutes);</div> <div data-placeholder="Перевод" dir="ltr">active (post or get) * - takes the value 1 or 0 by default inactive;</div> <div data-placeholder="Перевод" dir="ltr">encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default.</div> <div data-placeholder="Перевод" dir="ltr">list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default;</div> <div data-placeholder="Перевод" dir="ltr">all_user (post or get) *:</div> <div data-placeholder="Перевод" dir="ltr">1 - all users</div> <div data-placeholder="Перевод" dir="ltr">user1, user2 (specific users).</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> | |
− | password (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Added successfully';</div> <div data-placeholder="Перевод" dir="ltr">error: 101, mess: 'The storage is not correct.', detail [array_list_story];</div> <div data-placeholder="Перевод" dir="ltr">error: 102, mess: 'Compression method not specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 103, mess: 'Compression level is incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 104, mess: 'The period is incorrectly specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 105, mess: 'The time is incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 106, mess: 'The number of days is incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 107, mess: 'The days of the months are incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 108, mess: 'The ip of the remote server is not specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 109, mess: 'The folder on the remote server is not specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 110, mess: 'Invalid authentication type', detail [list_aunt];</div> <div data-placeholder="Перевод" dir="ltr">error: 111, mess: 'You did not specify a public key';</div> <div data-placeholder="Перевод" dir="ltr">error: 112, mess: 'You did not specify a private key';</div> <div data-placeholder="Перевод" dir="ltr">error: 113, mess: 'You did not specify a remote login';</div> <div data-placeholder="Перевод" dir="ltr">error: 114, mess: 'You did not specify a remote password';</div> <div data-placeholder="Перевод" dir="ltr">error: 140, mess: 'Invalid user specified', detail [list_users];</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Another error'.</div> |
− | |||
− | backup (post | ||
− | |||
− | add_backup (post | ||
− | |||
− | remote_local (post | ||
− | |||
− | local_path (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | remote_folder (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | compression (post | ||
− | |||
− | maxcountbackups(post | ||
− | |||
− | speed_limit (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | time (post | ||
− | |||
− | active (post | ||
− | |||
− | encrypt_password(post | ||
− | |||
− | list_email(post | ||
− | |||
− | all_user (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:101, mess:' | ||
− | |||
− | error:102, mess:' | ||
− | |||
− | error:103, mess:' | ||
− | |||
− | error:104, mess:' | ||
− | |||
− | error:105, mess:' | ||
− | |||
− | error:106, mess:' | ||
− | |||
− | error:107, mess:' | ||
− | |||
− | error:108, mess:' | ||
− | |||
− | error:109, mess:' | ||
− | |||
− | error:110, mess:' | ||
− | |||
− | error:111, mess:' | ||
− | |||
− | error:112, mess:' | ||
− | |||
− | error:113, mess:' | ||
− | |||
− | error:114, mess:' | ||
− | |||
− | error:140, mess:' | ||
− | |||
− | error:1000, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 188: | Line 48: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Removing backup task. | |
delete_jobs_backup | delete_jobs_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">config (post or get) * - the name of the config to be deleted;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'The task was successfully deleted';</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'Select the task to be deleted';</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Error in deleting task'.</div> |
− | |||
− | password (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
− | error:1000, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 219: | Line 59: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Generate key. | |
generate_key | generate_key | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">generate_key (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">name_conf (post or get) - the name of the config, from the list of tasks;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Created successfully.'. detail [array_key];</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'Error saving key'.</div> <div data-placeholder="Перевод" dir="ltr">error: 118, mess: 'Config file not specified'.</div> |
− | |||
− | password (post | ||
− | |||
− | backup (post | ||
− | |||
− | generate_key (post | ||
− | |||
− | name_conf (post | ||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
− | error:118, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 248: | Line 70: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Backup restoring history. | |
list_restore | list_restore | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">generate_key (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">user_edit (post or get) - the name of the user being edited;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Array of restoration'.detail [array_list_restore];</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'The recovery array is empty'.</div> |
− | |||
− | password (post | ||
− | |||
− | backup (post | ||
− | |||
− | generate_key (post | ||
− | |||
− | user_edit (post | ||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 275: | Line 81: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Edit backup task. | |
edit_backup | edit_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">edit_conf (post or get) * - the name of the config to edit;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">backup (post or get) * - constant, module name;</div> <div data-placeholder="Перевод" dir="ltr">add_backup (post or get) * - constant, operation name;</div> <div data-placeholder="Перевод" dir="ltr">remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox);</div> <div data-placeholder="Перевод" dir="ltr">local_path (post or get) * - default (empty).</div> <div data-placeholder="Перевод" dir="ltr">When choosing local:</div> <div data-placeholder="Перевод" dir="ltr">local_path (post or get) * - default (/).</div> <div data-placeholder="Перевод" dir="ltr">When selecting remote:</div> <div data-placeholder="Перевод" dir="ltr">remoteip (post or get) * - remote server;</div> <div data-placeholder="Перевод" dir="ltr">remote_folder (post or get) * - remote folder;</div> <div data-placeholder="Перевод" dir="ltr">type_auth (post or get) * - authentication type key, pass.</div> <div data-placeholder="Перевод" dir="ltr">remote_port (post or get) * - remote port, for ftp, ssh</div> |
− | username (post | + | |
− | + | <div data-placeholder="Перевод" dir="ltr">When selecting key:</div> <div data-placeholder="Перевод" dir="ltr">public_key (post) * —public key;</div> <div data-placeholder="Перевод" dir="ltr">private_key (post) * - private key. If pass is selected:</div> <div data-placeholder="Перевод" dir="ltr">remote_login (post or get) * - remote login;</div> <div data-placeholder="Перевод" dir="ltr">remote_pass (post or get) * - remote password (it is better to transfer post).</div> <div data-placeholder="Перевод" dir="ltr">remote_port (post or get) * - remote port.</div> <div data-placeholder="Перевод" dir="ltr">token - Token to the remote storage (empty by default):</div> <div data-placeholder="Перевод" dir="ltr">compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch):</div> <div data-placeholder="Перевод" dir="ltr">maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0):</div> <div data-placeholder="Перевод" dir="ltr">speed_limit (post or get) * - default 0 (no speed limit). When choosing tar:</div> <div data-placeholder="Перевод" dir="ltr">level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values to choose from day, week, month: If week is selected:</div> | |
− | password (post | + | |
− | + | <div data-placeholder="Перевод" dir="ltr">select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month:</div> <div data-placeholder="Перевод" dir="ltr">select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month);</div> <div data-placeholder="Перевод" dir="ltr">time (post or get) * - backup start time example 21-20 (hours, minutes);</div> <div data-placeholder="Перевод" dir="ltr">active (post or get) * - takes the value 1 or 0 by default inactive;</div> <div data-placeholder="Перевод" dir="ltr">encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default.</div> <div data-placeholder="Перевод" dir="ltr">list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default;</div> <div data-placeholder="Перевод" dir="ltr">all_user (post or get) *:</div> <div data-placeholder="Перевод" dir="ltr">1 - all users</div> <div data-placeholder="Перевод" dir="ltr">user1, user2 (specific users).</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> | |
− | backup (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Added successfully';</div> <div data-placeholder="Перевод" dir="ltr">error: 101, mess: 'The storage is not correct.', detail [array_list_story];</div> <div data-placeholder="Перевод" dir="ltr">error: 102, mess: 'Compression method not specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 103, mess: 'Compression level is incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 104, mess: 'The period is incorrectly specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 105, mess: 'The time is incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 106, mess: 'The number of days is incorrectly specified';</div> <div data-placeholder="Перевод" dir="ltr">error: 107, mess: 'The days of the months are incorrect';</div> <div data-placeholder="Перевод" dir="ltr">error: 110, mess: 'Invalid authentication type', detail [list_aunt];</div> <div data-placeholder="Перевод" dir="ltr">error: 111, mess: 'You did not specify a public key';</div> <div data-placeholder="Перевод" dir="ltr">error: 112, mess: 'You did not specify a private key';</div> <div data-placeholder="Перевод" dir="ltr">error: 113, mess: 'You did not specify a remote login';</div> <div data-placeholder="Перевод" dir="ltr">error: 114, mess: 'You did not specify a remote password';</div> <div data-placeholder="Перевод" dir="ltr">error: 140, mess: 'Invalid user specified', detail [list_users];</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Another error'.</div> |
− | |||
− | |||
− | |||
− | remote_local (post | ||
− | |||
− | local_path (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | compression (post | ||
− | |||
− | |||
− | |||
− | | ||
− | |||
− | |||
− | |||
− | all_user (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:101, mess:' | ||
− | |||
− | error:102, mess:' | ||
− | |||
− | error:103, mess:' | ||
− | |||
− | error:104, mess:' | ||
− | |||
− | error:105, mess:' | ||
− | |||
− | error:106, mess:' | ||
− | |||
− | error:107, mess:' | ||
− | |||
− | error:110, mess:' | ||
− | |||
− | error:111, mess:' | ||
− | |||
− | error:112, mess:' | ||
− | |||
− | error:113, mess:' | ||
− | |||
− | error:114, mess:' | ||
− | |||
− | error:140, mess:' | ||
− | |||
− | error:1000, mess:' | ||
− | |||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
Line 356: | Line 96: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
− | + | Launching backup task. | |
create_backup | create_backup | ||
− | | style="vertical-align: top;" | | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">username (post or get) * - username;</div> <div data-placeholder="Перевод" dir="ltr">password (post or get) * - user password;</div> <div data-placeholder="Перевод" dir="ltr">config (post or get) * - the name of the config for backup;</div> <div data-placeholder="Перевод" dir="ltr">language (post or get) - can take the value: en / ru (ru by default).</div> |
− | username (post | + | | style="vertical-align: top;" | <div data-placeholder="Перевод" dir="ltr">error: 0, mess: 'Created successfully';</div> <div data-placeholder="Перевод" dir="ltr">error: 100, mess: 'Incorrectly specified file to start backup';</div> <div data-placeholder="Перевод" dir="ltr">error: 101, mess: 'Script execution time exceeded';</div> <div data-placeholder="Перевод" dir="ltr">error: 1000, mess: 'Error while executing script'.</div> <pre data-placeholder="" dir="ltr" id="tw-target-rmn"> </pre> |
− | + | <div>[[File:|16x16px|Значок]]</div> | |
− | password (post | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | language (post | ||
− | |||
− | | style="vertical-align: top;" | | ||
− | error:0, mess:' | ||
− | |||
− | error:100, mess:' | ||
− | |||
− | error:101, mess:' | ||
− | |||
− | error:1000, mess:' | ||
− | |||
|} | |} | ||
− | + | Other useful articles: | |
− | {| style="width: | + | {| style="width: 1058px;" |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_connection <font><font>API: connection</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Monitoring <font><font>API: monitoring</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Webserver_status <font><font>API: web server status</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_CMS_Autoinstaller <font><font>API: auto installer CMS</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Configuring_backups <font><font>API: configuring backups</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Transfer_between_servers <font><font>API: transfer between servers</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Antivirus <font><font>API: antivirus</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Server_configuration <font><font>API: server settings</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Manage_webserver <font><font>API: web server management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Databases <font><font>API: database</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_User_Certificates <font><font>API: custom certificates</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Managing_mailboxes <font><font>API: mailbox management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Server_info <font><font>API: server information</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Mail <font><font>API: mail</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Manage_DNS-zones <font><font>API: DNS zone management</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Traffic_usage <font><font>API: traffic usage</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Client_mail <font><font>API: client mailboxes</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Webserver_Installation <font><font>API: web server installation</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Logging <font><font>API: logging</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Nameserver <font><font>API: name server</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_host-accounts <font><font>API: host accounts</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_App_manager <font><font>API: application manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Certificates_of_services <font><font>API: service certificates</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_CRON API: CRON]''' | + | '''[https://docs.brainycp.io/index.php/API:_CRON <font><font>API: CRON</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Process_manager <font><font>API: process manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Network_tools <font><font>API: network tools</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_FTP- | + | '''[https://docs.brainycp.io/index.php/API:_FTP-server <font><font>API: FTP server</font></font>]''' |
|- | |- | ||
− | | | + | | style="width: 291px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_IP-address_manager <font><font>API: IP address manager</font></font>]''' |
− | | | + | | style="width: 353px;" | |
− | '''[https://docs.brainycp.io/index.php/API: | + | '''[https://docs.brainycp.io/index.php/API:_Load_average <font><font>API: average load</font></font>]''' |
− | | | + | | style="width: 392px;" | |
− | '''[https://docs.brainycp.io/index.php/API:_MySQL_processlist API: MySQL processlist]''' | + | '''[https://docs.brainycp.io/index.php/API:_MySQL_processlist <font><font>API: MySQL processlist</font></font>]''' |
|} | |} | ||
− |
Latest revision as of 14:24, 17 November 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 |
backup |
Display backup jobs for the user. list_jobs_backup |
username (post or get) * - username; password (post or get) * - user password; backup (post or get) * - constant, module name; list_backup (post or get) * - constant, operation name; user_edit (post or get) - List of backup jobs for the user; language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'Displaying an array of tasks', detail [array_list_job]; error: 100, mess: 'There are no jobs'; error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.
|
backup |
Display backup list list_backup |
username (post or get) * - username; password (post or get) * - user password; backup (post or get) * - constant, module name; list_backup (post or get) * - constant, operation name; user_edit (post or get) - List of backups for the user; language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'List backup', detail [array_list_backup]; error: 100, mess: 'The backup list is empty'; error: 400, mess: 'You do not have sufficient rights. Remove user_edit '.
|
backup |
Create new backup task. add_backup |
username (post or get) * - username; password (post or get) * - user password; backup (post or get) * - constant, module name; add_backup (post or get) * - constant, operation name; remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox); local_path (post or get) * - default (empty). When choosing local: local_path (post or get) * - default (/). When selecting remote: remoteip (post or get) * - remote server;
remote_folder (post or get) * - remote folder; type_auth (post or get) * - authentication type key, pass. remote_port (post or get) * - remote port, for ftp, ssh When selecting key: public_key (post) * —public key; private_key (post) * - private key. If pass is selected: remote_login (post or get) * - remote login; remote_pass (post or get) * - remote password (it is better to transfer post). remote_port (post or get) * - remote port. token - Token to the remote storage (empty by default): compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch): maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0): speed_limit (post or get) * - default 0 (no speed limit). When choosing tar: level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values to choose from day, week, month: If week is selected: select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month: select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month); time (post or get) * - backup start time example 21-20 (hours, minutes); active (post or get) * - takes the value 1 or 0 by default inactive; encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default. list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default; all_user (post or get) *: 1 - all users user1, user2 (specific users). language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'Added successfully'; error: 101, mess: 'The storage is not correct.', detail [array_list_story]; error: 102, mess: 'Compression method not specified'; error: 103, mess: 'Compression level is incorrect'; error: 104, mess: 'The period is incorrectly specified'; error: 105, mess: 'The time is incorrect'; error: 106, mess: 'The number of days is incorrect'; error: 107, mess: 'The days of the months are incorrect'; error: 108, mess: 'The ip of the remote server is not specified'; error: 109, mess: 'The folder on the remote server is not specified'; error: 110, mess: 'Invalid authentication type', detail [list_aunt]; error: 111, mess: 'You did not specify a public key'; error: 112, mess: 'You did not specify a private key'; error: 113, mess: 'You did not specify a remote login'; error: 114, mess: 'You did not specify a remote password'; error: 140, mess: 'Invalid user specified', detail [list_users]; error: 1000, mess: 'Another error'.
|
backup |
Removing backup task. delete_jobs_backup |
username (post or get) * - username; password (post or get) * - user password; config (post or get) * - the name of the config to be deleted; language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'The task was successfully deleted'; error: 100, mess: 'Select the task to be deleted'; error: 1000, mess: 'Error in deleting task'.
|
backup |
Generate key. generate_key |
username (post or get) * - username; password (post or get) * - user password; backup (post or get) * - constant, module name; generate_key (post or get) * - constant, operation name; name_conf (post or get) - the name of the config, from the list of tasks; language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'Created successfully.'. detail [array_key]; error: 100, mess: 'Error saving key'. error: 118, mess: 'Config file not specified'.
|
backup |
Backup restoring history. list_restore |
username (post or get) * - username; password (post or get) * - user password; backup (post or get) * - constant, module name; generate_key (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: 'Array of restoration'.detail [array_list_restore]; error: 100, mess: 'The recovery array is empty'.
|
backup |
Edit backup task. edit_backup |
username (post or get) * - username; edit_conf (post or get) * - the name of the config to edit; password (post or get) * - user password; backup (post or get) * - constant, module name; add_backup (post or get) * - constant, operation name; remote_local (post or get) * - storage type (2 values: local, remote, ftp, Dropbox); local_path (post or get) * - default (empty). When choosing local: local_path (post or get) * - default (/). When selecting remote: remoteip (post or get) * - remote server; remote_folder (post or get) * - remote folder; type_auth (post or get) * - authentication type key, pass. remote_port (post or get) * - remote port, for ftp, ssh
When selecting key: public_key (post) * —public key; private_key (post) * - private key. If pass is selected: remote_login (post or get) * - remote login; remote_pass (post or get) * - remote password (it is better to transfer post). remote_port (post or get) * - remote port. token - Token to the remote storage (empty by default): compression (post or get) * - 3 options to choose from (incr_noarch, tar, simple_noarch): maxcountbackups (post or get) * - number of backup copies (for tar, simple_noarch by default 0): speed_limit (post or get) * - default 0 (no speed limit). When choosing tar: level_compress (post or get) * - compression level from 0 to 9 by default; period (post or get) * - 3 values to choose from day, week, month: If week is selected:
select_day (post or get) * - days of the week (for example, 0,0,1,1,0,0,0, (Mon, Tue, Wed, Thu, Fri, Sat, Sun). When choosing month: select_day (post or get) * - days of the week (for example, 2,10,11,2 (number for each month); time (post or get) * - backup start time example 21-20 (hours, minutes); active (post or get) * - takes the value 1 or 0 by default inactive; encrypt_password (post or get) * - encrypts backup, accepts a password value, inactive by default. list_email (post or get) * - sending a message after backup, takes the value of email, separated by commas. Inactive by default; all_user (post or get) *: 1 - all users user1, user2 (specific users). language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'Added successfully'; error: 101, mess: 'The storage is not correct.', detail [array_list_story]; error: 102, mess: 'Compression method not specified'; error: 103, mess: 'Compression level is incorrect'; error: 104, mess: 'The period is incorrectly specified'; error: 105, mess: 'The time is incorrect'; error: 106, mess: 'The number of days is incorrectly specified'; error: 107, mess: 'The days of the months are incorrect'; error: 110, mess: 'Invalid authentication type', detail [list_aunt]; error: 111, mess: 'You did not specify a public key'; error: 112, mess: 'You did not specify a private key'; error: 113, mess: 'You did not specify a remote login'; error: 114, mess: 'You did not specify a remote password'; error: 140, mess: 'Invalid user specified', detail [list_users]; error: 1000, mess: 'Another error'.
|
backup |
Launching backup task. create_backup |
username (post or get) * - username; password (post or get) * - user password; config (post or get) * - the name of the config for backup; language (post or get) - can take the value: en / ru (ru by default).
|
error: 0, mess: 'Created successfully'; error: 100, mess: 'Incorrectly specified file to start backup'; error: 101, mess: 'Script execution time exceeded'; error: 1000, mess: 'Error while executing script'. [[File:|16x16px|Значок]]
|
Other useful articles: