Documentation · API reference
POST
/api/v1/sites/{site}/hard/onTurn hard mode on
This page as Markdown, or in an AI chatMore ways to read this page
Turn hard mode on. Every step before it has to be done.
# Turn hard mode on
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-sites-site-hard-on
`POST /api/v1/sites/{site}/hard/on`
Turn hard mode on. Every step before it has to be done.
## Parameters
- `site` (in path, needed): A site's id or name
## What to send
`HardOn`
- `responsible` (boolean, needed): "I am responsible for this data": must be true.
## The answer
200, `HardView`: A site's mode and what turning hard mode on still needs (MO-02).
- `banner` (integer or null): The banner version being shown, if one is.
- `checklist` (list of object, needed)
- `compare` (list of ModeLine, needed): What each mode does, line by line (MO-07).
- `holds` (list of Held, needed): Rows hard mode holds for the site, table by table.
- `mode` (string, needed): `easy` or `hard`.
- `policy_text` (string, needed): The paragraph for the site's privacy policy.
- `reading` (string, needed): The reading of the law the site is set up for: `strict` or `cnil`.
- `ready` (boolean, needed): Every step but the last is done: it can be turned on.
- `settings` (object, needed)
- `site` (string, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/hard/on \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"responsible": false}'
```
Parameters
- sitein the address
- neededA site's id or name
What to send
HardOn
- responsible
- booleanneeded"I am responsible for this data": must be true.
The answer
Status 200
HardView A site's mode and what turning hard mode on still needs (MO-02).
- banner
- integer or nullThe banner version being shown, if one is.
- checklist
- list of objectneeded
- compare
- list of ModeLineneededWhat each mode does, line by line (MO-07).
- holds
- list of HeldneededRows hard mode holds for the site, table by table.
- mode
- stringneeded`easy` or `hard`.
- policy_text
- stringneededThe paragraph for the site's privacy policy.
- reading
- stringneededThe reading of the law the site is set up for: `strict` or `cnil`.
- ready
- booleanneededEvery step but the last is done: it can be turned on.
- settings
- objectneeded
- site
- stringneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/sites/example.org/hard/on \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"responsible": false}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/hard/on", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"responsible": false}), }).then((r) => r.json());