Docs Open org

API reference

Views API

The agenda, saved and built-in views

GET /agenda

The agenda across every hat visible now, each line tagged with its org.

Parameters

NameInTypeDescription
spanquerystringday (default), week, fortnight or month.
startquerystring (date)The first day (YYYY-MM-DD; default today, or the week or month containing it).
qquerystringOnly entries matching this query (§9.1).
tzquerystringThe viewer's IANA zone for floating times and relative dates (default: the account's).

Responses

200
OK. Agenda application/json

GET /orgs/{org}/agenda

The agenda (§8.5) for a span, in your zone.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
spanquerystringday (default), week, fortnight or month.
startquerystring (date)The first day (YYYY-MM-DD; default today, or the week or month containing it).
qquerystringOnly entries matching this query (§9.1).
tzquerystringThe viewer's IANA zone for floating times and relative dates (default: the account's).

Responses

200
OK. Agenda application/json

GET /orgs/{org}/agenda-commands

Agenda commands defined on pages you can read.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.

Responses

200
OK. Paged_AgendaCommand application/json

GET /orgs/{org}/agenda-commands/{key}/results

Runs a block agenda (§9.5).

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
key requiredpathstringThe command's key.
startquerystring (date)The first day for agenda blocks (default: today, or its week).
tzquerystringThe viewer's IANA zone for floating times and relative dates (default: the account's).

Responses

200
OK. CommandResults application/json

GET /orgs/{org}/views

Built-in views, then your views and your spaces' views.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.

Responses

200
OK. Paged_SavedView application/json

POST /orgs/{org}/views

Saves a view.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.

Request body

application/json, ViewBody.

FieldTypeDescription
configobject | nullLayout options.
layoutstring | nullLayout.
namestring | nullName.
positioninteger (int32) | nullOrder.
querystring | nullThe query.
spacestring | nullShare it in a space (slug); "" makes it personal again.

Responses

201
Created. SavedView application/json

PATCH /orgs/{org}/views/{ref}

Updates a view.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe view's short ID, or a built-in (agenda, tasks, inbox, mine, review, team:<handle>).

Request body

application/json, ViewBody.

FieldTypeDescription
configobject | nullLayout options.
layoutstring | nullLayout.
namestring | nullName.
positioninteger (int32) | nullOrder.
querystring | nullThe query.
spacestring | nullShare it in a space (slug); "" makes it personal again.

Responses

200
OK. SavedView application/json

DELETE /orgs/{org}/views/{ref}

Deletes a view.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe view's short ID, or a built-in (agenda, tasks, inbox, mine, review, team:<handle>).

Responses

204
No content

GET /orgs/{org}/views/{ref}/results

A view's results: tasks in rank (or the view's) order, with board columns or an agenda as the layout needs.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe view's short ID, or a built-in (agenda, tasks, inbox, mine, review, team:<handle>).
limitqueryinteger (int32)Page size.
cursorquerystringCursor.
spanquerystringFor agenda and calendar layouts: the span.
startquerystring (date)For agenda and calendar layouts: the first day.
tzquerystringThe viewer's IANA zone for floating times and relative dates (default: the account's).

Responses

200
OK. ViewResults application/json

GET /tasks

Tasks across every hat visible now.

Parameters

NameInTypeDescription
qquerystringA query (default: open tasks that are yours).
limitqueryinteger (int32)At most this many per hat (default 50).
tzquerystringThe viewer's IANA zone for floating times and relative dates (default: the account's).

Responses

200
OK. Paged_HatTask application/json