getBackupSummary — Retrieving summary of backup
The getBackupSummary
method retrieves the backup of a website.
The request needs to be made once for each site.
The response returns the previous backup results.
The API endpoint is:
https://api.sitelock.com/v1/partner
Request format
-
SiteLockOnlineRequest: This element is used to delineate the full API request.
-
authentication: The partner’s username, password, and branding
-
username: The partner’s API username
-
password: The partner’s API password
-
partner: (Optional) The brand name to use in messaging
-
-
getBackupSummary: The method name
-
site_id: The ID of the site for which to retrieve the backup results
-
start_date: The start of the date range for which summary results are requested. The format is
YYYY-MM-DD
. -
end_date: The end of the date range for which summary results are requested. The format is
YYYY-MM-DD
.
-
-
Response format
-
SiteLockOnlineResponse: This element is used to delineate the full API response.
-
getBackupSummary: The method name
-
backup: A container element for the backup results
-
action: Either
backup
orrestore
-
backup: The result of the website backup
-
restore: The result of the website restore
-
-
backup_db: The database backup information
-
backup_db_id: The ID of the database backup
-
completed_at: The date and time the database backup completed
-
err_code: The error code (see Error codes)
-
schemas: The database schema information
-
schema: The database schema
-
-
site_kb: The total size in KB of the backup
-
status: The status of the backup operation
-
completed: The backup is completed.
-
error: The backup returned an error, check the
err_code
. -
pending_delete: The backup record is in a pending delete.
-
-
-
backup_files: The files backup information
-
backup_files_id: The ID of the files backup
-
backup_root: A specific directory where the website is installed.
-
completed_at: The date and time the files backup completed.
-
err_code: The backup returned an error, see Error codes.
-
num_added: The number of files that were added by the user since the last backup
-
num_deleted: The number of files that were deleted by the user since the last backup
-
num_modified: The number of files that were modified by the user since the last backup
-
num_files: The total number of files for this backup
-
size_kb: The total size in KB of this backup
-
size_kb_unique_files: The total size of unique files in KB for this backup
-
status: The status of the backup operation
-
completed: The backup is completed.
-
error: The backup returned an error, check the
err_code
. -
pending_delete: The backup record is in a pending delete state.
-
-
-
current_backup_root: The current
backup_root
-
-
quota: The disc space usage by backup
-
total_backup: The total number of backups
-
total_mb: The total quota in MB
-
total_db: The total size of backup databases in KB
-
total_files: The total size of backup files in KB
-
usage_kb: The total usage of backup databases and files in KB
-
-
site_id: The ID of the site for which the backup was created
-
status: The status of the API call, either
ok
orerror
-
-
Example response
<SiteLockOnlineResponse>
<getBackupSummary>
<backup>
<action>backup</action>
<backup_db>
<backup_db_id>266</backup_db_id>
<completed_at>2020-01-17 15:38:11</completed_at>
<err_code></err_code>
<schemas>
<schema>sitelock_wordpress_supportdemo</schema>
</schemas>
<size_kb>2373</size_kb>
<status>completed</status>
</backup_db>
<backup_files>
<backup_files_id>1195</backup_files_id>
<backup_root>./supportdemo.sldev5.com/</backup_root>
<completed_at>2020-01-17 15:37:43</completed_at>
<err_code></err_code>
<num_added>0</num_added>
<num_deleted>0</num_deleted>
<num_files>1840</num_files>
<num_modified>0</num_modified>
<size_kb>41672</size_kb>
<size_kb_unique_files>0</size_kb_unique_files>
<status>completed</status>
</backup_files>
<backup_id>420</backup_id>
<created_at>2020-01-17 15:36:44</created_at>
<description></description>
</backup>
<current_backup_root>./sldev6.com/</current_backup_root>
<quota>
<total_backup>9</total_backup>
<total_mb>5000</total_mb>
<usage_db>19327</usage_db>
<usage_files>103056</usage_files>
<usage_kb>122383</usage_kb>
</quota>
<site_id>10900</site_id>
<status>ok</status>
</getBackupSummary>
</SiteLockOnlineResponse>