batch_archive_download_team
POST
/api/v1/teams/{team_id}/batch/archive-download
const url = 'https://example.com/api/v1/teams/1/batch/archive-download';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"archive_name":"example","file_ids":[1],"folder_ids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/v1/teams/1/batch/archive-download";
let payload = json!({ "archive_name": "example", "file_ids": (1), "folder_ids": (1) });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://example.com/api/v1/teams/1/batch/archive-download \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "archive_name": "example", "file_ids": [ 1 ], "folder_ids": [ 1 ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”team_id
required
integer format: int64
Team ID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Request an archive download ticket for the selected files and folders.
object
archive_name
string | null
file_ids
Array<integer>
folder_ids
Array<integer>
Examplegenerated
{ "archive_name": "example", "file_ids": [ 1 ], "folder_ids": [ 1 ]}Responses
Section titled “Responses”Team archive download ticket
Media typeapplication/json
统一 API 响应格式
成功: { "code": "success", "msg": "", "data": {...} }
失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }
object
Example
{ "code": "success"}Invalid request
Unauthorized
Forbidden or ArchiveDownloadUserDisabled