init_team_upload_session
const url = 'https://example.com/api/v1/teams/1/files/upload/init';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filename":"example","folder_id":1,"frontend_client_id":"example","mime_type":"example","relative_path":"example","total_size":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/files/upload/init";
let payload = json!({ "filename": "example", "folder_id": 1, "frontend_client_id": "example", "mime_type": "example", "relative_path": "example", "total_size": 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/files/upload/init \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "folder_id": 1, "frontend_client_id": "example", "mime_type": "example", "relative_path": "example", "total_size": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Team ID
Request Bodyrequired
Section titled “Request Bodyrequired”Initialize a chunked upload session.
object
Example generated
{ "filename": "example", "folder_id": 1, "frontend_client_id": "example", "mime_type": "example", "relative_path": "example", "total_size": 1}Responses
Section titled “Responses”Team upload session created
object
object
Upload data plane fixed by upload initialization.
浏览器直传完成后是否必须从响应读取 ETag。
object
object
Version of the finite browser executor, independent from driver protocol versions.
object
A capability URL, never an administrator credential. Do not log this value.
object
object
Only these response headers may be reported to the driver.
Increments only when driver state or confirmed progress advances, not for a fresh request ID.
Opaque driver-owned protocol identity. Versions are interpreted by the driver, not the browser.
object
object
object
Connector-owned field that caused a configuration validation failure.
This is intentionally optional so existing diagnostics remain wire-compatible.
Connector field scope, for example connector_config or static_credential.
Example
{ "code": "success", "data": { "mode": "stream", "provider_resumable": { "browser_upload": { "instruction": { "request": { "completion": { "source": "response_header" }, "method": "GET" } } } }, "upload_scheduling": { "chunk_ordering": "unordered" } }}Unauthorized
Forbidden
Target capacity observation is temporarily unavailable
Eligible targets have insufficient capacity