1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-29 02:57:35 +02:00
OpenIntegrations/docs/en/md/Airtable/Database-work/Get-database-tables.md

74 lines
1.1 KiB
Markdown
Raw Normal View History

---
sidebar_position: 2
---
# Get base tables
Gets the schema of base tables
*Function GetDatabaseTables(Val Token, Val Base) Export*
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Token |
| Base | --base | String | Base identifier |
Returns: Key-Value Pair - serialized JSON response from Airtable
```bsl title="Code example"
Base = "apptm8Xqo7TwMaipQ";
Response = OPI_Airtable.GetDatabaseTables(Token, Base); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
```
```sh title="CLI command example"
oint airtable GetDatabaseTables --token %token% --base "apptm8Xqo7TwMaipQ"
```
```json title="Result"
{
"tables": [
{
"id": "tblqZzW78Rvsdt9gt",
"name": "TestTable",
"primaryFieldId": "fldj9Z3fEpLzv40d0",
"fields": [
{
"type": "number",
"options": {
"precision": 0
},
"id": "fldj9Z3fEpLzv40d0",
"name": "Number"
},
{
"type": "richText",
"id": "fldX1kR7lienmcdEj",
"name": "String"
}
],
"views": [
{
"id": "viwbKE3PS9jl6bqJl",
"name": "Grid view",
"type": "grid"
}
]
}
]
}
```