Permissions

Gofer has an RBAC system which can be utilized to give different tokens/users permissions.


List all roles

GET/api/roles

Responses

StatusBodyDescription
200ListRolesResponsesuccessful operation
4XXErrorError
5XXErrorError

Create a new role

POST/api/roles

This route is only accessible for admin tokens.

Request body (required): CreateRoleRequest

Responses

StatusBodyDescription
201CreateRoleResponsesuccessful creation
4XXErrorError
5XXErrorError

Get api role by id

GET/api/roles/{role_id}

Path parameters

NameTypeRequiredDescription
role_idstringyesThe unique identifier for the target role.

Responses

StatusBodyDescription
200GetRoleResponsesuccessful operation
4XXErrorError
5XXErrorError

Update a role's details

PATCH/api/roles/{role_id}

This route is only accessible for admin tokens.

Path parameters

NameTypeRequiredDescription
role_idstringyesThe unique identifier for the target role.

Request body (required): UpdateRoleRequest

Responses

StatusBodyDescription
200UpdateRoleResponsesuccessful operation
4XXErrorError
5XXErrorError

Delete api role by id

DELETE/api/roles/{role_id}

This route is only accessible for admin tokens.

Path parameters

NameTypeRequiredDescription
role_idstringyesThe unique identifier for the target role.

Responses

StatusBodyDescription
204nonesuccessful deletion
4XXErrorError
5XXErrorError