Skip to main content

Restore Backup

This API restores data from a backup using the selected scopes. The backup can be restored from an existing backup or from an uploaded backup file, and the API returns the restore ID used to track the process.

Endpoint Details

URL/v1/restore
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"restore_method": 1,
"backup_id": "f5316dfe-52a1-4289-8d13-9fdc81d3e11b",
"upload_id": "",
"uploaded_file_name": "",
"encryption_key": "jMYha+X9sGxKDOkcwJQu43H2CaGuQJYSTyvJXtBN6Q8=",
"scopes_to_restore": [
1,
2
],
"delete_existing": false
}

Parameters

ParameterTypeDescription
restore_methodIntegerMethod used to perform the restore
backup_idUUIDIdentifier of the existing backup to restore from
upload_idStringIdentifier of the uploaded backup file, used when restoring from an upload
uploaded_file_nameStringName of the uploaded backup file, used when restoring from an upload
encryption_keyStringEncryption key used to decrypt the backup file
scopes_to_restoreArrayList of scope codes to restore from the backup
delete_existingBooleanIndicates whether existing data is removed before the restore runs

Response

Here is an example response after the request has been successfully processed:

Response
{
"restore_id": "e0f92810-1f2b-4c58-8088-690296e1c504"
}

Field Descriptions

FieldTypeDescription
restore_idUUIDUnique identifier of the restore process

info
  • A valid Bearer Token is required to access this endpoint.
  • The restore_method determines the source of the backup to restore from:
    • 1 = Backup ID — restore from an existing backup. Provide the backup_id.
    • 2 = Upload file — restore from an uploaded backup file. Provide the upload_id and uploaded_file_name.
  • The scopes_to_restore array uses the following codes:
    • 1 = System Configuration
    • 2 = Keys
    • 3 = Audit Log
    • 4 = System Log
  • The encryption_key must match the key generated when the backup was created. Without it, the backup file cannot be restore.
  • When delete_existing is set to true, existing data within the selected scopes is removed before the restore runs.