Add roles to a Role.

It is required a Role and a list of roles to add. Permission Level: Read-Write

POST /users/roles/{roleId}/subroles

Operation id: RoleService_AddSubroles

Tags: RoleService

Parameters

Path parameters

NameTypeRequiredDescription
roleIdstringYesRole ID of the role, 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
domainstringNo
scopestringNo
rolesarrayNoList of subroles to add to the role. Required: true.
fieldMaskstringNo
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "scope": {
      "type": "string"
    },
    "roles": {
      "type": "array",
      "description": "List of subroles to add to the role. Required: true.",
      "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"
            }
          }
        }
      }
    },
    "fieldMask": {
      "type": "string"
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
globalIdstringNo
tenantIdstringNo
domainstringNo
scopestringNoSome more general scoping for the data (like a particular app in the domain). Required: false.
roleIdstringNo
descriptionstringNoRole description. Required: false.
usersarrayNo
rolesarrayNo
systemLevelbooleanNo
workspacesarrayNo
permissionsIdsarrayNo
deactivatedbooleanNo
creationTimestring (date-time)No
lastUpdatedstring (date-time)No
displayNamestringNo
dynamicbooleanNo
attributesarrayNo
roleTypestringNo
{
  "type": "object",
  "properties": {
    "globalId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "scope": {
      "type": "string",
      "description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
    },
    "roleId": {
      "type": "string"
    },
    "description": {
      "type": "string",
      "description": "Role description. Required: false."
    },
    "users": {
      "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."
          },
          "userId": {
            "type": "string",
            "description": "The user ID. Required: true."
          },
          "firstName": {
            "type": "string",
            "description": "The first name. Required: false."
          },
          "lastName": {
            "type": "string",
            "description": "The last name. Required: false."
          }
        }
      }
    },
    "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"
            }
          }
        }
      }
    },
    "systemLevel": {
      "type": "boolean"
    },
    "workspaces": {
      "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."
          },
          "name": {
            "type": "string"
          },
          "workspaceType": {
            "type": "string"
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "permissionsIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "deactivated": {
      "type": "boolean"
    },
    "creationTime": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdated": {
      "type": "string",
      "format": "date-time"
    },
    "displayName": {
      "type": "string"
    },
    "dynamic": {
      "type": "boolean"
    },
    "attributes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string"
          },
          "fieldName": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        }
      }
    },
    "roleType": {
      "type": "string",
      "enum": [
        "UNDEFINED",
        "USER",
        "ADMIN"
      ],
      "default": "UNDEFINED"
    }
  }
}

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"
          }
        }
      }
    }
  }
}