Skip to content

API: Publishing

Read a range of the calendar: its days with notes, themes and quiet marks, its slots and, when asked, its publications

GET /api/v1/calendar/plan: Read a range of the calendar: its days with notes, themes and quiet marks, its slots and, when asked, its publications

Last updated:

GET/api/v1/calendar/plan

Authentication#

Send the secret in the header Authorization: Bearer <secret>: the local token in local mode, an API key in network mode. An API key needs the read scope; the local token has every scope. See the API overview for both modes.

Query parameters#

NameTypeRequiredDescription
fromstringyesThe start of the range: a date such as 2026-12-01 (the start of that day in zone), a local time read in zone, or an instant.. min length 1
tostringyesThe end of the range, exclusive, in the same forms as from.. min length 1
zonestringnoThe IANA zone dates and local times are read in; empty is UTC.
project_idstringnoOnly the publications of one project.
publicationsbooleannoAlso return the publications of the range, paged by limit and offset.
limitintegernoThe page size of the publications, 1 to 500; the default is 100.
offsetintegernoHow many publications to skip.

Responses#

200 OK#

Content type application/json. Schema: Plan.

NameTypeRequiredDescription
daysarray of Dayno
fromstring (date-time)no
publicationsarray of Publicationno
rulesarray of Ruleno
slotsarray of SlotViewno
tostring (date-time)no
totalintegerno
zonestringno

400#

Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params

Content type application/problem+json. Schema: Problem.

401 Unauthorized#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

403#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

429#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

Any other status#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

curl -X GET "http://127.0.0.1:7878/api/v1/calendar/plan?from=string&to=string" \
  -H "Authorization: Bearer $STUARTY_KEY"

Response examples

{
  "days": [
    {
      "date": "string",
      "note": "string",
      "quiet": false,
      "theme": "string",
      "updated_at": "2006-01-02T15:04:05Z",
      "zone": "string"
    }
  ],
  "from": "2006-01-02T15:04:05Z",
  "publications": [
    {
      "created_at": "2006-01-02T15:04:05Z",
      "export": "string",
      "id": "string",
      "notes": [],
      "post": "string",
      "project_id": "string",
      "targets": [],
      "text": "string",
      "thumbnail": "string",
      "title": "string",
      "updated_at": "2006-01-02T15:04:05Z"
    }
  ],
  "rules": [
    {
      "connection_id": "string",
      "id": "string",
      "network": "string",
      "time": "string",
      "weekday": "string",
      "zone": "string"
    }
  ],
  "slots": [
    {
      "adjustment": "string",
      "at": "2006-01-02T15:04:05Z",
      "connection_id": "string",
      "date": "string",
      "filled": {},
      "network": "string",
      "slot_id": "string",
      "time": "string",
      "zone": "string"
    }
  ],
  "to": "2006-01-02T15:04:05Z",
  "total": 0,
  "zone": "string"
}

The examples are built from the schemas of the OpenAPI document, so a value is a placeholder of its type. The fields that carry the real values are in the tables.