Databases API
Databases: schemas, views and rows
GET /orgs/{org}/databases/{ref}
A database's schema and views.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The database page's short ID or UUID, or tasks. |
Responses
200- OK. Database
application/json 422- not_a_database
GET /orgs/{org}/databases/{ref}/rows
Rows, typed, with formulas and rollups, through a view.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The database page's short ID or UUID, or tasks. |
view | query | string | A view by name. |
q | query | string | A filter (§9.1), on top of the view's. |
Responses
200- OK. Rows
application/json
POST /orgs/{org}/databases/{ref}/rows
Creates a row: a child page or a heading, with its values.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The database page's short ID or UUID, or tasks. |
Request body
application/json, RowInput.
| Field | Type | Description |
|---|---|---|
base_revision | integer (int64) | null | The database page's revision the write is based on. |
title | string | null | The row's title (create only; required there). |
values | map of any | Values by property display name (or key). null clears. |
Responses
201- Created. DbRow
application/json
PATCH /orgs/{org}/databases/{ref}/rows/{row}
Updates a row's values, patching only their lines.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The database. |
row required | path | string | The row's short ID. |
Request body
application/json, RowInput.
| Field | Type | Description |
|---|---|---|
base_revision | integer (int64) | null | The database page's revision the write is based on. |
title | string | null | The row's title (create only; required there). |
values | map of any | Values by property display name (or key). null clears. |
Responses
200- OK. DbRow
application/json
DELETE /orgs/{org}/databases/{ref}/rows/{row}
Deletes a row (a child page goes to the trash; a heading is removed), and removes it from the relations that point at it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The database. |
row required | path | string | The row's short ID. |
Responses
200- OK. Deleted
application/json