get_team_file_archive_preview
GET
/api/v1/teams/{team_id}/files/{id}/archive-preview
const url = 'https://example.com/api/v1/teams/1/files/1/archive-preview?filename_encoding=auto';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/v1/teams/1/files/1/archive-preview";
let querystring = [ ("filename_encoding", "auto"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://example.com/api/v1/teams/1/files/1/archive-preview?filename_encoding=auto' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”team_id
required
integer format: int64
Team ID
id
required
integer format: int64
File ID
Query Parameters
Section titled “Query Parameters”filename_encoding
Archive entry filename decoding strategy.
string
Responses
Section titled “Responses”Team archive preview manifest
Media typeapplication/json
统一 API 响应格式
成功: { "code": "success", "msg": "", "data": {...} }
失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }
object
code
required
string
data
object
directory_count
required
integer format: int64
entries
required
Array<object>
object
compressed_size
required
integer format: int64
kind
required
string
modified_at
string | null
name
required
string
parent
string | null
path
required
string
size
required
integer format: int64
entry_count
required
integer format: int64
file_count
required
integer format: int64
format
required
string
generated_at
required
string
schema_version
required
integer format: int32
source_blob_id
required
integer format: int64
source_hash
required
string
total_uncompressed_size
required
integer format: int64
truncated
required
boolean
error
msg
required
string
Example
{ "code": "success", "data": { "entries": [ { "kind": "file" } ], "extract_compatibility": { "reason": "unsupported_entry_names" } }}Archive preview generation has been queued
Archive preview not modified
Not a supported archive or archive rejected by limits
Unauthorized
Forbidden or archive preview disabled
File not found