Retrieving Tables
You can retrieve all of a Solution's Tables, or get a specific Table by it's unique ID.
Get Table
Get a single Table by its Id.
get_table(tableId: string, fieldSlugs: string[]): Promise<TableModel | undefined>
Parameter Name | Type | Description |
---|---|---|
tableId | string | The Id of the Table. |
fieldSlugs | array of strings | (optional) Array of table object keys to return. |
Example Script - Get Table
<!--get_table(tableId: string, fieldSlugs: string[]): Promise<TableModel | undefined>;-->
<script>
window.SmartSuite.get_table('6716999c6b87f8d761d72bdf').then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 response
{table_object}
List Tables for Solution
Get all Tables in a Solution by Solution Id.
list_tables( solutionId?: ID, fieldSlugs?: string[]): Promise<ApplicationModel[]>
Parameter Name | Type | Description |
---|---|---|
solutionId | string | The Id of the Solution. |
fieldSlugs | array of strings | (optional) Array of solution (Application) object keys to return. |
List Tables
<!--list_tables( solutionId?: ID, fieldSlugs?: string[]): Promise<TableModel[]>-->
<script>
window.SmartSuite.list_tables('67161745a504292e31e25acf', ['name']).then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 response
[
{
"name": "Table 1",
"id": "67647d9b7a03fad7da12d9f2"
},
{
"name": "new name 2",
"id": "6765f05267d08e6360c7cdda"
}
]