Documentation · API reference
GET
/api/v1/sites/{site}One site
This page as Markdown, or in an AI chatMore ways to read this page
One site, with its settings.
# One site
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/get-sites-site
`GET /api/v1/sites/{site}`
One site, with its settings.
## Parameters
- `site` (in path, needed): A site's id or name
## The answer
200, `SiteView`
- `created_at` (string, needed)
- `declared` (boolean, needed): Declared in the instance's configuration: read-only here, pausable.
- `hostnames` (list of string, needed): Hostnames allowed to send hits for this site.
- `id` (string, needed)
- `mode` (string, needed): `easy` or `hard`.
- `name` (string, needed): The name the tag carries (`data-site`).
- `paused` (boolean, needed)
- `reading` (string, needed): `strict` or `cnil`.
- `settings` (object, needed)
- `time_zone` (string, needed)
## Asking
```sh
curl https://tidekeeper.eu/api/v1/sites/example.org \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN"
```
Parameters
- sitein the address
- neededA site's id or name
The answer
Status 200
SiteView
- created_at
- stringneeded
- declared
- booleanneededDeclared in the instance's configuration: read-only here, pausable.
- hostnames
- list of stringneededHostnames allowed to send hits for this site.
- id
- stringneeded
- mode
- stringneeded`easy` or `hard`.
- name
- stringneededThe name the tag carries (`data-site`).
- paused
- booleanneeded
- reading
- stringneeded`strict` or `cnil`.
- settings
- objectneeded
- time_zone
- stringneeded
Asking
curl https://tidekeeper.eu/api/v1/sites/example.org \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org", { headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, }, }).then((r) => r.json());