Restore backup

Restores a backup for a site.

POST
https://portal.onyx.io/api/v2/sites/{site}/backups/{backup}/restore

If successful, this endpoint will return a 200 OK status.

Arguments

The following arguments are supported for this endpoint.

Name Type Default Value

site Required

Site Lookup None

backup Required

Site Backup Lookup None

restore_type Required

The type of a restore

RestoreTypeEnum None

database_name

The name of the database to restore

String None

Potential Errors

The following errors may occur during this request.

Details HTTP status

backup_not_found

No backup was found matching any of the criteria provided in the arguments

404 Not Found

invalid_database_name

The provided database name to restore is not valid

400 Bad Request

invalid_restore_type

The provided restore type is not valid

400 Bad Request

restore_in_progress

There's currently a restore in progress for this site.

409 Conflict

site_not_found

No site was found matching any of the criteria provided in the arguments

404 Not Found

validation_error

A validation error occurred with the object that was being created/updated/deleted

422 Unprocessable Entity

Returned Object

When the request is successful, you can expect an object matching the specification below to be returned.

{
    restore: Restore {
        id: Integer
        backup_id: Integer
        status: RestoreStatusEnum
        completed: Boolean
        object_name: String?
        restore_type: RestoreTypeEnum
        created_at: Unix Timestamp
    }
}