list_locks
GET
/api/v1/admin/locks
const url = 'https://example.com/api/v1/admin/locks';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/admin/locks";
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/admin/locks \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”All WebDAV locks
Media typeapplication/json
统一 API 响应格式
成功: { "code": "success", "msg": "", "data": {...} }
失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }
object
code
required
string
data
Serialized offset page response.
object
items
required
Items in the current page.
Array<object>
object
created_at
required
string
depth
required
Hierarchy depth covered by a resource lock.
string
id
required
integer format: int64
lockroot_path
string | null
mode
required
Compatibility mode for locks covering the same resource hierarchy.
string
namespace_id
required
integer format: int64
origin
required
Product integration that created a lock.
string
owner
One of:
null
Lightweight user identity for embedding in admin list/detail responses.
object
id
required
integer format: int64
profile
required
object
avatar
required
object
source
required
用户头像来源
string
url_1024
string | null
url_512
string | null
version
required
integer format: int32
display_name
string | null
username
required
string
owner_info
root_file_id
integer | null format: int64
root_folder_id
integer | null format: int64
root_kind
required
Stable identity kind of a lock root.
string
timeout_at
string | null
token
required
string
limit
required
Effective page size.
integer format: int64
offset
required
Offset used for this page.
integer format: int64
total
required
Total number of items matching the query.
integer format: int64
error
msg
required
string
Example
{ "code": "success", "data": { "items": [ { "depth": "resource", "mode": "exclusive", "origin": "product", "owner": { "profile": { "avatar": { "source": "none" } } }, "owner_info": { "kind": "wopi" }, "root_kind": "workspace_root" } ] }}Admin required