Was this helpful?
Get user details by ID (admin only)
GET /api/users/{id} HTTP/1.1 Host: localhost:3000 Authorization: Bearer JWT Accept: */*
User details
{ "id": "123e4567-e89b-12d3-a456-426614174000", "username": "text", "permissions": [ "text" ], "createdAt": "2025-05-20T01:12:32.530Z", "updatedAt": "2025-05-20T01:12:32.530Z" }
Delete a user (admin only)
DELETE /api/users/{id} HTTP/1.1 Host: localhost:3000 Authorization: Bearer JWT Accept: */*
User deleted successfully
{ "success": true }
List all users (admin only)
GET /api/users HTTP/1.1 Host: localhost:3000 Authorization: Bearer JWT Accept: */*
List of users
[ { "id": "123e4567-e89b-12d3-a456-426614174000", "username": "text", "permissions": [ "text" ], "createdAt": "2025-05-20T01:12:32.530Z", "updatedAt": "2025-05-20T01:12:32.530Z" } ]
Create a new user (admin only)
POST /api/users HTTP/1.1 Host: localhost:3000 Authorization: Bearer JWT Content-Type: application/json Accept: */* Content-Length: 60 { "username": "text", "password": "text", "permissions": [ "text" ] }
User created successfully
Update user details (admin only)
PATCH /api/users/{id} HTTP/1.1 Host: localhost:3000 Authorization: Bearer JWT Content-Type: application/json Accept: */* Content-Length: 60 { "username": "text", "password": "text", "permissions": [ "text" ] }
User updated successfully