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

NameTypeRequiredDescription
tenantIdstringNotenant that the user belongs to, Default: tenant of the caller token, Required: false
userIdstringNouser_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

PropertyTypeRequiredDescription
validSelectedDepartmentsarrayNo
validDepartmentsarrayNo
{
  "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

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}