Update role
PUT/v1/roles-with-permissions/:roleId
Update role
This endpoint allows updating a role's details and associated permissions within the system. It accepts a roleId as a path parameter and a JSON payload containing the new role details and permissions. The operation validates the input, checks for role existence, ensures uniqueness of permissions, and updates the database accordingly. Successful updates return a 204 No Content status; errors may result in 400 Bad Request (for duplicate permissions), 404 Not Found (if the role or permissions don't exist), or 500 Internal Server Error.
Request
Path Parameters
role_id stringrequired
Role id
roleId uuidrequired
- application/json
Body
required
daily_limit int32nullable
monthly_limit int32nullable
name stringrequired
permissions uuid[]required
single_tx_limit int32nullable
wallet_id uuidrequired
Responses
- 204
- 400
- 404
- 500
Role and its permissions updated
Duplicated permissions are not allowed
- text/plain
- Schema
Schema
string
Role or permission not found
- text/plain
- Schema
Schema
string
Internal server error
- text/plain
- Schema
Schema
string
Loading...