You need to enable JavaScript to run this app.
文档中心
ArkClaw 企业版

ArkClaw 企业版

复制全文
下载 pdf
UserManagement
ListDepartments - 批量查询部门详情
复制全文
下载 pdf
ListDepartments - 批量查询部门详情
批量查询部门详情。
请求参数
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数
Action string 必选 示例值:ListDepartments
要执行的操作,取值:ListDepartments。
Version string 必选 示例值:2026-05-01
API的版本,取值:2026-05-01。
SpaceId string 必选 示例值:csi-yei8347ta8xmf5qd****
ArkClaw 空间 ID,可以在 ArkClaw 控制台“空间概览”页面的“基本信息”获取。
ParentDepartmentId string 必选 示例值:root
上级部门 ID,传 "root" 表示查询根部门下的直属子部门。
MaxResults integer 可选 示例值:10
分页查询时设置的每页行数。
  • 最小值:1。
  • 最大值:100。
  • 默认值:10。
  • 若传入非法MaxResults值,会被自动调整为默认值。
NextToken string 可选 示例值:Y2kteWVqMXJreTVma3F0Y****
分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的NextToken参数值。
Filter.Name string 可选 示例值:Frontend
通过部门名称查询。
Filter.ExternalId string 可选 示例值:ext-123456
通过外部系统中的部门唯一标识 ID 查询,支持精准匹配。
Filter.NameMatchMode integer 可选 示例值:0
名称匹配模式,取值:
  • 0(默认):精确匹配。
  • 1:模糊匹配。
返回参数
下方仅列出本接口特有的返回参数。更多信息请参见返回结构
Departments object[] 示例值:--
部门列表数据。
CreateTime string 示例值:2026-01-01T00:00:00Z
部门的创建时间,时间格式为 RFC3339 UTC。
DepartmentId string 示例值:2479e108-1a5c-4311-****
部门 ID。
Description string 示例值:负责平台前端研发
部门描述。
DirectChildrenCount integer 示例值:3
直属子部门数量。
DirectMemberCount integer 示例值:10
部门直属成员数(仅统计当前部门,不包含子部门)。
ExternalId string 示例值:ext-123456
外部系统中的部门唯一标识 ID。
MemberCount integer 示例值:42
部门成员总数(统计当前部门及其所有子部门的成员)。
Name string 示例值:Frontend
部门名称。
NamePath string 示例值:/Engineering/Frontend
部门名称路径,表示该部门在部门树中的层级位置(由各级部门名称拼接)。
ParentDepartmentId string 示例值:root
上级部门 ID,返回 "root" 表示根部门。
Path string 示例值:/root/fdeeba37-51e7-****/2479e108-1a5c-4311-****
部门 ID 路径,表示该部门在部门树中的层级位置(由各级部门 ID 拼接,包含 root)。
SpaceId string 示例值:csi-yei8347ta8xmf5qd****
部门所属空间 ID。
UpdateTime string 示例值:2026-01-01T00:00:00Z
部门的更新时间,时间格式为 RFC3339 UTC。
NextToken string 示例值:Y2kteWVqMXJreTVma3F0Y****
本次调用返回的查询凭证值,返回为空表示该页为末页。
TotalCount integer 示例值:42
满足查询条件的部门总数。
请求示例
GET /?Action=ListDepartments&Version=2026-05-01&SpaceId=csi-yei8347ta8xmf5qd****&ParentDepartmentId=root&MaxResults=10&NextToken=Y2kteWVqMXJreTVma3F0Y****&Filter.Name=Frontend&Filter.ExternalId=ext-123456&Filter.NameMatchMode=0 HTTP/1.1
Host: https://arkclaw.cn-beijing.volcengineapi.com
X-Date: 20260903T034330Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260903/cn-beijing/arkclaw/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
返回示例
{
"ResponseMetadata": {
"RequestId": "2026090311433404918107****",
"Action": "ListDepartments",
"Version": "2026-05-01",
"Service": "arkclaw",
"Region": "cn-beijing"
},
"Result": {
"Departments": [
{
"CreateTime": "2026-01-01T00:00:00Z",
"DepartmentId": "2479e108-1a5c-4311-****",
"Description": "负责平台前端研发",
"DirectChildrenCount": 3,
"DirectMemberCount": 10,
"ExternalId": "ext-123456",
"MemberCount": 42,
"Name": "Frontend",
"NamePath": "/Engineering/Frontend",
"ParentDepartmentId": "root",
"Path": "/root/fdeeba37-51e7-****/2479e108-1a5c-4311-****",
"SpaceId": "csi-yei8347ta8xmf5qd****",
"UpdateTime": "2026-01-01T00:00:00Z"
}
],
"NextToken": "Y2kteWVqMXJreTVma3F0Y****",
"TotalCount": 42
}
}
错误码
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码
错误码
错误信息
说明
400
MissingParameter.SpaceId
The required parameter SpaceId is not supplied.
参数SpaceId不能为空。
400
MissingParameter.ParentDepartmentId
The required parameter ParentDepartmentId is not supplied.
参数ParentDepartmentId不能为空。
404
InvalidSpace.NotFound
The specified space does not exist.
指定的ClawSpace不存在。
404
InvalidResource.NotFound
The specified resource does not exist.
指定资源不存在。
500
ErrGetClawSpaceFailed
get claw space failed.
space获取失败。
500
InternalError
An internal error has occurred.
内部错误,请重试。如果多次尝试失败,请提交工单。
最近更新时间:2026.09.08 14:33:47
这个页面对您有帮助吗?
有用
有用
无用
无用