Query Multiple Archive Tasks

Retrieve the details of multiple archive tasks.

Request URL

GET {base_url}/{api_path}/archive_task/query?access_token={access_token}

Request parameters

Parameter Required Type Description
ids Yes String The IDs of the archive tasks to query.
Note:
  • You can query archive task ID using Search Archive Tasks interface.
  • User a comma to separate multiple IDs.

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.
data Array<Archive_Task> The archive task information.
Archive_Task
Parameter Type Description
id Integer The ID of the archive task.
auth_info_id Integer The ID of the associated archive server.
name String The name of the archive task.
file_type String The type of files to archive.
  • recording_files
  • backup_files
time_range String The time range of the files to archive.
  • today
  • yesterday
  • last_7days
  • last_30days
  • this_month
  • last_month
  • custom
time_begin String The start time of the archive time range.
Note: This field is returned with values only when time_range is custom.
time_end String The end time of the archive time range.
Note: This field is returned with values only when time_range is custom.
freq_type String The execution frequency of the archive task.
  • now: The archive task is executed once immediately.
  • daily: The archive task is executed every day.
  • weekly: The archive task is executed every week.
  • monthly: The archive task is executed every month.
freq_time String The execution time of the archive task, in 24-hour format.
Note: This field is returned with values only when freq_type is not now.
freq_week Integer The day of the week on which the archive task is executed.
  • 1: Monday
  • 2: Tuesday
  • 3: Wednesday
  • 4: Thursday
  • 5: Friday
  • 6: Saturday
  • 7: Sunday
Note: This field is returned with values only when freq_type is weekly.
freq_day Integer The day of the month on which the archive task is executed.
Note:
  • This field is returned with values only when freq_type is monthly.
  • The value ranges from 1 to 31, where -1 represents the last day of the month.
status String The execution status of the archive task.
  • scheduled: The archive task is scheduled.
  • waitingforexecuting: The archive task is waiting to be executed.
  • executing: The archive task is being executed.
  • finished: The archive task has been executed.
storage_method String The way the archived files are stored.
  • create_folder_once: Create a folder named "FileType-TaskName" under the selected path and store files within it.
  • create_folder_each_time: Create a folder named "FileType-TaskName-ExecutionDate" under the selected path each time the task executes, and store files within it.
  • create_folder_reuse: Create a folder named "FileType-TaskName" under the selected path during the first execution, and store files from subsequent executions in the same folder.
  • direct_save: Save the archived files directly to the selected path without creating a folder.
file_organization_by_date Integer Whether the archived files are organized by date.
  • 0: The files are not organized by date.
  • 1: The files are organized by date.
file_path String The target path for the archived files on the archive server.
Note: This field is returned with values only when the associated archive server's server_type is ftp or sftp.
bucket_name String The name of the storage bucket.
Note: This field is returned with values only when the associated archive server's server_type is amazon_s3 or google_storage.
bucket_path String The target path prefix within the storage bucket.
region String The region of the cloud storage.
site_id String The ID of the SharePoint site.
Note: This field is returned with values only when the associated archive server's server_type is sharepoint.
site_name String The name of the SharePoint site.
Note: This field is returned with values only when the associated archive server's server_type is sharepoint.
drive_id String The ID of the SharePoint document library.
Note: This field is returned with values only when the associated archive server's server_type is sharepoint.
drive_name String The name of the SharePoint document library.
Note: This field is returned with values only when the associated archive server's server_type is sharepoint.
path_id String The ID of the target SharePoint folder.
Note: This field is returned with values only when the associated archive server's server_type is sharepoint.
record_file_format String The format of the recording files.
Note: This field is returned with values only when file_type is recording_files.
  • wav: WAV format.
  • mp3: MP3 format.
enb_skip_achive_file Integer Whether recording files that have already been archived are skipped.
  • 0: The archived recording files are archived again.
  • 1: The archived recording files are skipped.
enb_delete_local_file Integer Whether local files are deleted after they are archived.
  • 0: The local files are kept.
  • 1: The local files are deleted.
enable_retention Integer Whether retention configuration is enabled.
  • 0: The retention configuration is disabled.
  • 1: The retention configuration is enabled.
retention_type String The retention mode.
Note: This field is returned with values only when enable_retention is 1.
  • quantity: The files are retained by quantity.
  • days: The files are retained by days.
retention_unit String The retention unit.
Note: This field is returned with values only when enable_retention is 1.
  • folder: The retention is applied to folders.
  • file: The retention is applied to files.
file_rotation_num Integer The retention limit, measured according to retention_type.
Note: This field is returned with values only when enable_retention is 1.

Example

Request example

GET /openapi/v1.0/archive_task/query?ids=11,10&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS",
  "submsg": "",
  "data": [
    {
      "id": 10,
      "auth_info_id": 8,
      "name": "Folder-Test",
      "time_range": "today",
      "freq_type": "now",
      "freq_time": "",
      "freq_day": 0,
      "freq_week": 0,
      "status": "finished",
      "file_path": "",
      "time_begin": "",
      "time_end": "",
      "file_type": "backup_files",
      "bucket_name": "yeastar-demo",
      "bucket_path": "",
      "region": "ap-east-1",
      "site_id": "",
      "site_name": "",
      "drive_id": "",
      "drive_name": "",
      "path_id": "",
      "record_file_format": "",
      "enb_skip_achive_file": 0,
      "enb_delete_local_file": 0,
      "enable_retention": 0,
      "retention_type": "",
      "retention_unit": "",
      "storage_method": "create_folder_once",
      "file_organization_by_date": 0
    },
    {
      "id": 11,
      "auth_info_id": 8,
      "name": "January-Backup",
      "time_range": "today",
      "freq_type": "now",
      "freq_time": "",
      "freq_day": 0,
      "freq_week": 0,
      "status": "finished",
      "file_path": "",
      "time_begin": "",
      "time_end": "",
      "file_type": "backup_files",
      "bucket_name": "yeastar-demo",
      "bucket_path": "",
      "region": "ap-east-1",
      "site_id": "",
      "site_name": "",
      "drive_id": "",
      "drive_name": "",
      "path_id": "",
      "record_file_format": "",
      "enb_skip_achive_file": 0,
      "enb_delete_local_file": 0,
      "enable_retention": 0,
      "retention_type": "",
      "retention_unit": "",
      "storage_method": "direct_save",
      "file_organization_by_date": 0
    }
  ]
}