Creates an instance of the RolesApi.
The configuration object for the Permit SDK.
The logger instance for logging.
Assigns permissions to a role.
The key of the role.
An array of permission keys (resourceKey:actionKey) to be assigned to the role.
A promise that resolves to a RoleRead object representing the updated role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Creates a new role.
The data for the new role.
A promise that resolves to the created role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Deletes a role.
The key of the role to delete.
A promise that resolves when the role is deleted.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Ensure that the API Key has the necessary permissions to successfully call the API endpoint. Note that this check is not foolproof, and the API may still throw 401.
The required API Key Access level for the endpoint.
PermitContextError If the currently set API key access level does not match the required access level.
Ensure that the API context matches the required endpoint context.
The required API context level for the endpoint.
PermitContextError If the currently set API context level does not match the required context level.
Retrieves a role by its key.
The key of the role.
A promise that resolves to the role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a role by its ID. Alias for the get method.
The ID of the role.
A promise that resolves to the role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a role by its key. Alias for the get method.
The key of the role.
A promise that resolves to the role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Retrieves a list of roles.
Optional
pagination: IPaginationThe pagination options,
A promise that resolves to an array of roles.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Removes permissions from a role.
The key of the role.
An array of permission keys (resourceKey:actionKey) to be removed from the role.
A promise that resolves to a RoleRead object representing the updated role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Updates a role.
The key of the role.
The updated data for the role.
A promise that resolves to the updated role.
PermitApiError If the API returns an error HTTP status code.
PermitContextError If the configured ApiContext does not match the required endpoint context.
Generated using TypeDoc
The RolesApi class provides methods for interacting with Permit Roles.