Roles Resource¶
Get All Roles¶
HTTP Request
GET /api/roles
📋 Description: Retrieves a list of user roles within the system, enabling administrators to manage permissions and access levels effectively.
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
OK |
Inline |
Example Responses
1[
2 {
3 "id": 0,
4 "createdBy": "string",
5 "createdAt": "2019-08-24T14:15:22Z",
6 "roleName": "string",
7 "entity": "string",
8 "permissions": [
9 "READ_REQUEST"
10 ]
11 }
12]
Response Schema
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
anonymous |
false |
none |
[Data transfer object representing a user role within the system, encapsulating essential attributes such as role name, permissions, and associated metadata to facilitate effective access management and organizational structure.] |
|
» id |
integer(int64) |
false |
none |
Unique identifier for the resource |
» createdBy |
string |
false |
none |
Username of who created this resource |
» createdAt |
string(date-time) |
false |
none |
Timestamp when this resource was created |
» roleName |
string |
false |
none |
Name of the role |
» entity |
string |
false |
none |
Represents the specific role associated with the user, facilitating role-based access and permissions within the system. |
» permissions |
[string] |
false |
none |
Array of RoleDTO objects that defines the specific permissions assigned to a user within the system, facilitating role-based access control. |
Create Role¶
HTTP Request
POST /api/roles
📋 Description: Creates a new role within the system, enabling the organization to define and manage user permissions and responsibilities effectively.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
body |
body |
true |
Request body containing the role definition data, including role name, permissions, and associated metadata necessary for user access management. |
Body Parameters
1{
2 "id": 0,
3 "createdBy": "string",
4 "createdAt": "2019-08-24T14:15:22Z",
5 "roleName": "string",
6 "entity": "string",
7 "permissions": [
8 "READ_REQUEST"
9 ]
10}
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
201 |
Created |
integer |
Example Responses
10
Delete Role¶
HTTP Request
DELETE /api/roles/{id}
📋 Description: Deletes a specified role from the system, ensuring that role-based access and permissions are updated accordingly to maintain security and compliance within the organization.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
id |
path |
integer(int64) |
true |
Unique identifier for the resource |
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
204 |
No Content |
None |