Retrieving list of all valid departments for a given user
GET /users/validdepartments
Operation id: UserService_GetValidDepartmentsByUser
Description
Permission Level: Read
Tags: UserService
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | tenant that the user belongs to, Default: tenant of the caller token, Required: false |
userId | string | No | user_id of the user whose departments you wish to retrieve, Required: true |
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 |
|---|---|---|---|
validSelectedDepartments | array | No | |
validDepartments | array | No |
{
"type": "object",
"properties": {
"validSelectedDepartments": {
"type": "array",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case.",
"properties": {
"tenantId": {
"type": "string"
},
"departmentName": {
"type": "string"
}
}
}
},
"validDepartments": {
"type": "array",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case.",
"properties": {
"tenantId": {
"type": "string"
},
"departmentName": {
"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"
}
}
}
}
}
}