Documentation · API reference
POST
/api/v1/sites/{site}/snapshotsStore a copy of one of the site's own pages
This page as Markdown, or in an AI chatMore ways to read this page
Store a copy of one of the site's own pages, as a desktop and as a phone are sent it, with everything that runs taken out.
# Store a copy of one of the site's own pages
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-snapshots
`POST /api/v1/sites/{site}/snapshots`
Store a copy of one of the site's own pages, as a desktop and as a phone are sent it, with everything that runs taken out.
## Parameters
- `site` (in path, needed): A site's id or name
## What to send
`SnapshotTake`: Store a copy of a page of the site.
- `path` (string): A path of the site: `/install`.
- `url` (string or null): Or the page's whole address, for a site that is not reached at `https://` and its first hostname. One of the site's own hostnames.
## The answer
201, `A list of SnapshotView`: One stored copy of a page: as a desktop was sent it, or a phone.
- `by` (string, needed)
- `bytes` (integer, needed): The page as it was fetched.
- `device` (string, needed): `desktop` or `phone`.
- `id` (string, needed)
- `path` (string, needed)
- `pickable` (integer, needed): How many things on it can be picked.
- `removed` (SnapshotRemoved, needed)
- `taken` (integer, needed)
- `url` (string, needed): Where it was fetched from in the end.
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/snapshots \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
Parameters
- sitein the address
- neededA site's id or name
What to send
SnapshotTake Store a copy of a page of the site.
- path
- stringA path of the site: `/install`.
- url
- string or nullOr the page's whole address, for a site that is not reached at `https://` and its first hostname. One of the site's own hostnames.
The answer
Status 201
A list of SnapshotView One stored copy of a page: as a desktop was sent it, or a phone.
- by
- stringneeded
- bytes
- integerneededThe page as it was fetched.
- device
- stringneeded`desktop` or `phone`.
- id
- stringneeded
- path
- stringneeded
- pickable
- integerneededHow many things on it can be picked.
- removed
- SnapshotRemovedneeded
- taken
- integerneeded
- url
- stringneededWhere it was fetched from in the end.
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/snapshots \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/snapshots", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());