Skip to main content

List departments.

GET/api/v1/departmentsusers:read

Keyset list of the departments a user can be put in, by department_id. update_user and batch_invite_users name a department by its name. Needs View Departments.

Scopeusers:read
AsynchronousNo
MCP toollist_departments
Portal permissionsview_departments
Pagingkeyset
Default orderdepartment_id
Sort fieldsdepartment_id

Parameters​

NameInTypeRequiredDescription
limitqueryintegerOptionalDefault: 50; ≥ 1
cursorquerystringOptional
sortquerystringOptionalComma-separated sort fields, - for descending.
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json object
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
410cursor_expiredapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

200 body​

FieldTypeRequiredDescription
itemsarray of DepartmentRequired
next_cursorstring or nullRequired
warningsarray of objectRequired

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

Department​

FieldTypeRequiredDescription
default_folderstring or nullRequiredThe folder name stored with the department; null when none.
department_idstringRequired
namestringRequiredWhat update_user and batch_invite_users take as the department.