Get All Users Info
curl --request GET \
--url https://api.example.com/api/v1/patients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/patients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/patients"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/patients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Get All Patients
Get basic information and medical history for all users including personal details, chronic conditions, and family history.
GET
/
api
/
v1
/
patients
Get All Users Info
curl --request GET \
--url https://api.example.com/api/v1/patients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/patients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/patients"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/patients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get All Patients
Get basic information and medical history for all users including personal details, chronic conditions, and family history.Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| authorization | string | Yes | API authorization token (Bearer token) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Maximum number of users to return (default: 50, max: 100) |
| offset | integer | No | Number of users to skip for pagination (default: 0) |
Responses
| Status | Description | Content Type |
|---|---|---|
| 200 | Successful Response | application/json |
| 422 | Validation Error | application/json |
Sample Request
curl -X GET "https://api.covita.com/api/v1/patients?limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Sample Response
{
"patients": [
{
"user_id": "User1",
"personal_details": {
"name": "John Doe",
"age": 35,
"gender": "Male",
"height": 175,
"weight": 75,
"bmi": 24.5
},
"medical_history": {
"chronic_conditions": ["Hypertension"],
"family_history": ["Diabetes", "Heart Disease"],
"allergies": []
}
},
{
"user_id": "User2",
"personal_details": {
"name": "Jane Smith",
"age": 28,
"gender": "Female",
"height": 165,
"weight": 60,
"bmi": 22.0
},
"medical_history": {
"chronic_conditions": [],
"family_history": ["Asthma"],
"allergies": ["Peanuts"]
}
}
],
"total_count": 100,
"limit": 10,
"offset": 0
}
⌘I