Actions25
部门管理 → 获取子部门ID列表
AI-generatedSummary
Retrieve the list of IDs for the specified department and all its sub-departments recursively. If no department ID is provided, fetch the entire organizational structure's department IDs.
Inputs
- 部门ID — The ID of the department whose sub-departments (including nested sub-departments recursively) will be retrieved. If not specified, the operation returns the full set of department IDs representing the entire organization structure.
Output shape
a JSON object containing a list of department IDs representing the specified department and its recursive sub-departments, or all departments if no ID is given.
The operation performs an authenticated GET request to the Wechat Work API endpoint
/cgi-bin/department/simplelistwith an optionalidquery parameter. The response includes department IDs in a JSON structure. Errors throw a NodeOperationError with Wechat Work error codes and messages.