mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-25 21:39:21 +02:00
1.3 KiB
1.3 KiB
sidebar_position |
---|
3 |
Create base
Creates a new database
Function CreateDatabase(Val Token, Val Workspace, Val Name, Val TableCollection) Export
Parameter | CLI option | Type | Description |
---|---|---|---|
Token | --token | String | Token |
Workspace | --ws | String | Workspace identifier |
Name | --title | String | New base name |
TableCollection | --tablesdata | Map Of KeyAndValue | Table description: Key > name, Value > array of fields |
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
Token = "patNn4BXW66Yx3pdj.5b93c53cab554a8387de02d...";
Region = "wspdf8yl1yZz3PmWZ";
Name = "TestDatabase";
FieldArray = New Array;
FieldArray.Add(OPI_Airtable.GetNumberField("Number"));
FieldArray.Add(OPI_Airtable.GetStringField("String"));
TableName = "TestTable";
TableMapping = New Map;
TableMapping.Insert(TableName, FieldArray);
Result = OPI_Airtable.CreateDatabase(Token, Region, Name, TableMapping);
oint airtable CreateDatabase --token %token% --ws "wspdf8yl1yZz3PmWZ" --title "TestDatabase" --tablesdata %tablesdata%