departments
List departments with optional status/parent filters and search, returning member counts.
Use departmentDetail for a single department.
Auth · x-app-token · required permission showDepartment
Related: departmentDetail, Department, Authentication
departments(ids: [String], excludeIds: Boolean, perPage: Int, page: Int, searchValue: String, status: String, onlyFirstLevel: Boolean, parentId: String, withoutUserFilter: Boolean): DepartmentListQueryResponseArguments
Restrict to these department ids.
When true, ids excludes instead of includes.
Page size. See Pagination.
1-based page index. See Pagination.
Case-insensitive partial match on title.
Filter by lifecycle status.
When true, only return top-level departments (no parentId).
Restrict to direct children of this department id.
When true, skip filtering departments by the caller's user scope.
Returns
Department rows for the current page.
Standard pagination metadata: totalCount, currentPage, totalPages,
hasNextPage, hasPreviousPage, perPage.
Total number of users across all matching departments.