Edit an Archive Task
Update the configuration of an archive task.
Request URL
POST {base_url}/{api_path}/archive_task/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The ID of the archive task. Note: You can obtain the ID
using the Query Archive Server List interface. |
| name | No | String | The name of the archive task. |
| file_type | No | String | The type of files to archive. Valid value:
|
| time_range | No | String | The time range of the files to archive. Valid value:
|
| time_begin | No | String | The start time of the archive time range, in the system date and time format.
Note: This parameter is required when
time_range is custom. |
| time_end | No | String | The end time of the archive time range, in the system date and time format.
Note:
|
| freq_type | No | String | The execution frequency of the archive task. Valid value:
|
| freq_week | No | Integer | The day of the week on which the archive task is executed. Valid value:
Note: This parameter takes effect when
freq_type is weekly. |
| freq_day | No | Integer | The day of the month on which the archive task is executed. Valid
value: Note: This
parameter takes effect when freq_type is
monthly. |
| freq_time | No | String | The execution time of the archive task, in 24-hour format. Note: This parameter is takes effect when
freq_type is not now. |
| record_file_format | No | String | The format of the recording files. Note: This parameter
takes effect only when file_type is
recording_files.Valid value:
|
| auth_info_id | No | Integer | The ID of the associated archive server. Note: You can
obtain the ID using the Query Archive Server List
interface. |
| file_path | No | String | The target path for archived files on the archive server. Note: This parameter takes effect only when the associated archive
server's server_type is ftp or
sftp. |
| bucket_name | No | String | The name of the storage bucket. Note: This parameter
takes effect only when the associated archive server's
server_type is amazon_s3 or
google_storage. |
| bucket_path | No | String | The target path prefix within the storage bucket. |
| region | No | String | The region of the cloud storage. |
| site_id | No | String | The ID of the SharePoint site. Note:
|
| site_name | No | String | The name of the SharePoint site. Note:
|
| drive_id | No | String | The ID of the SharePoint document library. Note:
|
| drive_name | No | String | The name of the SharePoint document library. Note:
|
| path_id | No | String | The ID of the target SharePoint folder. Note: This
parameter takes effect only when the associated archive server's
server_type is sharepoint. |
| storage_method | No | String | The method used to store archived files. Valid value:
Note: This parameter cannot be set to
create_folder_once when freq_type is NOT
now. |
| enb_skip_achive_file | No | Integer | Whether to skip the recording files that have already been archived. Valid value:
|
| enb_delete_local_file | No | Integer | Whether to delete the local files after archiving. Valid value:
|
| enable_retention | No | Integer | Whether to enable the file retention. Valid value:
|
| retention_type | No | String | The retention mode. Note: This parameter takes effect
only when enable_retention is
1.Valid value:
|
| retention_unit | No | String | The retention unit. Note: This parameter takes effect
only when enable_retention is
1.Valid value:
|
| file_rotation_num | No | Integer | The retention limit, measured according to retention_type.
Note: This parameter takes effect only when
enable_retention is 1. |
| file_organization_by_date | No | Integer | Whether to organized the archived files by date. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Example
Request example
POST /openapi/v1.0/archive_task/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"id": 12,
"name": "January-Backup-v2"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": ""
}