# Grist integration

> Spreadsheet-database API: manage Grist team sites, workspaces, documents, tables, columns, records, attachments and webhooks.

- Authentication: apiKey

## Tools (116)

- **Add columns to a table**: Add columns to a table
- **Add or update columns of a table**: Add or update columns of a table
- **Add or update records of a table**: Add or update records of a table
- **Add records to a table**: Add records to a table
- **Add tables to a document**: Add tables to a document
- **Apply a change proposal**: Apply a change proposal. Apply a proposal's changes to the document. This merges the fork's changes into the trunk document.
- **Apply a list of user actions**: Apply a list of user actions. Apply a sequence of user actions to a document. This is a low-level endpoint for making batch changes using Grist's internal action format. Each action is an array where the first element is the action type.
- **Change who has access to document**: Change who has access to document
- **Change who has access to org**: Change who has access to org
- **Change who has access to workspace**: Change who has access to workspace
- **Clear queue for a specific webhook**: Clear queue for a specific webhook. Clear the queue of pending payloads for a specific webhook. Only document owners can call this endpoint.
- **Compare document versions**: Compare document versions. Compare two versions of the same document by their state hashes. Returns details about what changed between the versions.
- **Compare two documents**: Compare two documents. Compare this document with another document. Useful for comparing a fork with its trunk document.
- **Content of document, as an Excel file**: Content of document, as an Excel file
- **Content of document, as an Sqlite file**: Content of document, as an Sqlite file
- **Content of table, as a CSV file**: Content of table, as a CSV file
- **Content of table, as a DSV file**: Content of table, as a DSV file. Download table data using a custom delimiter (💩).
- **Content of table, as a TSV file**: Content of table, as a TSV file. Download table data as tab-separated values.
- **Copies a document to a workspace.**: Copies a document to a workspace.
- **Create a change proposal**: Create a change proposal. Create a proposal from a fork to its trunk document. The proposal contains the comparison of changes between the fork and trunk. This endpoint can only be called on a fork document.
- **Create a document**: Create a document. A unified endpoint for creating documents. Can create an empty document, copy an existing document, or import a file.
- **Create an empty document**: Create an empty document
- **Create an empty workspace**: Create an empty workspace
- **Create a service account**: Create a service account. This creates a new service account with a new API key.
- **Create new webhooks for a document**: Create new webhooks for a document. Creates one or more webhooks that will POST to specified URLs when data in the document changes. Returns the IDs of the created webhooks.
- **Create or regenerate API key**: Create or regenerate API key. Create a new API key or regenerate an existing one.
- **Delete a column of a table**: Delete a column of a table
- **Delete a document**: Delete a document
- **Delete an org**: Delete an org
- **Delete a service account**: Delete a service account. This deletes a given service account.
- **Delete a service account's api key**: Delete a service account's api key. Deletes the API key for a service account. The service account will no longer be able to authenticate until a new key is generated.
- **Delete a user from Grist**: Delete a user from Grist. This action also deletes the user's personal organisation and all the workspaces and documents it contains. Currently, only the users themselves are allowed to delete their own accounts.
- **Delete a workspace**: Delete a workspace
- **Delete records of a table**: Delete records of a table
- **Delete unused attachments from the document**: Delete unused attachments from the document. When an uploaded attachment is no longer used in a Grist document, it's retained for a period of time in case it's needed again (e.g. to facilitate an "undo").
- **Delete user's API key**: Delete user's API key. Delete the current user's API key.
- **Describe a document**: Describe a document
- **Describe an org**: Describe an org
- **Describe a workspace**: Describe a workspace
- **Disable a document.**: Disable a document.. Disabled documents cannot be accessed or modified. Moving and renaming a disabled doc is also forbidden, as well as accessing or submitting published forms associated to a disabled document.
- **Disable a user**: Disable a user. A disabled user can not log in and loses access to all pages, including public ones, as well as API access. The operation is non-destructive. Disabled users can be re-enabled. Only admin accounts can disable a user.
- **Download all attachments**: Download all attachments
- **Download the contents of an attachment**: Download the contents of an attachment
- **Empty a document's queue of undelivered payloads**: Empty a document's queue of undelivered payloads. Clear all pending webhook deliveries for this document. Use this if the queue has built up due to unreachable endpoints.
- **Enable a document.**: Enable a document.. If a document has been previously disabled, this will restore all former access to a document, including access to its associated published forms. Only admin accounts can enable a document.
- **Enable a user**: Enable a user. If a user has been disabled, this will restore their access, including API access. Only admin accounts can enable a user.
- **Fetch records from a table**: Fetch records from a table
- **Flush document to storage**: Flush document to storage. Ensure all pending changes to the document are written to persistent storage. Returns true if the document was flushed, false if the document was not open.
- **Fork a document**: Fork a document. Create a fork of a document. A fork is a personal copy that tracks its relationship to the original document. Forks can be used to experiment with changes before applying them to the original.
- **Generate a new service account's api key**: Generate a new service account's api key. This renews an api key of a given service account. Useful especially to change the API key when it has been leaked.
- **Get active session information**: Get active session information. Returns information about the active user and organization for the current session.
- **Get all session users and organizations**: Get all session users and organizations. Returns all user profiles logged into the current session and all organizations they can access.
- **Get all your service accounts**: Get all your service accounts. This lists all your service accounts with their details.
- **Get a service account's details**: Get a service account's details. This reports the details of a service account.
- **Get attachment transfer status**: Get attachment transfer status
- **Get current user's profile**: Get current user's profile. Returns the profile information of the currently authenticated user.
- **Get document action history states**: Get document action history states. Returns a list of document states representing the action history. Each state has a sequential number (n) and a hash (h) that uniquely identifies that point in history. Most recent state is first.
- **Get external store**: Get external store
- **Get formula timing status**: Get formula timing status. Check if formula timing is enabled for a document and retrieve timing data if available. Only document owners can access timing information.
- **Get form view data**: Get form view data. Get the form configuration for a specific view section. Forms are a special view type that allows external users to submit data.
- **Get organization usage summary**: Get organization usage summary. Get usage statistics for all non-deleted documents in the organization. Only accessible to organization owners.
- **Get template details**: Get template details. Get information about a specific template. **Note:** Requires a template organization to be configured on the server.
- **Get the metadata for an attachment**: Get the metadata for an attachment
- **Get user's API key**: Get user's API key. Returns the current user's API key if one exists.
- **Get users for 'View As' feature**: Get users for 'View As' feature. Get users that can be used with the "View As" feature for testing access rules. Only document owners can call this endpoint.
- **Import an existing document**: Import an existing document
- **List available custom widgets**: List available custom widgets. Get all widget definitions from the configured widget repository. Custom widgets extend Grist's functionality with specialized views.
- **List available templates**: List available templates. Get all available templates. Templates are organized by workspace within a template organization configured on the server. **Note:** Requires a template organization to be configured on the server.
- **List change proposals**: List change proposals. List proposals associated with a document. Proposals are suggested changes from forks that can be reviewed and applied to the trunk document.
- **List columns in a table**: List columns in a table
- **List document snapshots**: List document snapshots. Returns a list of snapshots (backups) of the document. Snapshots are created automatically as the document is edited. Most recent snapshots are listed first.
- **List external attachment stores**: List external attachment stores
- **List metadata of all attachments in a doc**: List metadata of all attachments in a doc
- **List tables in a document**: List tables in a document
- **List the orgs you have access to**: List the orgs you have access to. This enumerates all the team sites or personal areas available.
- **List users with access to document**: List users with access to document
- **List users with access to org**: List users with access to org
- **List users with access to workspace**: List users with access to workspace
- **List workspaces and documents within an org**: List workspaces and documents within an org
- **Modify an org**: Modify an org
- **Modify a service account**: Modify a service account. This updates a service account's label, description or expiration date.
- **Modify a webhook**: Modify a webhook. Update the configuration of an existing webhook, such as its URL, enabled state, or event types.
- **Modify a workspace**: Modify a workspace
- **Modify columns of a table**: Modify columns of a table
- **Modify document metadata (but not its contents)**: Modify document metadata (but not its contents)
- **Modify records of a table**: Modify records of a table
- **Modify tables of a document**: Modify tables of a document. Modify metadata for existing tables. This endpoint is primarily useful for: - Renaming tables (via the `tableId` field) - Setting on-demand loading (via the `onDemand` field)
- **Move document to another workspace.**: Move document to another workspace.
- **Move document to trash**: Move document to trash. Soft-delete the document by moving it to trash. The document can be restored using the unremove endpoint. If the `permanent` query parameter is set to true, the document is permanently deleted instead.
- **Move workspace to trash**: Move workspace to trash. Soft-delete the workspace by moving it to trash. The workspace can be restored using the unremove endpoint. If the `permanent` query parameter is set to true, the workspace is permanently deleted instead.
- **Pin a document**: Pin a document. Pin the document so it appears in a prominent location. Pinned documents are displayed at the top of workspace listings for easy access.
- **Reassign document to appropriate worker**: Reassign document to appropriate worker. Administrative endpoint that checks if a document is assigned to the expected worker group and frees it for reassignment if not. Used for load balancing and maintenance operations.
- **Reload a document**: Reload a document. Closes and reopens the document, forcing the python engine to restart.
- **Remove a webhook**: Remove a webhook. Permanently delete a webhook. Any pending deliveries in the queue for this webhook will also be removed.
- **Remove document snapshots**: Remove document snapshots. Remove specific snapshots from a document's backup history. Only document owners can remove snapshots.
- **Replace document content**: Replace document content. Replace the current document content with content from another source. Can restore from a snapshot or copy from another document.
- **Restore document from trash**: Restore document from trash. Recover a document that was previously soft-deleted. Only works if the document is still in the trash.
- **Restore workspace from trash**: Restore workspace from trash. Recover a workspace that was previously soft-deleted. Only works if the workspace is still in the trash.
- **Run an SQL query against a document**: Run an SQL query against a document. Execute a read-only SQL SELECT query against the document's SQLite database. This is a simplified endpoint for basic queries.
- **Run an SQL query against a document, with options or parameters**: Run an SQL query against a document, with options or parameters. Execute a read-only SQL SELECT query with support for parameterized queries and custom timeouts.
- **Set active user for organization**: Set active user for organization. Switch which user account is active for a given organization. Useful when a user has multiple accounts logged in.
- **Set external store**: Set external store
- **Set recovery mode for a document**: Set recovery mode for a document. Controls the recovery mode of a document. Recovery mode helps in recovering from errors or corrupted states. Only document owners can control recovery mode.
- **Start formula timing**: Start formula timing. Start collecting timing information for formula calculations. Only document owners can start timing.
- **Start transferring attachments**: Start transferring attachments
- **Stop formula timing**: Stop formula timing. Stop collecting timing information and return the collected data. Only document owners can stop timing.
- **The schema of a table**: The schema of a table. The schema follows [frictionlessdata's table-schema standard](https://specs.frictionlessdata.io/table-schema/).
- **Truncate the document's action history**: Truncate the document's action history
- **Unpin a document**: Unpin a document. Remove the pinned status from a document.
- **Update attachment usage tracking**: Update attachment usage tracking. Recalculate which attachments are in use by scanning the document. This is mostly used for testing and maintenance.
- **Update user's locale**: Update user's locale. Update the locale preference for the current user.
- **Update user's name**: Update user's name. Update the display name for the current user.
- **Upload attachments to a doc**: Upload attachments to a doc
- **Upload missing attachments**: Upload missing attachments. Restores attachments which are missing from external storage.
- **Verify attachment file integrity**: Verify attachment file integrity. Verify that attachment records match the actual stored files. This is a maintenance endpoint to check for data consistency. Only document owners can call this endpoint.
- **Webhooks associated with a document**: Webhooks associated with a document. Returns all webhooks configured for this document, including their settings and delivery statistics.

Connect Grist in General Input: https://www.generalinput.com/apps/grist