Permissions
Gofer has an RBAC system which can be utilized to give different tokens/users permissions.
| Method | Endpoint |
|---|---|
| GET | /api/roles |
| POST | /api/roles |
| GET | /api/roles/{role_id} |
| PATCH | /api/roles/{role_id} |
| DELETE | /api/roles/{role_id} |
List all roles
GET
/api/rolesResponses
| Status | Body | Description |
|---|---|---|
200 | ListRolesResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Create a new role
POST
/api/rolesThis route is only accessible for admin tokens.
Request body (required): CreateRoleRequest
Responses
| Status | Body | Description |
|---|---|---|
201 | CreateRoleResponse | successful creation |
4XX | Error | Error |
5XX | Error | Error |
Get api role by id
GET
/api/roles/{role_id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | The unique identifier for the target role. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GetRoleResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Update a role's details
PATCH
/api/roles/{role_id}This route is only accessible for admin tokens.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | The unique identifier for the target role. |
Request body (required): UpdateRoleRequest
Responses
| Status | Body | Description |
|---|---|---|
200 | UpdateRoleResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Delete api role by id
DELETE
/api/roles/{role_id}This route is only accessible for admin tokens.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | The unique identifier for the target role. |
Responses