---
title: "Everything a home-automation client renders, in one response."
method: GET
path: "/api/Sync/snapshot"
tags: ["Sync"]
---

# Everything a home-automation client renders, in one response.

`GET /api/Sync/snapshot`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Sync/snapshot`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)
  - API key in header `X-Api-Key`
  - API key in query parameter `api_key`

Printers (with connection health, the current print and the last finished print), what is
loaded in each slot, every spool with its remaining and used grams, and this month's
totals. `schemaVersion` versions the shape: new fields can appear without a bump, so
ignore fields you do not know. `remainingGrams` is null for a spool with no initial
weight. Send the response's `ETag` back in `If-None-Match` to get a `304 Not Modified`.
Fetch this when `GET /api/sync/version` changes, and conditionally every few minutes so
connection health (stale after 15 minutes without a heartbeat) stays current.

## Query parameters

- `timeZone` string

## Response `200`

Returned with the snapshot.

- PrintLogApiModelsDTOsSyncSyncSnapshot: Everything a home-automation client renders, in one response (#234). Built server-side only, so the positional parameters are the contract, and the parameter docs below are the field rules. AGENTS.md ("Integration polling") has the caching reasoning. Assembled per request from cached parts; the printers and spools lists may be shared with the cache, so treat them as read-only.
  - `schemaVersion` integer: The shape's version. Additive fields do not change it.
  - `version` string, nullable: The same opaque value `GET /api/sync/version` returns.
  - `printers` PrintLogApiModelsDTOsSyncSyncPrinter[], nullable: Every printer the user owns, active and inactive, by name then id.
    - `id` integer
    - `name` string, nullable
    - `make` string, nullable
    - `model` string, nullable
    - `active` boolean
    - `slotCount` integer
    - `connection` PrintLogApiModelsDTOsSyncSyncConnection: Connector health, computed per request against the clock.
      - `kind` string, nullable: The connector type, such as `moonraker`.
      - `status` string, nullable: `online`, or `stale` after 15 minutes without a heartbeat.
    - `currentPrint` PrintLogApiModelsDTOsSyncSyncCurrentPrint
      - `id` integer
      - `title` string, nullable
      - `startedAt` string, date-time, nullable
      - `estimatedSeconds` integer, nullable
      - `estimatedEndAt` string, date-time, nullable: PrintLogApi.Models.DTOs.Sync.SyncCurrentPrint.StartedAt plus PrintLogApi.Models.DTOs.Sync.SyncCurrentPrint.EstimatedSeconds, when both exist.
      - `source` string, nullable
      - `url` string, nullable
      - `filament` PrintLogApiModelsDTOsSyncSyncPrintFilament[], nullable
        - `slot` integer, nullable: The printer slot (tool) the material feeds from, or null when not recorded.
        - `spoolId` string, uuid, nullable: The linked spool, or null when none is.
        - `estimatedGrams` number, double, nullable: The slicer's estimate to 0.1 g, or null when there is none.
    - `lastFinishedPrint` PrintLogApiModelsDTOsSyncSyncFinishedPrint
      - `id` integer
      - `title` string, nullable
      - `status` string, nullable: `success`, `failed`, `canceled` or `partial_success`.
      - `startedAt` string, date-time, nullable
      - `finishedAt` string, date-time, nullable: Start plus print time, when both exist; the print stores no finish time of its own.
      - `source` string, nullable
      - `url` string, nullable
    - `loaded` PrintLogApiModelsDTOsSyncSyncLoadedSpool[], nullable: What is in each slot now, in slot order; unslotted spools last.
      - `slot` integer, nullable
      - `slotLabel` string, nullable
      - `spoolId` string, uuid
      - `spoolNumber` integer, nullable
      - `name` string, nullable
      - `material` string, nullable
      - `colorHex` string, nullable
      - `colors` string[], nullable
      - `remainingGrams` number, double, nullable: Null for a spool with no initial weight (pending #230).
    - `printTimeSeconds` integer: All-time print time on this printer, the figure `GET /api/analytics/printers` reports as `printTimeSeconds` with no date filter: each print's recorded time, else its estimate, else 0.
    - `lastMaintenance` PrintLogApiModelsDTOsSyncSyncMaintenance: A completed maintenance entry.
      - `id` string, uuid
      - `date` string, date-time: The entry's date.
      - `category` string, nullable
      - `description` string, nullable
    - `openMaintenance` PrintLogApiModelsDTOsSyncSyncOpenMaintenance: The maintenance entries not yet marked done.
      - `count` integer: How many entries are not done; 0 when none.
      - `nextDate` string, date-time, nullable: The earliest date among them, or null when PrintLogApi.Models.DTOs.Sync.SyncOpenMaintenance.Count is 0.
  - `spools` PrintLogApiModelsDTOsSyncSyncSpool[], nullable: Every material the user owns, all categories, active and archived, by spool number then id.
    - `id` string, uuid
    - `spoolNumber` integer, nullable
    - `name` string, nullable
    - `brand` string, nullable
    - `material` string, nullable
    - `category` string, nullable: The material category: `filament`, `resin` or `powder`.
    - `colorName` string, nullable
    - `colorHex` string, nullable: The first of PrintLogApi.Models.DTOs.Sync.SyncSpool.Colors, or null.
    - `colors` string[], nullable: Normalized `#RRGGBB` (or `#RRGGBBAA`) values, upper case.
    - `remainingGrams` number, double, nullable: The shared remaining figure clamped at 0, or null for a spool with no initial weight (pending #230).
    - `usedGrams` number, double: Taken off the spool by prints and adjustments, clamped at 0.
    - `initialGrams` number, double, nullable: The nominal net weight, or null when not tracked.
    - `storageLocation` string, nullable
    - `active` boolean
  - `account` PrintLogApiModelsDTOsSyncSyncAccountTotals
    - `month` string, nullable: The calendar month counted, `yyyy-MM`, in PrintLogApi.Models.DTOs.Sync.SyncAccountTotals.TimeZone.
    - `timeZone` string, nullable: The zone the month was taken in, as requested.
    - `printCount` integer: Prints started this month.
    - `grams` number, double: What those prints' usage rows took, in grams.
    - `successCount` integer
    - `failedCount` integer

## Other responses

- `304`: Returned when `If-None-Match` matches the current snapshot.
- `400`: Returned if `timeZone` is not a recognized time zone.
- `401`: Returned if the caller is not authenticated.
- `403`: Forbidden

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
