Grist
@mgreten/gristv2026.06.27.2
01README
Generic Grist REST API model — list tables, manage columns, read and write records. Use as a foundation for Grist-backed Swamp extensions.
02Models
@mgreten/gristv2026.06.27.2grist.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| gristDocId | string | Grist document ID |
fn checkApi()
Verify Grist base URL, API token, and document accessibility. Does not mutate.
fn listTables()
List all table IDs in the Grist document.
fn getColumns(tableId: string)
List all columns (id, label, type) for a Grist table.
| Argument | Type | Description |
|---|---|---|
| tableId | string | Table ID to inspect |
fn getRecords(tableId: string, limit?: number)
Fetch records from a Grist table. Filter keys are column IDs; values are arrays of allowed values.
| Argument | Type | Description |
|---|---|---|
| tableId | string | |
| limit? | number | Maximum records to return |
fn addRecords(tableId: string, dryRun: boolean)
Insert records into a Grist table. Use dryRun=true to preview without writing.
| Argument | Type | Description |
|---|---|---|
| tableId | string | |
| dryRun | boolean |
fn updateRecords(tableId: string, records: array, dryRun: boolean)
Update records in a Grist table by row id. Use dryRun=true to preview.
| Argument | Type | Description |
|---|---|---|
| tableId | string | |
| records | array | |
| dryRun | boolean |
fn createTable(tableId: string, columns: array, dryRun: boolean)
Create a new Grist table with specified columns. Use dryRun=true to preview.
| Argument | Type | Description |
|---|---|---|
| tableId | string | |
| columns | array | |
| dryRun | boolean |
fn addColumns(tableId: string, columns: array, dryRun: boolean)
Add columns to an existing Grist table. Use dryRun=true to preview.
| Argument | Type | Description |
|---|---|---|
| tableId | string | |
| columns | array | |
| dryRun | boolean |
fn deleteRecords(tableId: string, dryRun: boolean)
Permanently delete records from a Grist table by row ID. Use dryRun=true to preview without deleting.
| Argument | Type | Description |
|---|---|---|
| tableId | string | Grist table ID containing the records to delete |
| dryRun | boolean | When true, validates input without deleting |
fn dropTable(tableId: string, dryRun: boolean)
Permanently delete a Grist table. Use dryRun=true to preview without deleting.
| Argument | Type | Description |
|---|---|---|
| tableId | string | Table ID to delete |
| dryRun | boolean |
Resources
apiStatus(infinite)— Grist API connectivity result
tableList(infinite)— List of tables in the Grist document
columnList(infinite)— Columns for a Grist table
records(infinite)— Records fetched from a Grist table
addResult(infinite)— Result of an addRecords operation
updateResult(infinite)— Result of an updateRecords operation
tableCreate(infinite)— Result of a createTable operation
columnAdd(infinite)— Result of an addColumns operation
tableDrop(infinite)— Result of a dropTable operation
deleteResult(infinite)— Result of a deleteRecords operation
03Previous Versions
2026.06.27.1Jun 27, 2026
2026.06.18.3Jun 18, 2026
2026.06.18.2Jun 18, 2026
Modified 1 models
2026.06.18.1Jun 18, 2026
04Stats
A
100 / 100
Downloads
0
Archive size
11.8 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels