Get Calendar items by date
const url = 'https://example.com/api/v1/calendar/range?from=example&to=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/calendar/range?from=example&to=example' \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns Calendar items grouped by local date. It includes Log entries, Events, Notes, Files and Photos. It uses the requested time zone or the User’s saved time zone. It returns 400 for an invalid date range or time zone. Route: /api/v1/calendar/range. Inputs: from, to, tz. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”First local date, inclusive.
Last local date, inclusive.
IANA time-zone name used to group file mtimes and Events. When omitted:
the X-Calternal-Timezone header, else the user’s timezone setting,
else UTC.
Responses
Section titled “Responses”Calendar items grouped by local day
object
object
object
Page description for a bookmark or clip.
Favicon address supplied at capture time.
Page host for a bookmark or clip.
Note modification time, or bookmark save time, in the requested zone.
Original page address for a bookmark or clip.
The most recently modified photo, chosen as a stable day cover.
object
Source BLAKE3 hash. The Files thumb route uses it to find the derived image.
CalDAV and URL subscriptions project typed Events into Calendar views.
date is already projected into the requested calendar time zone.
object
Whether this Event occupies the all-day lane.
User-selected layer colour for a URL subscription.
Local calendar day in the requested time zone.
RFC 3339 end time, or None for an all-day Event.
Provider-owned stable Event identity.
Full occurrence boundaries; all-day values use exclusive YYYY-MM-DD dates.
Place supplied by the Event provider.
Provider display name.
True when the source is an external URL and cannot be edited in place.
Whether this source Event has recurrence rules or date overrides (#536).
Stable source layer ID for a read-only URL subscription.
RFC 3339 start time, or None for an all-day Event.
Provider categories in their iCalendar order.
Time zone stored by the Event provider.
Event title.
object
object
Source hash for a supported Files thumbnail. Missing while a file type has no renderer or its Index entry has no content hash.
Non-media renderer family; None keeps the historical media URL.
object
object
User-facing attachment label, such as a photo’s place or capture time.
Full indexed file name shown by the shared tooltip.
Files item ID of the target, for /f/<item-id> links. None when the
target is not indexed or the viewer cannot see it.
Indexed media type of the target file.
True when the target is a local file with no live Files, Note or Task row.
The target Note’s calternal-id, for /n/<id> links.
Source hash for a supported Files thumbnail.
Non-media renderer family for the shared Files thumb route (#510/#547).
Missing only on legacy Log lines that predate capture-zone indexing.
object
Page description for a bookmark or clip.
Favicon address supplied at capture time.
Page host for a bookmark or clip.
Note modification time, or bookmark save time, in the requested zone.
Original page address for a bookmark or clip.
object
object
Source BLAKE3 hash. The Files thumb route uses it to find the derived image.
Examplegenerated
{ "days": [ { "activity_count": 1, "bookmark_count": 1, "bookmarks": [ { "description": "example", "favicon": "example", "id": "example", "path": "example", "site": "example", "time": "example", "title": "example", "url": "example" } ], "cover_photo": { "item_id": "example", "media_type": "example", "modified_at": "example", "name": "example", "owner_id": "example", "path": "example", "thumbnail_hash": "example" }, "date": "example", "event_count": 1, "events": [ { "all_day": true, "color": "example", "date": "example", "end": "example", "id": "example", "instance_end": "example", "instance_start": "example", "location": "example", "provider": "example", "read_only": true, "recurring": true, "source_id": "example", "start": "example", "tags": [ "example" ], "timezone": "example", "title": "example" } ], "file_count": 1, "files": [ { "count": 1, "hour": "example", "items": [ { "item_id": "example", "media_type": "example", "modified_at": "example", "name": "example", "owner_id": "example", "path": "example", "thumbnail_hash": "example", "thumbnail_kind": "example" } ], "utc_offset": "example" } ], "log_count": 1, "logs": [ { "attachments": [ { "display_name": "example", "embed": true, "full_name": "example", "item_id": "example", "kind": "example", "media_type": "example", "missing": true, "note_id": "example", "target": "example", "text": "example", "thumbnail_hash": "example", "thumbnail_kind": "example" } ], "end": "example", "id": "example", "place": { "id": "example", "name": "example" }, "start": "example", "tags": [ "example" ], "timezone": "example", "title": "example" } ], "note_count": 1, "notes": [ { "description": "example", "favicon": "example", "id": "example", "path": "example", "site": "example", "time": "example", "title": "example", "url": "example" } ], "photo_count": 1, "photos": [ { "count": 1, "hour": "example", "items": [ { "item_id": "example", "media_type": "example", "modified_at": "example", "name": "example", "owner_id": "example", "path": "example", "thumbnail_hash": "example" } ], "utc_offset": "example" } ] } ], "from": "example", "to": "example", "tz": "example"}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}