Get user by ID
This operation retrieves a specific user profile by its ID.
Endpoint structure
GET /users/{id}
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The unique identifier of the user to retrieve |
Request headers
| Header | Value | Required |
|---|---|---|
Content-Type |
application/json |
No |
Request body
This operation doesn’t require a request body.
Example request
Request:
curl -X GET {base_url}/users/1
Response - Success:
Returns the user object with the specified ID.
{
"id": 1,
"firstName": "Sarah",
"lastName": "Johnson",
"email": "s.johnson@example.com",
"age": 42,
"painLocation": "lower-back-left",
"painLevel": 7,
"diagnosisDate": "2024-03-15"
}
Successful response includes:
id- Unique user identifierfirstName- User’s first namelastName- User’s last nameemail- User’s email addressage- User’s agepainLocation- Location of sciatica painpainLevel- Current pain level on a 1-10 scalediagnosisDate- Date of sciatica diagnosis - Year-Month-Day format