The following documentation is applicable to Free, Developer, and Developer Pro plans. For documentation related to the enterprise plan, please click here.

Roles Management API

Refer this document to get API Key and Secret.

Roles Create

Creates a Role with Permissions.

Endpoint

POST https://api.loginradius.com/identity/v2/manage/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
RolesArray of Role objectsModel Class containing Definition of payload for Roles API [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Roles by UID

Retrieves all assigned Roles of the consumer corresponding to the specified UID.

Endpoint

GET https://api.loginradius.com/identity/v2/manage/account/{uid}/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Get Context with Roles and Permissions

Retrieves configured Role Contexts and its associated Roles and Permissions.

Endpoint

GET https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Role Context Profile

Retrieves a Role Context by its name.

Endpoint

GET https://api.loginradius.com/identity/v2/manage/account/roleContext/{contextName}

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Roles List

Retrieves all Roles with Permissions configured in your app.

Endpoint

GET https://api.loginradius.com/identity/v2/manage/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Assign Roles by UID

Assigns specified Roles to the consumer corresponding to the specified UID.

Endpoint

PUT https://api.loginradius.com/identity/v2/manage/account/{uid}/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
RolesArray of String, which represents the role nameModel Class containing Definition of payload for Create Role API [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Upsert Context

Creates a Role Context with a set of Roles.

Endpoint

PUT https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
RoleContextArray of RoleContext object, see body tab for structureModel Class containing Definition of RoleContext payload [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Add Permissions to Role

Adds specified Permissions to a Role.

Endpoint

PUT https://api.loginradius.com/identity/v2/manage/role/{role}/permission

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
PermissionsAny Permission name for the roleModel Class containing Definition for PermissionsModel Property [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Unassign Roles by UID

Unassigns Roles from the consumer corresponding to the specified UID.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/account/{uid}/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
RolesArray of String, which represents the role nameModel Class containing Definition of payload for Create Role API [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Delete Role Context

Deletes a specified Role Context from the consumer corresponding to the specified UID.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Delete Role from Context

Deletes a specified Role from Role Context of the consumer corresponding to the specified UID.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}/role

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
RolesArray of String, which represents the role nameModel Class containing Definition of payload for RoleContextRemoveRole API [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Delete Additional Permission from Context

Deletes Additional Permissions from Role Context of the consumer corresponding to the specified UID.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}/additionalPermission

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
AdditionalPermissionsArray of String, which represents the additional permissionsModel Class containing Definition of payload for RoleContextAdditionalPermissionRemoveRole API [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Account Delete Role

Deletes a specified Role.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/role/{role}

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Remove Permissions

Removes permissions from a specified Role.

Endpoint

DELETE https://api.loginradius.com/identity/v2/manage/role/{role}/permission

Query Parameters

ParameterDefaultDescription
apikeynoneLoginRadius API Key [Required]
apisecretnoneLoginRadius API Secret [Required]

Body Attributes

AttributeDescription
PermissionsAny Permission name for the roleModel Class containing Definition for PermissionsModel Property [Required]

Try Me Out

Enter query parameters and send a request to view the sample response.

Go Back to Home Page


Was this article helpful?

Have more questions? Submit a request