Documentation · API reference
POST
/api/v1/sites/{site}/checkLook at a page of the site: does it load, and is the tag in it?
This page as Markdown, or in an AI chatMore ways to read this page
Look at a page of the site: does it load, and is the tag in it?
# Look at a page of the site: does it load, and is the tag in it?
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-check
`POST /api/v1/sites/{site}/check`
Look at a page of the site: does it load, and is the tag in it?
## Parameters
- `site` (in path, needed): A site's id or name
## What to send
`CheckRequest`
- `url` (string or null): The page to look at. Left out, the site's front page.
## The answer
200, `CheckView`: What tidekeeper found when it looked at a page (the CLI's `check`).
- `advice` (string, needed): What to do, in a line.
- `bytes` (integer, needed)
- `error` (string or null): Why the page could not be fetched, in words.
- `install` (string, needed): The tag for this site, to paste.
- `last_hit` (string or null): When the site last had a counted view.
- `millis` (integer, needed)
- `script_answers` (boolean, needed): Whether `/t.js` answers on the page's host.
- `site` (string, needed)
- `status` (integer or null): The page's status, when it answered.
- `tag` (string, needed): `found`, `not_found`, `other_site` or `unreachable`.
- `tag_site` (string or null): The site the tag names, when it is another one.
- `url` (string, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/check \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
Parameters
- sitein the address
- neededA site's id or name
What to send
CheckRequest
- url
- string or nullThe page to look at. Left out, the site's front page.
The answer
Status 200
CheckView What tidekeeper found when it looked at a page (the CLI's `check`).
- advice
- stringneededWhat to do, in a line.
- bytes
- integerneeded
- error
- string or nullWhy the page could not be fetched, in words.
- install
- stringneededThe tag for this site, to paste.
- last_hit
- string or nullWhen the site last had a counted view.
- millis
- integerneeded
- script_answers
- booleanneededWhether `/t.js` answers on the page's host.
- site
- stringneeded
- status
- integer or nullThe page's status, when it answered.
- tag
- stringneeded`found`, `not_found`, `other_site` or `unreachable`.
- tag_site
- string or nullThe site the tag names, when it is another one.
- url
- stringneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/check \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/check", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());