Departments

List departments

Changed on

List the departments in the Glean directory, ordered by display_name and then by department_id. A department is active when at least one active user belongs to it. A department is inactive when only inactive users, such as former employees, belong to it, or when only a usage limit names it. Inactive departments are left out unless an is_active filter includes the value "false". Department names are exact, so names that differ only by case are different departments.

get/api/departments

Request

  • Base URL: https://instance-name-be.glean.com
  • URL: https://instance-name-be.glean.com/api/departments
  • Auth: HTTP bearer

Query parameters

page_sizeinteger

Maximum number of departments to return. Defaults to 50. Maximum is 100.

cursorstring

Opaque pagination cursor from a previous response. Send the same filters that the previous request used.

JSON-encoded filters that choose which departments are returned. The only supported field is is_active, with the values "true" and "false" and the operator EQUALS. Multiple values OR within a filter. Multiple filters AND together. Without an is_active filter, only active departments are returned. To return active and inactive departments, send [{"field":"is_active","values":["true","false"]}].

Response

Successful response.

has_moreboolean required

Whether more departments are available after this page.

next_cursorstring nullable

Opaque cursor for the next page; null or absent when has_more is false.

request_idstring required

Request identifier for correlating this response.

Changes