Add a Backup File

Add and configure a backup file.

Request URL

POST {base_url}/{api_path}/backup/create?access_token={access_token}

Request parameters

Parameter Required Type Description
file_name Yes String The name of the backup file.
memo No String Comments for the backup file.
storage_location No Integer

The ID of the storage device for the backup file.

Note: You can query storage devices' ID using Query Storage Device List.
sound_backup No Integer Whether to back up custom prompts.

Valid value:

  • 0: Disable
  • 1: Enable
cdr_backup No Integer Whether to back up call logs.

Valid value:

  • 0: Disable
  • 1: Enable
contact_backup No Integer Whether to back up company contacts and phonebooks settings.

Valid value:

  • 0: Disable
  • 1: Enable
message_backup No Integer Whether to back up chat data for external chat.

Valid value:

  • 0: Disable
  • 1: Enable

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
file_name String The name of the backup file.

Examples

Request example

POST /openapi/v1.0/backup/create?access_token=C6cqRHSqYPNMrTDyF2BLyVUCKkpS6rTG HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
    "file_name": "Backup-X.18.0.89", 
    "memo": "test",
    "storage_location": 1,
    "sound_backup": 1,
    "cdr_backup": 1,
    "contact_backup": 1,
    "message_backup": 1
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "file_name": "Backup-X.18.0.89-local.bak"
}