Retrieves an administrator’s details by their unique user ID.
Path Parameters
The UUID of the administrator to retrieveExample: "123e4567-e89b-12d3-a456-426614174000"
Response
The unique identifier for the admin user
Full name of the administrator
Email address of the administrator
ISO timestamp when the admin account was created
ISO timestamp when the admin account was last updated
curl -X GET http://localhost:8080/admin/123e4567-e89b-12d3-a456-426614174000
{
"userId": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Smith",
"email": "[email protected]",
"password": "$2a$10$encrypted_password_hash",
"creationTimestamp": "2024-03-15T10:30:00Z",
"updatedTimestamp": "2024-03-15T10:30:00Z"
}
Error Responses
Returned when no admin exists with the specified IDResponse: Empty response body with 404 status code
Returned when the ID format is invalid (not a valid UUID)
Security Considerations
Security Notes:
- Authentication Required: This endpoint should require authentication to prevent unauthorized access to admin details
- Authorization: Only allow admins to view their own details, or restrict to super-admin roles
- Password Exposure: Consider removing the password field from the response, even if hashed
- Audit Logging: Log all attempts to access admin information for security monitoring
- Rate Limiting: Implement rate limiting to prevent enumeration attacks
Notes
- The ID must be a valid UUID format
- The password is returned as a hashed value, but ideally should be omitted from the response
- Use this endpoint to retrieve admin profile information or verify admin existence
- The response includes automatic timestamps for creation and last update