Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/databases/add-columns.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Add columns"
openapi: "/databases-openapi.json POST /databases/{projectId}/{databaseId}/col"
keywords: ["databases", "columns", "schema"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/add-columns.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/add-columns.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

See [column types](/databases/columns) for how each type validates values.
9 changes: 9 additions & 0 deletions api/databases/create-database.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Create database"
openapi: "/databases-openapi.json POST /databases/{projectId}"
keywords: ["databases", "create"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/create-database.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/create-database.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
9 changes: 9 additions & 0 deletions api/databases/create-row.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Create row"
openapi: "/databases-openapi.json POST /databases/{projectId}/{databaseId}/row"
keywords: ["databases", "rows", "create"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/create-row.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/create-row.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
13 changes: 13 additions & 0 deletions api/databases/delete-column.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Delete column"
openapi: "/databases-openapi.json DELETE /databases/{projectId}/{databaseId}/col/{columnId}"
keywords: ["databases", "columns"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/delete-column.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/delete-column.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

<Warning>
Deleting a column removes its value from every row. There is no undo.
</Warning>
13 changes: 13 additions & 0 deletions api/databases/delete-database.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Delete database"
openapi: "/databases-openapi.json DELETE /databases/{projectId}/{databaseId}"
keywords: ["databases", "delete"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/delete-database.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/delete-database.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

<Warning>
This deletes every row in the database. There is no undo.
</Warning>
9 changes: 9 additions & 0 deletions api/databases/delete-row.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Delete row"
openapi: "/databases-openapi.json DELETE /databases/{projectId}/{databaseId}/row/{rowId}"
keywords: ["databases", "rows", "delete"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/delete-row.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/delete-row.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
11 changes: 11 additions & 0 deletions api/databases/get-changes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Get changes"
openapi: "/databases-openapi.json GET /databases/{projectId}/{databaseId}/changes"
keywords: ["databases", "changes", "change log"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/get-changes.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/get-changes.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

For a push-based stream of the same events, see [live updates](/databases/live-updates).
9 changes: 9 additions & 0 deletions api/databases/get-database.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Get database"
openapi: "/databases-openapi.json GET /databases/{projectId}/{databaseId}"
keywords: ["databases", "get"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/get-database.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/get-database.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
9 changes: 9 additions & 0 deletions api/databases/get-row.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Get row"
openapi: "/databases-openapi.json GET /databases/{projectId}/{databaseId}/row/{rowId}"
keywords: ["databases", "rows"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/get-row.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/get-row.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
9 changes: 9 additions & 0 deletions api/databases/get-schema.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Get schema"
openapi: "/databases-openapi.json GET /databases/{projectId}/{databaseId}/col"
keywords: ["databases", "schema", "columns"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/get-schema.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/get-schema.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
9 changes: 9 additions & 0 deletions api/databases/list-databases.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "List databases"
openapi: "/databases-openapi.json GET /databases/{projectId}"
keywords: ["databases", "list"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/list-databases.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/list-databases.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
22 changes: 22 additions & 0 deletions api/databases/list-rows.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "List rows"
openapi: "/databases-openapi.json GET /databases/{projectId}/{databaseId}/rows"
keywords: ["databases", "rows", "filter", "sort", "cursor"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/list-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/list-rows.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

## Filtering

Filter with one query parameter per column, `where[<columnId>]=<value>`. Values are coerced to the column type, so `where[col_x]=true` works on a boolean column and `where[col_x]=42` on a number column. For `multi_select` columns the filter matches rows whose array contains the value. `json` columns cannot be filtered.

Check warning on line 13 in api/databases/list-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/list-rows.mdx#L13

In general, use active voice instead of passive voice ('are coerced').

Check warning on line 13 in api/databases/list-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/list-rows.mdx#L13

In general, use active voice instead of passive voice ('be filtered').

```bash
curl "https://api.mintlify.com/v1/databases/$PROJECT_ID/$DATABASE_ID/rows?where\[col_qtxj9tuf\]=published&sort=col_8f2k1a0p:desc&limit=50" \
-H "Authorization: Bearer $MINT_API_KEY"
```

## Paging

Pass `nextCursor` from one page as `cursor` on the next. Cursors are keyset based, so a row inserted or deleted between two requests is never skipped or repeated.

Check warning on line 22 in api/databases/list-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/list-rows.mdx#L22

Did you really mean 'keyset'?
9 changes: 9 additions & 0 deletions api/databases/update-column.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Update column"
openapi: "/databases-openapi.json PATCH /databases/{projectId}/{databaseId}/col/{columnId}"
keywords: ["databases", "columns", "rename"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/update-column.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/update-column.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>
13 changes: 13 additions & 0 deletions api/databases/update-row.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Update row"
openapi: "/databases-openapi.json PATCH /databases/{projectId}/{databaseId}/row/{rowId}"
keywords: ["databases", "rows", "If-Match", "revision"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/update-row.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/update-row.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

## Conditional writes

Every row carries a `rev` that increments on each update. Send `If-Match: <rev>` with the value you last read. If someone else updated the row in between, the response is `409` with `code: "stale_revision"` and the current `rev`, and nothing is written.

Check warning on line 13 in api/databases/update-row.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/update-row.mdx#L13

In general, use active voice instead of passive voice ('is written').
13 changes: 13 additions & 0 deletions api/databases/upsert-rows.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "Bulk upsert rows"

Check warning on line 2 in api/databases/upsert-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/upsert-rows.mdx#L2

Did you really mean 'upsert'?
openapi: "/databases-openapi.json PUT /databases/{projectId}/{databaseId}/rows"
keywords: ["databases", "rows", "bulk", "upsert", "import"]
---

<Info>
Databases are in early access and must be enabled for your project. Contact your Mintlify account team to turn it on.

Check warning on line 8 in api/databases/upsert-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/upsert-rows.mdx#L8

In general, use active voice instead of passive voice ('be enabled').
</Info>

<Tip>
Choose your own row ids, for example a UUID derived from your product's primary key, so repeated pipeline runs update rows instead of duplicating them.

Check warning on line 12 in api/databases/upsert-rows.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api/databases/upsert-rows.mdx#L12

Use 'IDs?' instead of 'ids'.
</Tip>
Loading
Loading