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

OK

Inline

Response Schema

Status Code 200

Name

Type

Required

Restrictions

Description

anonymous

[RoleDTO]

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

RoleDTO

true

Request body containing the role definition data, including role name, permissions, and associated metadata necessary for user access management.

Responses

Status

Meaning

Description

Schema

201

Created

Created

integer

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

No Content

None