Skip to content
Rigel docs
Open Rigel

The household's calendars

calendar.calendar.list

GET/api/v1/households/{household_id}/queries/calendar.calendar.list

  • Query
  • Rigel runs it

Every calendar in the order shown, with its color, owner, whether it's the default, visible or busy-only, how many events it has (a repeating event counts once), and, if it's linked to a Google calendar, the link in words.

Parameters#

The household's calendars: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

Response#

200 The answer.

The household's calendars: response fields
FieldDescription
itemsarray of objectsrequired
items[].idstringrequired

A calendar ID, such as cal_01JC0000000000000000000000.

items[].namestringrequiredNo description.
items[].colorone of: calendar-1, calendar-2, calendar-3, calendar-4, calendar-5, calendar-6, calendar-7, calendar-8requiredNo description.
items[].ownerobject or nullrequired

Whose calendar it is, or null for a shared one.

items[].owner.idstringrequired

A person ID, such as per_01JC0000000000000000000000.

items[].owner.namestringrequiredNo description.
items[].is_defaultbooleanrequiredNo description.
items[].is_visiblebooleanrequiredNo description.
items[].is_busy_onlybooleanrequiredNo description.
items[].event_countintegerrequired

Events on it, counting a repeating event once.

items[].googleobject or nullrequired

The Google calendar it's linked to, or null.

items[].google.directionone of: both, import, exportrequiredNo description.
items[].google.summarystringrequired

In words, such as "Synced both ways with Work on ben@example.com".

items[].google.google_calendarstring or nullrequired

Google's name for the calendar.

items[].google.accountstring or nullrequired

The Google account's address.

items[].google.problemstring or nullrequired

What's wrong with syncing it, in words, or null.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

The household's calendars: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404not_foundThe household doesn't exist, or you aren't a member of it.

Examples#

These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.

List the calendars

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/calendar.calendar.list' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/calendar.calendar.list", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/calendar.calendar.list HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSHGZWN1RRZ16W5ZWYMF

{
  "items": [
    {
      "id": "cal_01M6V9CS6RESEHY2KVBGF3JX5Q",
      "name": "Family",
      "color": "calendar-1",
      "owner": null,
      "is_default": true,
      "is_visible": true,
      "is_busy_only": false,
      "event_count": 0,
      "google": null
    },
    {
      "id": "cal_01M6V9CS6R7BJ7D0KVCQQH1DCS",
      "name": "Ada Okafor",
      "color": "calendar-2",
      "owner": {
        "id": "per_01M6V9CS6RX26JK5KVYGRN22D2",
        "name": "Ada Okafor"
      },
      "is_default": false,
      "is_visible": true,
      "is_busy_only": false,
      "event_count": 0,
      "google": null
    }
  ]
}

For Rigel#

Rigel's tool for this query is calendar_calendar_list. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel