Docs Open org

API reference

Databases API

Databases: schemas, views and rows

GET /orgs/{org}/databases/{ref}

A database's schema and views.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe 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

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe database page's short ID or UUID, or tasks.
viewquerystringA view by name.
qquerystringA 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

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe database page's short ID or UUID, or tasks.

Request body

application/json, RowInput.

FieldTypeDescription
base_revisioninteger (int64) | nullThe database page's revision the write is based on.
titlestring | nullThe row's title (create only; required there).
valuesmap of anyValues 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

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe database.
row requiredpathstringThe row's short ID.

Request body

application/json, RowInput.

FieldTypeDescription
base_revisioninteger (int64) | nullThe database page's revision the write is based on.
titlestring | nullThe row's title (create only; required there).
valuesmap of anyValues 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

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe database.
row requiredpathstringThe row's short ID.

Responses

200
OK. Deleted application/json