Roles and Permissions API's Route Improvement
Overview
This document provides a route mapping for LoginRadius Roles and Permissions APIs. It shows how legacy Roles and Permissions endpoints map to newer, more consistent routes, making it easier to manage roles and the permissions associated with them. Use this page as a migration reference when updating an existing integration to the newer Roles and Permissions routes.
What's changing
- Legacy paths are being replaced with cleaner, resource-oriented endpoints (for example,
/v2/manage/roles,/v2/manage/permissions). - Roles are now identified by an
idrather than byroleNamein the URL path. - Permissions are now a first-class resource: instead of attaching or detaching permissions through role-scoped endpoints, you create permissions via
POST /v2/manage/permissionsand then assign them to a role usingPUT /v2/manage/roles/:id.
Roles APIs
| Old Method | Old Path | New Method | New Path | Description |
|---|---|---|---|---|
GET | /identity/v2/manage/role | GET | /v2/manage/roles | Get the list of roles |
POST | /identity/v2/manage/role | POST | /v2/manage/roles | Create a new role |
DELETE | /identity/v2/manage/role/:roleName | DELETE | /v2/manage/roles/:id | Delete a role |
PUT | /identity/v2/manage/role/:roleName/permission | POSTPUT | /v2/manage/permissions/v2/manage/roles/:id | Add permissions to a role |
DELETE | /identity/v2/manage/role/:roleName/permission | PUT | /v2/manage/roles/:id | Remove permissions from a role |
Updating permissions on a role
To add or update permissions on a role, the workflow is now a two-step process:
- Create the permission using
POST /v2/manage/permissions. - Assign the permission to the role using
PUT /v2/manage/roles/:id, referencing the permission(s) created in step 1. - To remove permissions from a role use
PUT /v2/manage/roles/:idand submit the updated permission set for that role.
Please reach out to LoginRadius Support for any further queries.