2024-06-07 11:53:24 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get base tables
|
|
|
|
Gets the schema of base tables
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function GetDatabaseTables(Val Token, Val Base) Export`
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Base | --base | String | Base identifier |
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
```bsl title="Code example"
|
2024-10-02 20:28:02 +03:00
|
|
|
Token = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
|
2024-10-13 20:13:25 +03:00
|
|
|
Base = "appESy99HYCLbuWlV";
|
2024-10-02 20:28:02 +03:00
|
|
|
|
|
|
|
Result = OPI_Airtable.GetDatabaseTables(Token, Base);
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint airtable GetDatabaseTables --token %token% --base "apptm8Xqo7TwMaipQ"
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-10-03 09:45:14 +03:00
|
|
|
{
|
|
|
|
"tables": [
|
|
|
|
{
|
2024-10-09 09:42:00 +03:00
|
|
|
"id": "tblbhqzh3PL3cS6Ch",
|
2024-10-03 09:45:14 +03:00
|
|
|
"name": "TestTable",
|
2024-10-09 09:42:00 +03:00
|
|
|
"primaryFieldId": "fld9JrMjoVLwSPy3C",
|
2024-10-03 09:45:14 +03:00
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"type": "number",
|
|
|
|
"options": {
|
|
|
|
"precision": 0
|
|
|
|
},
|
2024-10-09 09:42:00 +03:00
|
|
|
"id": "fld9JrMjoVLwSPy3C",
|
2024-10-03 09:45:14 +03:00
|
|
|
"name": "Number"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "richText",
|
2024-10-09 09:42:00 +03:00
|
|
|
"id": "fld044xLas7uBdddr",
|
2024-10-03 09:45:14 +03:00
|
|
|
"name": "String"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"views": [
|
|
|
|
{
|
2024-10-09 09:42:00 +03:00
|
|
|
"id": "viwfJdwEI0dtqJMl6",
|
2024-10-03 09:45:14 +03:00
|
|
|
"name": "Grid view",
|
|
|
|
"type": "grid"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|