Skip to main content
GET
/
patients
/
list
List Patients
curl --request GET \
  --url https://api.example.com/patients/list
{
  "error": "Internal server error",
  "message": "An unexpected error occurred"
}
Retrieves a list of all registered patients in the system.

Response

Returns an array of patient objects.
patients
array
Array of patient objects.

Example Request

cURL
curl -X GET http://localhost:8080/patients/list

Example Response

200 OK
[
  {
    "cpf": "12345678901",
    "name": "Maria Silva",
    "email": "maria.silva@example.com",
    "dateOfBirth": "1990-05-15",
    "address": "Rua das Flores, 123, São Paulo, SP",
    "medicalHistory": "No known allergies. Previous surgery in 2015."
  },
  {
    "cpf": "98765432109",
    "name": "João Santos",
    "email": "joao.santos@example.com",
    "dateOfBirth": "1985-11-20",
    "address": "Av. Paulista, 1000, São Paulo, SP",
    "medicalHistory": "Diabetic. Regular checkups required."
  }
]

Error Responses

{
  "error": "Internal server error",
  "message": "An unexpected error occurred"
}

Notes

  • Returns an empty array [] if no patients are registered in the system
  • Password fields are never included in the response for security reasons
  • This endpoint does not support pagination in the current implementation
  • Consider implementing pagination for production use with large datasets

Build docs developers (and LLMs) love