Documentation · API reference
GET
/api/v1/share/{site}A site's shared figures
This page as Markdown, or in an AI chatMore ways to read this page
A site's shared figures. Nobody signs in: the site's public dashboard is on, or the request carries a private link's key.
# A site's shared figures
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/get-share-site
`GET /api/v1/share/{site}`
A site's shared figures. Nobody signs in: the site's public dashboard is on, or the request carries a private link's key.
## Parameters
- `site` (in path, needed): The site's name
- `period` (in path, needed): `today`, `7d`, `30d` or `12mo`.
- `key` (in path, needed): A private link's key.
- `pass` (in path, needed): What unlocking a link with a password gave.
- `filter` (in path, needed): One row to look at alone: `page:/install`, `source:github.com`, `country:DK`, `device:phone`.
## The answer
200, `ShareView`: Everything a shared view shows, and nothing it does not: the parts its owner ticked, from the figures every visitor is in, with small rows folded. No figure here is about a recognised visitor.
- `browsers` (list of ShareShare, needed)
- `caveats` (list of CaveatView, needed): How the visitors were counted, in words.
- `compare` (PeriodView or null)
- `countries` (SharePanel or null)
- `credit` (boolean, needed)
- `devices` (SharePanel or null)
- `figures` (list of ShareFigure, needed)
- `filter` (string or null): The row looked at alone, as words.
- `floor` (integer, needed): Rows with fewer visitors than this were folded. 0 when its owner turned that off.
- `follow_theme` (boolean, needed)
- `goals` (list of ShareGoal or null)
- `grain` (string, needed)
- `notes` (list of AnnotationView, needed)
- `now` (integer or null): People on the site now. `null` when not shared, or too few to say.
- `pages` (SharePanel or null)
- `panels` (list of string, needed): The parts shown.
- `period` (PeriodView, needed)
- `points` (list of Point, needed)
- `previous` (list of Point or null)
- `site` (string, needed)
- `sources` (SharePanel or null)
- `systems` (list of ShareShare, needed)
- `too_few` (boolean, needed): The filter would show fewer visitors than the floor: nothing is shown.
## Asking
```sh
curl https://tidekeeper.eu/api/v1/share/example.org \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN"
```
Parameters
- sitein the address
- neededThe site's name
- periodin the address
- needed`today`, `7d`, `30d` or `12mo`.
- keyin the address
- neededA private link's key.
- passin the address
- neededWhat unlocking a link with a password gave.
- filterin the address
- neededOne row to look at alone: `page:/install`, `source:github.com`, `country:DK`, `device:phone`.
The answer
Status 200
ShareView Everything a shared view shows, and nothing it does not: the parts its owner ticked, from the figures every visitor is in, with small rows folded. No figure here is about a recognised visitor.
- browsers
- list of ShareShareneeded
- caveats
- list of CaveatViewneededHow the visitors were counted, in words.
- compare
- PeriodView or null
- countries
- SharePanel or null
- credit
- booleanneeded
- devices
- SharePanel or null
- figures
- list of ShareFigureneeded
- filter
- string or nullThe row looked at alone, as words.
- floor
- integerneededRows with fewer visitors than this were folded. 0 when its owner turned that off.
- follow_theme
- booleanneeded
- goals
- list of ShareGoal or null
- grain
- stringneeded
- notes
- list of AnnotationViewneeded
- now
- integer or nullPeople on the site now. `null` when not shared, or too few to say.
- pages
- SharePanel or null
- panels
- list of stringneededThe parts shown.
- period
- PeriodViewneeded
- points
- list of Pointneeded
- previous
- list of Point or null
- site
- stringneeded
- sources
- SharePanel or null
- systems
- list of ShareShareneeded
- too_few
- booleanneededThe filter would show fewer visitors than the floor: nothing is shown.
Asking
curl https://tidekeeper.eu/api/v1/share/example.org \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
const answer = await fetch("https://tidekeeper.eu/api/v1/share/example.org", { headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, }, }).then((r) => r.json());