Search roles by multiple attributes and other filters

Permission Level: Read

POST /users/roles/search

Operation id: RoleService_ListRolesWithFilter

Tags: RoleService

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
tenantIdarrayNo
domainstringNo
scopestringNo
pageTokenstringNo
pageSizeinteger (int32)NoRequested size of the next page of data. If not set, the default page size is 10, Required: false.
sortFieldstringNo
sortTypestringNo
includePermissionsbooleanNo
genericFilterstringNo
specificFilterobjectNo
startsWithSingleCharacterbooleanNo
isTemplatebooleanNo
exclusionFiltersarrayNo
enabledStatusstringNo
fieldMaskstringNo
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "domain": {
      "type": "string"
    },
    "scope": {
      "type": "string"
    },
    "pageToken": {
      "type": "string"
    },
    "pageSize": {
      "type": "integer",
      "format": "int32",
      "description": "Requested size of the next page of data. If not set, the default page size is 10, Required: false."
    },
    "sortField": {
      "type": "string"
    },
    "sortType": {
      "type": "string",
      "enum": [
        "NONE",
        "ASC",
        "DESC"
      ],
      "default": "NONE"
    },
    "includePermissions": {
      "type": "boolean"
    },
    "genericFilter": {
      "type": "string"
    },
    "specificFilter": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "roleId": {
          "type": "string"
        },
        "systemLevel": {
          "type": "string",
          "enum": [
            "FILTER_DISABLED",
            "FILTER_TRUE",
            "FILTER_FALSE"
          ],
          "default": "FILTER_DISABLED"
        },
        "displayName": {
          "type": "string"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "scope": {
                "type": "string"
              },
              "fieldName": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "startsWithSingleCharacter": {
      "type": "boolean"
    },
    "isTemplate": {
      "type": "boolean"
    },
    "exclusionFilters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string",
            "description": "the entity field name. Required: true."
          },
          "values": {
            "type": "array",
            "description": "the values that should be excluded. Required: true.",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "enabledStatus": {
      "type": "string",
      "enum": [
        "ROLE_SCOPE_BOTH",
        "ROLE_SCOPE_ENABLED",
        "ROLE_SCOPE_DISABLED"
      ],
      "default": "ROLE_SCOPE_BOTH"
    },
    "fieldMask": {
      "type": "string"
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
rolesarrayNo
nextPageTokenstringNo
{
  "type": "object",
  "properties": {
    "roles": {
      "type": "array",
      "items": {
        "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"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "systemLevel": {
            "type": "boolean"
          },
          "workspaces": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "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"
            }
          },
          "roleType": {
            "type": "string",
            "enum": [
              "UNDEFINED",
              "USER",
              "ADMIN"
            ],
            "default": "UNDEFINED"
          }
        }
      }
    },
    "nextPageToken": {
      "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"
          }
        }
      }
    }
  }
}