Skip to content

needAuth/Role


Create one role

POST
/role/create

The route used to create a new role

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
JSON
{
"name": "string",
"parentId": "string",
"rightIds": [
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Delete one role

DELETE
/role/{id}

The route used to delete a role.
This will also remove this role from every users

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the role you want to delete

Type
integer
Required

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Get all roles

GET
/role/all

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
{
}

Playground

Server
Authorization

Samples


Get all roles tree

GET
/role/tree

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
{
}

Playground

Server
Authorization

Samples


Powered by VitePress OpenAPI