search
const url = 'https://example.com/api/v1/search';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/search";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .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/search \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Name search pattern (case-insensitive substring match)
Result type filter: “file”, “folder”, or “all” (default)
Filter by exact MIME type (e.g. “image/png”)
Filter by file category (image, video, audio, document, spreadsheet, presentation, archive, code, other)
Comma-separated file extensions (recommended format), e.g. “pdf,docx,xlsx”
Minimum file size in bytes
Maximum file size in bytes
ISO 8601 datetime — only return items created after this time
ISO 8601 datetime — only return items created before this time
Scope search to a specific folder (folder_id for files, parent_id for folders)
Comma-separated tag ids, e.g. “1,2,3”
Tag filter mode: “any” or “all” (default any)
Max results per type (default 50, max 100)
Offset for pagination
Responses
Section titled “Responses”Search results
统一 API 响应格式
成功: { "code": "success", "msg": "", "data": {...} }
失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }
object
object
object
Lowercase multi-part extension without a leading dot, such as tar.gz.
Populated only when the file name ends with a supported compound extension.
Lowercase final extension without a leading dot. Empty when the file name has no extension.
Category derived from the extension first, then MIME type as fallback.
object
object
Compatibility mode for locks covering the same resource hierarchy.
object
object
object
object
Compatibility mode for locks covering the same resource hierarchy.
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": { "files": [ { "file_category": "image", "lock_state": { "state": "unlocked" } } ], "folders": [ { "icon": { "kind": "default" }, "lock_state": { "state": "unlocked" } } ] }}Unauthorized