SDK reference

Phone widgets

Each route's function in the SDK, its call beside the same request in cURL.
postMeWidgetsEndpoint

POST/v1/me/widgets/endpoint

A custom endpoint widget's value: reads the address saved in that widget (itemId, one of the person's own endpoint widgets; https only, public addresses, at most 64 KB in 4 seconds) and returns what's at its path in the JSON answer (or the plain-text answer), at most 64 characters with its decimal places applied. A widget's value is kept for a minute. 422: the widget has no address, or nothing usable at its path; 502: the address couldn't be read.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/widgets/endpoint' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemId": "<itemId>"
  }'
meWidgetsQuotes

GET/v1/me/widgets/quotes

Stock prices for up to 10 comma-separated symbols, in the order asked (missing: ones the provider doesn't know or couldn't price just now; stale: the provider is down and this is its last price, up to an hour old). Indices are priced through a fund that tracks them (index names it: SPY for the S&P 500). Each symbol is fetched at most once a minute for everyone. 503 until the platform has a stock price provider.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/widgets/quotes?symbols=example' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meWidgetsSpeedtest

GET/v1/me/widgets/speedtest

bytes random bytes (up to 1,000,000; 250,000 by default) for the network widget to time the download. Never cached or compressed on the way.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/widgets/speedtest' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meWidgetsInbox

GET/v1/me/widgets/inbox

The Mail and Messages widgets' counts in one answer: mail (unread conversations in the inboxes of the mailboxes the person reads, in every org: Primary and every category; at most 10 mailboxes) and mirage (their DMs with messages they haven't read; names=1 names the newest three). Counts only. A part that couldn't be read is null and named in failed. Kept a minute per person; reads count against widgets.inboxPerHour.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/widgets/inbox' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meAgendaNext

GET/v1/me/agenda/next

The person's next events and tasks due, across every org (the Up next widget), each list nearest first and at most limit (1–10, default 3). events: from the calendars of the mailboxes they're a member of (under way now or starting within days, 1–14, default 7; cancelled, free and declined ones left out). tasks: open tasks assigned to them due within days, with overdue ones first unless overdue=0. tzOffset (minutes east of UTC) says which day is today for all-day events and due dates.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/agenda/next' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"