Skip to main content
Version: 10.1

Backup Resource

Description​

This resource is used to start or determine the status of a currently running backup.

GET /backup​

If no backup is in progress, the GET request will return a 204 No Content code. If rWeb is processing another major command (e.g. upgrading) this will return a 400 Error.

Otherwise, the GET request will respond with data showing the current status of the backup.

GET Response Values​

NameTypeDescription
device_idJSON NumberThis will be 0, used to identify rWeb itself.
commandJSON StringShould reference the command "rweb_backup".
command_parametersJSON StringThe type of backup. Will be either "config" or "full".
statusJSON StringA textual description of the current status of the backup
device_feedbackJSON StringWill be null
finishedJSON BooleanWhether or not the backup is finished
cancelledJSON BooleanWhether or not the backup was cancelled

Example GET Request​

 GET /backup

Example GET Response​

{
"device_id": 0,
"command": "rweb_backup",
"command_parameters": "full",
"status": "backup_started
started rWeb full database backup
created database schema dump file
created full data dump file
successfully backed up license files
successfully backed up pcap files",
"device_feedback": null,
"finished": false,
"cancelled": false,
}

POST /backup​

Starts a backup if one is not currently running.

POST Parameters​

NameRequiredTypeDescriptionDefault Value
backup_typeYesJSON StringThe type of backup to be performed. Must be either "full" or "config". 

POST Response Values​

NameTypeDescription
device_idJSON NumberThis will be 0, used to identify rWeb itself.
commandJSON StringShould reference the command "rweb_backup".
command_parametersJSON StringThe type of backup. Will be either "config" or "full" based on the POST parameter.
statusJSON StringA textual description of the current status of the backup. Following the POST, this will be "request".
device_feedbackJSON StringWill be "new"
finishedJSON BooleanWhether or not the backup is finished.
cancelledJSON BooleanWhether or not the backup was cancelled.

Example POST Request​

POST /backup
 
JSON Body:
{
“data” :
{
“backup_type”: ”full”
}
}

Example  POST Response​

{
"device_id": 0,
"command": "rweb_backup",
"command_parameters": "full",
"status": "request",
"device_feedback": "new",
"finished": false,
"cancelled": false
}