Add roles to a department.

It is required a department and list of roles to be added. Permission Level: Read-Write

POST /users/department/{departmentName}/roles

Operation id: DepartmentService_AddDepartmentRoles

Tags: DepartmentService

Parameters

Path parameters

NameTypeRequiredDescription
departmentNamestringYesName of the department. 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

Request body

Required: Yes

application/json

Schema

PropertyTypeRequiredDescription
tenantIdstringNo
rolesarrayNo
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
          },
          "domain": {
            "type": "string",
            "description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
          },
          "scope": {
            "type": "string",
            "description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
          },
          "roleId": {
            "type": "string",
            "description": "The role ID. Required: true."
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
departmentobjectNo
{
  "type": "object",
  "properties": {
    "department": {
      "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",
            "properties": {
              "scope": {
                "type": "string"
              },
              "fieldName": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              }
            }
          }
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tenantId": {
                "type": "string",
                "description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
              },
              "domain": {
                "type": "string",
                "description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
              },
              "scope": {
                "type": "string",
                "description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
              },
              "roleId": {
                "type": "string",
                "description": "The role ID. Required: true."
              },
              "userIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "enabledScopes": {
          "type": "object"
        },
        "creationTime": {
          "type": "string",
          "format": "date-time"
        },
        "domain": {
          "type": "string"
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "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"
          }
        }
      }
    }
  }
}