Roles

class matterapi.endpoints.async_api.RolesApi(client: matterapi.client.base.BaseClient, skip_response_parsing: bool = False)

Endpoints for creating, getting and updating roles.

async get_all_roles() List[matterapi.models.Role]

Get a list of all the roles

Permissions:

manage_system permission is required.

Minimum Server Version:

5.33

Api Reference:

GetAllRoles

async get_role(role_id: str) matterapi.models.Role

Get a role

Get a role from the provided role id.

Permissions:

Requires an active session but no other permissions.

Minimum Server Version:

4.9

Api Reference:

GetRole

async get_role_by_name(role_name: str) matterapi.models.Role

Get a role

Get a role from the provided role name.

Permissions:

Requires an active session but no other permissions.

Minimum Server Version:

4.9

Api Reference:

GetRoleByName

async get_roles_by_names(*, json_body: Union[List[str], Dict]) List[matterapi.models.Role]

Get a list of roles by name

Get a list of roles from their names.

Permissions:

Requires an active session but no other permissions.

Minimum Server Version:

4.9

Api Reference:

GetRolesByNames

async patch_role(role_id: str, *, json_body: Union[matterapi.models.PatchRoleJsonBody, Dict]) matterapi.models.Role

Patch a role

Partially update a role by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored.

Permissions:

manage_system permission is required.

Minimum Server Version:

4.9

Api Reference:

PatchRole