---
title: "HISTORY: Retrieves incremental changes since timestamp"
method: GET
path: "/{collection}/history/{lastModified}"
tags: ["generic"]
---

# HISTORY: Retrieves incremental changes since timestamp

`GET /{collection}/history/{lastModified}`

This HISTORY operation variant is more precise than the previous one with `Last-Modified` request HTTP header), because it does not loose milliseconds precision.

Since this variant queries for changed documents by timestamp precisely and exclusively, the last modified document does not repeat itself in following calls. That is the reason why is this variant more suitable for continuous synchronization with other systems.

This variant behaves quite the same as the previous one in all other aspects.

## Query parameters

- `limit` integer
- `fields` string

## Response `200`

Changed documents since specified timestamp

- object
  - `status` integer
  - `result` DocumentArray — unresolved $ref

## Other responses

- `400` — The request is malformed. There may be some required parameters missing or there are unrecognized parameters present.
- `401` — The request was not successfully authenticated using JWT, so that the request cannot continue due to the security policy.
- `403` — Insecure HTTP scheme used or the request has been successfully authenticated, but the security subject is not authorized for the operation.
- `404` — The collection or document specified was not found.
- `406` — The requested content type (in `Accept` header) is not supported.

## Changes

- **2026-07-17** `5b0d424433e1` — 1 info
  - the endpoint scheme security `accessToken` was removed from the API
- **2021-01-07** `8252719e8e34` — 2 breaking, 11 info
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the success response with the status `204`
  - the endpoint scheme security `accessToken` was added to the API
  - the endpoint scheme security `jwtoken` was added to the API
  - …9 more
- **2020-01-12** `4f4eedb269d0` — 3 info
  - added the media type `application/xml` for the response with the status `200`
  - added the media type `text/csv` for the response with the status `200`
  - added the non-success response with the status `406`
- **2019-11-02** `6b2eb690f4ab` — 6 info
  - added the optional property `oneOf[#/components/schemas/DeviceStatusArray]/items/allOf[#/components/schemas/DocumentBase]/isReadOnly` to the response with the `200` status
  - added the optional property `oneOf[#/components/schemas/EntryArray]/items/allOf[#/components/schemas/DocumentBase]/isReadOnly` to the response with the `200` status
  - added the optional property `oneOf[#/components/schemas/FoodArray]/items/allOf[#/components/schemas/DocumentBase]/isReadOnly` to the response with the `200` status
  - added the optional property `oneOf[#/components/schemas/ProfileArray]/items/allOf[#/components/schemas/DocumentBase]/isReadOnly` to the response with the `200` status
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/nightscout/apis/nightscout-api/changes/:collection/history/:lastModified/get.md)

---

[API](https://skmtc.dev/nightscout/apis/nightscout-api.md) · [All operations](https://skmtc.dev/nightscout/apis/nightscout-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nightscout/nightscout-api/revisions/5b0d424433e1/schema)
