Restore a Backup

Restore a backup to a specific P-Series Cloud PBX.

Restrictions

Learn about the following restrictions for data restoration:
  • The PBX system to be restored must be in RUNNING status.
  • The firmware version of the backup file must NOT be higher than that of the PBX system to be restored.
    Tip: You can check the firmware version on the backup file name "PCE-Backup-{firmware_version}-{backup_time}".

    For example:

    • Restoring a backup file (v84.5.0.55) to PBX (v84.5.0.57) would work.
    • Restoring a backup file (v84.5.0.57) to PBX (v84.5.0.55) would NOT work.

Request URL

POST {base_url}/dm/open_api/v1/backup_file/restore

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Body
Parameter Required Type Description
backupFileId Yes Long The unique ID of the backup file.
Note:
  • Make sure that the firmware version of backup file (can be checked on the file name) is NOT higher than that of the PBX system to be restored, or the restore operation would FAIL.
  • You can query the backup file ID and name using Query all the Backup Files.
restoreDstPbxSn Yes String The serial number of the PBX system to be restored.
Note: You can query the serial number of a PBX using Query All the Cloud PBXs.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.

Example

Request example

POST /dm/open_api/v1/backup_file/restore HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwicmVmcmVzaFZlcnNpb24iOjE2MzkwMTIwODh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM5MDEzODg4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI3MGI3N2NiOC03MzZjLTQxODctYjM2Yy0xNjM0MzNlZWJjNWEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9._I0umqPvrMKnL1tlkragMjkuGWcYg1SAoTimfyKl7i8
Content-Type: application/json
{
  "backupFileId": 1079,
  "restoreDstPbxSn":"3658B50690XXXXXX"
}
Response example
HTTP/1.1 200 OK
{
  "requestId": "2f62e5ab-2518-460e-89bb-c18ea3513232",
  "status": "Success",
  "time": 1670308450
}