---
title: "LAST MODIFIED: Retrieves timestamp of the last modification of every collection"
method: GET
path: "/lastModified"
tags: ["other"]
---

# LAST MODIFIED: Retrieves timestamp of the last modification of every collection

`GET /lastModified`

LAST MODIFIED operation inspects collections separately (in parallel) and for each of them it finds the date of any last modification (insertion, update, deletion).
Not only `srvModified`, but also `date` and `created_at` fields are inspected (as a fallback to previous API).

This operation requires `read` permission for the API and the collections (e.g. `api:treatments:read`). For each collection the permission is checked separately, you will get timestamps only for those collections that you have access to.

## Response `200`

Successful operation returning the timestamps

- object
  - `status` integer
  - `result` LastModifiedResult — Result of LAST MODIFIED operation
    - `srvDate` integer — Actual storage server date (Unix epoch in ms).
    - `collections` object — Collections which the user have read access to.
      - `devicestatus` integer — Timestamp of the last modification (Unix epoch in ms), `null` when there is no timestamp found.
      - `treatments` integer — Timestamp of the last modification (Unix epoch in ms), `null` when there is no timestamp found.
      - `entries` integer — Timestamp of the last modification (Unix epoch in ms), `null` when there is no timestamp found.
      - `profile` integer — Timestamp of the last modification (Unix epoch in ms), `null` when there is no timestamp found.

## Other responses

- `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.

## Changes

- **2026-07-17** `5b0d424433e1` — 1 info
  - the endpoint scheme security `accessToken` was removed from the API
- **2021-01-07** `8252719e8e34` — 2 warning, 7 info
  - removed the optional property `collections` from the response with the `200` status
  - removed the optional property `srvDate` from the response with the `200` status
  - the endpoint scheme security `accessToken` was added to the API
  - the endpoint scheme security `jwtoken` was added to the API
  - …5 more
- **2019-10-09** `e3a793475629` — 2 breaking, 2 warning, 7 info
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `403`
  - removed the optional property `result` from the response with the `200` status
  - removed the optional property `status` from the response with the `200` status
  - …7 more

[Change history](https://skmtc.dev/nightscout/apis/nightscout-api/changes/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)
