type — a regular table links to its archive companion (if any), and an archive table points back to its parent. List tables with clay tables list.
Arguments
| Argument | Description |
|---|---|
tableId | The id of the table to fetch. Required. |
Output
A regular table:| Field | Type | Description |
|---|---|---|
type | "regular" | "archive" | Discriminates the two output shapes. |
id | string | Table id. |
name | string | Display name. |
createdAt | string | Creation timestamp. |
rowCount | number | Number of rows in the table. |
archive | { tableId, searchableFieldFormula } | null | Regular tables only. Links to the archive companion, or null if none. |
parentTableId | string | Archive tables only. Id of the regular table this archives. |
Errors
| Code | Exit | Notes |
|---|---|---|
validation_error | 2 | The tableId argument is required. |
not_found | 6 | No table with that id in the workspace. |
auth_forbidden | 3 | The API key lacks the cli:all scope, or you cannot read this table. |

