Role 123 Endpoints
GET
/api/roles/123
PublicRetrieve details for role with ID 123
GET /api/roles/123 Host: api.intern.ylvnyna.com Accept: application/json
{ "id": "123", "name": "Junior Developer", "permissions": ["view_projects", "access_docs"], "created_at": "2025-09-03T09:00:00Z" }
PUT
/api/roles/123
ProtectedUpdate this role's permissions
PUT /api/roles/123 Host: api.intern.ylvnyna.com Content-Type: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... { "permissions": ["manage_projects", "view_reports"] }
{ "id": "123", "name": "Junior Developer", "permissions": ["manage_projects", "view_reports"], "updated_at": "2025-09-23T14:30:00Z" }
DELETE
/api/roles/123
ProtectedDelete this role from the system
DELETE /api/roles/123 Host: api.intern.ylvnyna.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
{ "success": true, "message": "Role 123 deleted successfully", "deleted_at": "2025-09-23T14:35:00Z" }
Authentication
Bearer Token Authentication
Protected endpoints require Bearer token in Authorization header
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Common Responses
200
OK
Role data retrieved successfully
204
No Content
Role deletion completed with no content
401
Unauthorized
Missing or invalid authentication token
404
Not Found
Role with this ID does not exist
405
Method Not Allowed
Used invalid HTTP method for this endpoint