Query all the Backup Files

Query the information of all the backup files.

Request URL

GET {base_url}/dm/open_api/v1/backup_file

Request parameters

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

Format: Bearer {access_token}.

Query parameters
Parameter Required Type Description
pageSize No Integer Define how many records per page.
  • Default value: 10
  • Maximum value: 50
pageNumber No Integer Define which page is displayed.
  • Default value: 1
sort No String Define the sorting field.

You can enter the response parameters in this sorting field to sort the response result.

Examples:

  • backupFileId: Sort the records by backup file ID in ascending order.
  • -backupFileId: Sort the records by backup file ID in descending order.

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
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.
Details
Parameter Type Description
pageSize Integer How many records are displayed per page.
pageNumber Integer Which page is displayed.
total Integer The total number of backup files.
list Array <BackupFile_Info> The information list of backup files.
BackupFile_Info
Parameter Type Description
backupFileId Long The unique ID of the backup file.
backupFileType String The type of PBX from which the backup file is generated.
  • cloud_pbx
backupTime Long The time when the backup file is generated.
Note: The parameter 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.
backupFileName String The name of the backup file.
backupFileSourcePbxName String The name of the PBX from which the backup file is generated.
Note: This parameter is returned only when the backup file is generated via a backup task.
backupFileSourcePbxSn String The serial number of the PBX from which the backup file is generated.
Note: This parameter is returned only when the backup file is generated via a backup task.
backupFileTaskName String The name of the backup task.
Note: This parameter is returned only when the backup file is generated via a backup task.
backupFileTaskId String The ID of the backup task.
Note: This parameter is returned only when the backup file is generated via a backup task.
backupFileRemark String Remark.

Example

Request example

Query all the backup files:
  • Display 3 records per page.
  • Display Page 1.
  • Display the backup files by ID in descending order.
GET /dm/open_api/v1/backup_file?pageSize=3&pageNumber=1&sort=-backupFileId HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwicmVmcmVzaFZlcnNpb24iOjE2MzkwMTIwODh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM5MDEzODg4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI3MGI3N2NiOC03MzZjLTQxODctYjM2Yy0xNjM0MzNlZWJjNWEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9._I0umqPvrMKnL1tlkragMjkuGWcYg1SAoTimfyKl7i8
Response example
HTTP/1.1 200 OK
{
  "data": {
    "pageSize": 3,
    "pageNumber": 1,
    "total": 100,
    "list": [
      {
        "backupFileId": 98,
        "backupFileType": "cloud_pbx",
        "backupTime": 1669237535,
        "backupFileName": "PCE-Backup-84.9.0.8-20221206141900.bak",
        "backupFileSourcePbxName": "P-Series CE2",
        "backupFileSourcePbxSn": "3658B50690XXXXXXX",
        "backupFileTaskName": "Test",
        "backupFileTaskId": 379,
        "backupFileRemark": "for test"
      },
      {
        "backupFileId": 95,
        "backupFileType": "cloud_pbx",
        "backupTime": 1669237474,
        "backupFileName": "PCE-Backup-84.9.0.18-20221205174036.bak",
        "backupFileSourcePbxName": "P-Series PBX",
        "backupFileSourcePbxSn": "3658B43111XXXXXX",
        "backupFileTaskName": "backupfile",
        "backupFileTaskId": 378,
        "backupFileRemark": ""
      },
      {
        "backupFileId": 94,
        "backupFileType": "cloud_pbx",
        "backupTime": 1669237447,
        "backupFileName": "PCE-Backup-84.9.0.18-20221205173707.bak",
        "backupFileSourcePbxName": "Test_PBX-21205",
        "backupFileSourcePbxSn": "3658B43111XXXXXX",
        "backupFileTaskName": "Cloud PBX",
        "backupFileTaskId": 377,
        "backupFileRemark": ""
      }
    ]
  },
  "requestId": "5c7db8bc-2511-4c7c-9391-af3b72ca2717",
  "status": "Success",
  "time": 1670305586
}