younifyd
Menu

Check whether a role possesses a permission

Check whether a role possesses a permission

POST/v1/authz/roles/{id}/has-permission

Use it in a workflow

  1. Add a step and choose the Weaviate connector.
  2. Pick the Check whether a role possesses a permission action (under authz).
  3. Fill in the fields below, then reference the result from later steps as {{checkWhetherARolePossessesAPermission.response.data}}.

Request

Path parameters

idstringrequired

The name of the role.

Request body

Enter the body as JSON in the step's Body field.

backupsobject

Resources applicable for backup actions.

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

dataobject

Resources applicable for data actions.

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

tenantstring

A string that specifies which tenants this permission applies to. Can be an exact tenant name or a regex pattern. The default value `*` applies the permission to all tenants.

Default "*"

objectstring

Deprecated: Object-level permissions are not supported. This field is ignored; the permission always applies to all objects. Kept for backward compatibility.

Default "*"

nodesobject

Resources applicable for cluster actions.

verbositystring

Whether to allow (verbose) returning shards and stats data in the response.

One ofverboseminimalDefault "minimal"

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

usersobject

Resources applicable for user actions.

usersstring

A string that specifies which users this permission applies to. Can be an exact user name or a regex pattern. The default value `*` applies the permission to all users. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

groupsobject

Resources applicable for group actions.

groupstring

A string that specifies which groups this permission applies to. Can be an exact group name or a regex pattern. The default value `*` applies the permission to all groups. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

groupTypestring

If the group contains OIDC or database users.

One ofoidc

tenantsobject

Resources applicable for tenant actions.

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

tenantstring

A string that specifies which tenants this permission applies to. Can be an exact tenant name or a regex pattern. The default value `*` applies the permission to all tenants.

Default "*"

rolesobject

Resources applicable for role actions.

rolestring

A string that specifies which roles this permission applies to. Can be an exact role name or a regex pattern. The default value `*` applies the permission to all roles. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

scopestring

Set the scope for the manage role permission.

One ofallmatchDefault "match"

collectionsobject

Resources applicable for collection and/or tenant actions.

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

replicateobject

resources applicable for replicate actions

collectionstring

string or regex. if a specific collection name, if left empty it will be ALL or *

Default "*"

shardstring

string or regex. if a specific shard name, if left empty it will be ALL or *. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

aliasesobject

Resource definition for alias-related actions and permissions. Used to specify which aliases and collections can be accessed or modified.

collectionstring

A string that specifies which collections this permission applies to. Can be an exact collection name or a regex pattern. The default value `*` applies the permission to all collections.

Default "*"

aliasstring

A string that specifies which aliases this permission applies to. Can be an exact alias name or a regex pattern. The default value `*` applies the permission to all aliases. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

namespacesobject

Resources applicable for namespace actions.

namespacestring

A string that specifies which namespaces this permission applies to. Can be an exact namespace name or a regex pattern. The default value `*` applies the permission to all namespaces. Must be at most 256 bytes, must not contain '/', and must be a valid regex pattern. Creating a role or adding permissions also refuses ',', '"' and control characters.

Default "*"

actionstringrequired

Allowed actions in weaviate.

One ofmanage_backupsread_backupsread_clustercreate_dataread_dataupdate_datadelete_dataread_nodescreate_rolesread_rolesupdate_rolesdelete_rolescreate_collectionsread_collectionsupdate_collectionsdelete_collectionsassign_and_revoke_userscreate_usersread_usersupdate_usersdelete_userscreate_tenantsread_tenantsupdate_tenantsdelete_tenantscreate_replicateread_replicateupdate_replicatedelete_replicatecreate_aliasesread_aliasesupdate_aliasesdelete_aliasesassign_and_revoke_groupsread_groupscreate_mcpread_mcpupdate_mcpmanage_namespaces

json
{
  "action": "manage_backups",
  "backups": {
    "collection": "*"
  },
  "data": {
    "collection": "*",
    "tenant": "*",
    "object": "*"
  },
  "nodes": {
    "verbosity": "minimal",
    "collection": "*"
  },
  "users": {
    "users": "*"
  },
  "groups": {
    "group": "*",
    "groupType": "oidc"
  },
  "tenants": {
    "collection": "*",
    "tenant": "*"
  },
  "roles": {
    "role": "*",
    "scope": "match"
  },
  "collections": {
    "collection": "*"
  },
  "replicate": {
    "collection": "*",
    "shard": "*"
  },
  "aliases": {
    "collection": "*",
    "alias": "*"
  },
  "namespaces": {
    "namespace": "*"
  }
}

Response

Returns 200 with a any. Read it in later steps with {{checkWhetherARolePossessesAPermission.response.data.<field>}}.

Need more? See the Weaviate guide for connection setup and behaviour shared by every action.

Check whether a role possesses a permission — Weaviate — Documentation