Skip to main content
GET
/
admin
/
{id}
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"
}
Retrieves an administrator’s details by their unique user ID.

Path Parameters

id
string
required
The UUID of the administrator to retrieveExample: "123e4567-e89b-12d3-a456-426614174000"

Response

userId
string
The unique identifier for the admin user
name
string
Full name of the administrator
email
string
Email address of the administrator
password
string
Encrypted password hash
creationTimestamp
string
ISO timestamp when the admin account was created
updatedTimestamp
string
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

404 Not Found
empty
Returned when no admin exists with the specified IDResponse: Empty response body with 404 status code
400 Bad Request
error
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

Build docs developers (and LLMs) love