---
title: "Get a patient's raw CGM-related data (note: a maximum of 5,000 datapoints will be returned; limit queries to 24h)"
method: GET
path: "/cgm/patients/{patient_id}/cgm_data"
tags: ["cgm"]
---

# Get a patient's raw CGM-related data (note: a maximum of 5,000 datapoints will be returned; limit queries to 24h)

`GET /cgm/patients/{patient_id}/cgm_data`

## Path parameters

- `patient_id` integer, required

## Query parameters

- `time_since_local` string, required
- `time_until_local` string, required

## Response `200`

successful operation

- PatientCgmDataResponse
  - `exercise` PatientExerciseResponse[]
    - `duration_min` integer — time in minutes
    - `exercise_date` string — calendar date in format YYYY-MM-DD
    - `exercise_time` string — time in HH:MM:SS
    - `exercise_type` 'logged by cgm' | 'strength-resistance' | 'aerobic training' | 'balance and stability' | 'flexibility-stretching' | 'mixed cardio/strength' | 'other'
    - `id` integer, required
    - `intensity` string, nullable
    - `note` string, nullable — note that can be added to provide additional description Max 1024 char
    - `source` string, nullable — source of exercise data
    - `source_id` string, nullable — id of exercise from source
  - `glucose` PatientGlucoseDataResponse[]
    - `timestamp` string, date-time, required — timestamp without timezone
    - `unit` string — unit coinciding with the value
    - `value` number — glucose value
  - `insulin` PatientMedicationResponse[]
    - `id` integer, required
    - `medication_date` string — calendar date in format YYYY-MM-DD
    - `medication_time` string — time in HH:MM:SS
    - `name` string, required — indicate the name of the medication
    - `note` string, nullable — note that can be added to provide additional description Max 1024 char
    - `quantity` number — typical qty of medication taken
    - `side_effects` string, nullable — side effects of the medication Max 1024 char
    - `unit` string
  - `time_since_local` string, required — date+time in ISO format
  - `time_until_local` string, required — date+time in ISO format

---

[API](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server.md) · [All operations](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/llms.txt) · [OpenAPI document](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/revisions/081a2697c0f1?raw)
