# swagger-client
OpenAPI spec for Airtable's REST API

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2024-12-27
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import swagger_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import swagger_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BasesApi(swagger_client.ApiClient(configuration))
body = swagger_client.MetaBasesBody() # MetaBasesBody | 

try:
    # Create base
    api_response = api_instance.airtable_bases_create(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasesApi->airtable_bases_create: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BasesApi(swagger_client.ApiClient(configuration))
offset = 'offset_example' # str | Pagination offset for the next page of results (optional)

try:
    # List bases
    api_response = api_instance.airtable_bases_list(offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasesApi->airtable_bases_list: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure OAuth2 access token for authorization: Oauth2
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.BasesApi(swagger_client.ApiClient(configuration))
base_id = 'base_id_example' # str | 
include = ['include_example'] # list[str] | Additional fields to include in the views object response (optional)

try:
    # Get base schema
    api_response = api_instance.airtable_bases_schema(base_id, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BasesApi->airtable_bases_schema: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://api.airtable.com/v0*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BasesApi* | [**airtable_bases_create**](docs/BasesApi.md#airtable_bases_create) | **POST** /meta/bases | Create base
*BasesApi* | [**airtable_bases_list**](docs/BasesApi.md#airtable_bases_list) | **GET** /meta/bases | List bases
*BasesApi* | [**airtable_bases_schema**](docs/BasesApi.md#airtable_bases_schema) | **GET** /meta/bases/{baseId}/tables | Get base schema
*CommentsApi* | [**airtable_comments_create**](docs/CommentsApi.md#airtable_comments_create) | **POST** /{baseId}/{tableIdOrName}/{recordId}/comments | Create comment
*CommentsApi* | [**airtable_comments_delete**](docs/CommentsApi.md#airtable_comments_delete) | **DELETE** /{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId} | Delete comment
*CommentsApi* | [**airtable_comments_list**](docs/CommentsApi.md#airtable_comments_list) | **GET** /{baseId}/{tableIdOrName}/{recordId}/comments | List comments
*CommentsApi* | [**airtable_comments_update**](docs/CommentsApi.md#airtable_comments_update) | **PATCH** /{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId} | Update comment
*FieldsApi* | [**airtable_fields_create**](docs/FieldsApi.md#airtable_fields_create) | **POST** /meta/bases/{baseId}/tables/{tableId}/fields | Create field
*FieldsApi* | [**airtable_fields_update**](docs/FieldsApi.md#airtable_fields_update) | **PATCH** /meta/bases/{baseId}/tables/{tableId}/fields/{columnId} | Update field
*RecordsApi* | [**airtable_records_create**](docs/RecordsApi.md#airtable_records_create) | **POST** /{baseId}/{tableIdOrName} | Create records
*RecordsApi* | [**airtable_records_delete**](docs/RecordsApi.md#airtable_records_delete) | **DELETE** /{baseId}/{tableIdOrName}/{recordId} | Delete record
*RecordsApi* | [**airtable_records_delete_multiple**](docs/RecordsApi.md#airtable_records_delete_multiple) | **DELETE** /{baseId}/{tableIdOrName} | Delete multiple records
*RecordsApi* | [**airtable_records_get**](docs/RecordsApi.md#airtable_records_get) | **GET** /{baseId}/{tableIdOrName}/{recordId} | Get record
*RecordsApi* | [**airtable_records_list**](docs/RecordsApi.md#airtable_records_list) | **GET** /{baseId}/{tableIdOrName} | List records
*RecordsApi* | [**airtable_records_replace**](docs/RecordsApi.md#airtable_records_replace) | **PUT** /{baseId}/{tableIdOrName}/{recordId} | Replace record
*RecordsApi* | [**airtable_records_replace_multiple**](docs/RecordsApi.md#airtable_records_replace_multiple) | **PUT** /{baseId}/{tableIdOrName} | Replace multiple records
*RecordsApi* | [**airtable_records_sync_csv**](docs/RecordsApi.md#airtable_records_sync_csv) | **POST** /{baseId}/{tableIdOrName}/sync/{apiEndpointSyncId} | Sync CSV data
*RecordsApi* | [**airtable_records_update**](docs/RecordsApi.md#airtable_records_update) | **PATCH** /{baseId}/{tableIdOrName}/{recordId} | Update record
*RecordsApi* | [**airtable_records_update_multiple**](docs/RecordsApi.md#airtable_records_update_multiple) | **PATCH** /{baseId}/{tableIdOrName} | Update multiple records
*RecordsApi* | [**airtable_records_upload_attachment**](docs/RecordsApi.md#airtable_records_upload_attachment) | **POST** /content.airtable.com/v0/{baseId}/{recordId}/{attachmentFieldIdOrName}/uploadAttachment | Upload attachment
*TablesApi* | [**airtable_tables_create**](docs/TablesApi.md#airtable_tables_create) | **POST** /meta/bases/{baseId}/tables | Create table
*TablesApi* | [**airtable_tables_update**](docs/TablesApi.md#airtable_tables_update) | **PATCH** /meta/bases/{baseId}/tables/{tableIdOrName} | Update table
*UserApi* | [**airtable_get_user_info**](docs/UserApi.md#airtable_get_user_info) | **GET** /meta/whoami | Get user info

## Documentation For Models

 - [AttachmentFieldIdOrNameUploadAttachmentBody](docs/AttachmentFieldIdOrNameUploadAttachmentBody.md)
 - [BaseIdTableIdOrNameBody](docs/BaseIdTableIdOrNameBody.md)
 - [BaseIdTableIdOrNameBody1](docs/BaseIdTableIdOrNameBody1.md)
 - [BaseIdTableIdOrNameBody2](docs/BaseIdTableIdOrNameBody2.md)
 - [BaseIdTablesBody](docs/BaseIdTablesBody.md)
 - [BaseIdtableIdOrNamePerformUpsert](docs/BaseIdtableIdOrNamePerformUpsert.md)
 - [BaseIdtableIdOrNameRecords](docs/BaseIdtableIdOrNameRecords.md)
 - [BaseIdtableIdOrNameRecords1](docs/BaseIdtableIdOrNameRecords1.md)
 - [CommentsRowCommentIdBody](docs/CommentsRowCommentIdBody.md)
 - [Field](docs/Field.md)
 - [FieldConfigRequest](docs/FieldConfigRequest.md)
 - [FieldConfigResponse](docs/FieldConfigResponse.md)
 - [FieldModel](docs/FieldModel.md)
 - [FieldOptions](docs/FieldOptions.md)
 - [FieldOptions1](docs/FieldOptions1.md)
 - [FieldOptions10](docs/FieldOptions10.md)
 - [FieldOptions10Choices](docs/FieldOptions10Choices.md)
 - [FieldOptions11](docs/FieldOptions11.md)
 - [FieldOptions12](docs/FieldOptions12.md)
 - [FieldOptions12Choices](docs/FieldOptions12Choices.md)
 - [FieldOptions13](docs/FieldOptions13.md)
 - [FieldOptions14](docs/FieldOptions14.md)
 - [FieldOptions15](docs/FieldOptions15.md)
 - [FieldOptions16](docs/FieldOptions16.md)
 - [FieldOptions16Choices](docs/FieldOptions16Choices.md)
 - [FieldOptions17](docs/FieldOptions17.md)
 - [FieldOptions18](docs/FieldOptions18.md)
 - [FieldOptions2](docs/FieldOptions2.md)
 - [FieldOptions3](docs/FieldOptions3.md)
 - [FieldOptions4](docs/FieldOptions4.md)
 - [FieldOptions4DateFormat](docs/FieldOptions4DateFormat.md)
 - [FieldOptions5](docs/FieldOptions5.md)
 - [FieldOptions5TimeFormat](docs/FieldOptions5TimeFormat.md)
 - [FieldOptions6](docs/FieldOptions6.md)
 - [FieldOptions7](docs/FieldOptions7.md)
 - [FieldOptions8](docs/FieldOptions8.md)
 - [FieldOptions9](docs/FieldOptions9.md)
 - [FieldsColumnIdBody](docs/FieldsColumnIdBody.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [InlineResponse2001](docs/InlineResponse2001.md)
 - [InlineResponse20010](docs/InlineResponse20010.md)
 - [InlineResponse20011](docs/InlineResponse20011.md)
 - [InlineResponse20012](docs/InlineResponse20012.md)
 - [InlineResponse20013](docs/InlineResponse20013.md)
 - [InlineResponse20013Bases](docs/InlineResponse20013Bases.md)
 - [InlineResponse20014](docs/InlineResponse20014.md)
 - [InlineResponse2002](docs/InlineResponse2002.md)
 - [InlineResponse2003](docs/InlineResponse2003.md)
 - [InlineResponse2004](docs/InlineResponse2004.md)
 - [InlineResponse2005](docs/InlineResponse2005.md)
 - [InlineResponse2006](docs/InlineResponse2006.md)
 - [InlineResponse2007](docs/InlineResponse2007.md)
 - [InlineResponse2008](docs/InlineResponse2008.md)
 - [InlineResponse2008Author](docs/InlineResponse2008Author.md)
 - [InlineResponse2008Comments](docs/InlineResponse2008Comments.md)
 - [InlineResponse2008Emoji](docs/InlineResponse2008Emoji.md)
 - [InlineResponse2008ReactingUser](docs/InlineResponse2008ReactingUser.md)
 - [InlineResponse2008Reactions](docs/InlineResponse2008Reactions.md)
 - [InlineResponse2009](docs/InlineResponse2009.md)
 - [InlineResponse2009Author](docs/InlineResponse2009Author.md)
 - [InlineResponse2009ReactingUser](docs/InlineResponse2009ReactingUser.md)
 - [InlineResponse2009Reactions](docs/InlineResponse2009Reactions.md)
 - [InlineResponse422](docs/InlineResponse422.md)
 - [InlineResponse422Error](docs/InlineResponse422Error.md)
 - [MetaBasesBody](docs/MetaBasesBody.md)
 - [OneOfFieldOptions17Result](docs/OneOfFieldOptions17Result.md)
 - [OneOfFieldOptions2Result](docs/OneOfFieldOptions2Result.md)
 - [OneOfFieldOptionsPromptItems](docs/OneOfFieldOptionsPromptItems.md)
 - [RecordIdCommentsBody](docs/RecordIdCommentsBody.md)
 - [RecordResponse](docs/RecordResponse.md)
 - [RecordResponseWithComments](docs/RecordResponseWithComments.md)
 - [Sort](docs/Sort.md)
 - [TableConfig](docs/TableConfig.md)
 - [TableIdOrNameRecordIdBody](docs/TableIdOrNameRecordIdBody.md)
 - [TableIdOrNameRecordIdBody1](docs/TableIdOrNameRecordIdBody1.md)
 - [TableModel](docs/TableModel.md)
 - [TableModelViews](docs/TableModelViews.md)
 - [TablesTableIdOrNameBody](docs/TablesTableIdOrNameBody.md)
 - [UserMentioned](docs/UserMentioned.md)

## Documentation For Authorization


## ApiKeyAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header

## Oauth2

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://airtable.com/oauth2/v1/authorize
- **Scopes**: 
 - **data.records:read**: See the data in records
 - **data.records:write**: Create, edit, and delete records
 - **data.recordComments:read**: See comments in records
 - **data.recordComments:write**: Create, edit, and delete record comments
 - **schema.bases:read**: See the structure of a base, like table names or field types
 - **schema.bases:write**: Edit the structure of a base, like adding new fields or tables
 - **webhook:manage**: View, create, delete webhooks for a base, as well as fetch webhook payloads
 - **user.email:read**: See the user&#x27;s email address


## Author


