Get Calendar activity for a year
GET
/api/v1/calendar/year
const url = 'https://example.com/api/v1/calendar/year?year=1';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/year?year=1' \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns daily activity counts for the requested year and time zone. It returns 400 when the year or time zone is invalid. Route: /api/v1/calendar/year. Inputs: year, tz. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”year
required
integer format: int32
tz
string
IANA time-zone name. When omitted: the X-Calternal-Timezone
header, else the user’s timezone setting, else UTC.
Responses
Section titled “Responses”Daily activity counts for a heat map
Media typeapplication/json
object
days
required
Array<object>
object
activity_count
required
integer format: int64
bookmark_count
required
integer format: int64
cover_photo
date
required
string
event_color
First URL subscription’s chosen colour for its compact Event marker.
string | null
event_count
required
integer format: int64
event_tag
First Event’s first category, for the compact Year and mini-month dot.
string | null
file_count
required
integer format: int64
log_count
required
integer format: int64
note_count
required
integer format: int64
photo_count
required
integer format: int64
photo_day
required
boolean
tz
required
string
year
required
integer format: int32
Examplegenerated
{ "days": [ { "activity_count": 1, "bookmark_count": 1, "cover_photo": { "item_id": "example", "media_type": "example", "modified_at": "example", "name": "example", "owner_id": "example", "path": "example", "thumbnail_hash": "example" }, "date": "example", "event_color": "example", "event_count": 1, "event_tag": "example", "file_count": 1, "log_count": 1, "note_count": 1, "photo_count": 1, "photo_day": true } ], "tz": "example", "year": 1}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}