List all departments.
Permission Level: Read
GET /users/department
Operation id: DepartmentService_ListDepartments
Tags: DepartmentService
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | No | Domain of the department (example: zpa, reflexis, wfc, etc). Required: false |
excludeTenantIds | array | No | List of tenant IDs to exclude. Required: false |
genericFilter | string | No | Generic filter for department fields (name, parent, displayName) If it contains a whitespace, it splits the text and filter by both words. Required: false |
includeUsers | boolean | No | Whether to include list of users who belong to the department. Required : false |
pageSize | integer (int32) | No | Items per page. Required: false |
pageToken | string | No | Mongo DB Field, describes the encoded page token for page traversal. Required: false |
scope | string | No | Scope of the department. Required: false |
sortField | string | No | Sort field valid values: name, parent, displayName, lastUpdated. Default: name. Required: false |
sortType | string | No | Sort Type for the results. Default: ASC, Required: false |
specificFilter.displayName | string | No | Only non blank |
specificFilter.hierarchyNodeSpecificFilter.isHierarchyNode | boolean | No | |
specificFilter.parentSpecificFilter.parent | string | No | |
startsWithSingleCharacter | boolean | No | Ability to search for a single starts with character, only applicable to specific_filter: display_name. Default: false, Required: false |
statusInScope | string | No | The enabled status of the department's scope in this request to search on, Default: enabled, Required: false - ENTITY_ENABLED: Entity is enabled - ENTITY_DISABLED: Entity is disabled - ENTITY_BOTH_ENABLED_DISABLED: Entity either enabled or disabled |
tenantId | string | No | TenantId of the Department. Required: false (False as this can be inferred from the token) |
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
departments | array | No | |
nextPageToken | string | No |
{
"type": "object",
"properties": {
"departments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"parent": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"ancestors": {
"type": "array",
"items": {
"type": "string"
}
},
"descendants": {
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "object"
}
},
"enabledScopes": {
"type": "object"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"domain": {
"type": "string"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"description": {
"type": "string"
},
"expiration": {
"type": "object"
},
"users": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
},
"nextPageToken": {
"type": "string"
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}