Metadata¶
The metadata API gives you the ability to list all of your bases, tables, fields, and views.
Warning
This API is experimental and subject to change.
- pyairtable.metadata.get_api_bases(api)[source]¶
Return list of Bases from an Api or Base instance. For More Details Metadata Api Documentation
- Usage:
>>> table.get_bases() { "bases": [ { "id": "appY3WxIBCdKPDdIa", "name": "Apartment Hunting", "permissionLevel": "create" }, { "id": "appSW9R5uCNmRmfl6", "name": "Project Tracker", "permissionLevel": "edit" } ] }
- Return type
Dict
[Any
,Any
]
- pyairtable.metadata.get_base_schema(base)[source]¶
Returns Schema of a Base For More Details Metadata Api Documentation
- Usage:
>>> get_base_schema(base) { "tables": [ { "id": "tbltp8DGLhqbUmjK1", "name": "Apartments", "primaryFieldId": "fld1VnoyuotSTyxW1", "fields": [ { "id": "fld1VnoyuotSTyxW1", "name": "Name", "type": "singleLineText" }, { "id": "fldoaIqdn5szURHpw", "name": "Pictures", "type": "multipleAttachment" }, { "id": "fldumZe00w09RYTW6", "name": "District", "type": "multipleRecordLinks" } ], "views": [ { "id": "viwQpsuEDqHFqegkp", "name": "Grid view", "type": "grid" } ] } ] }
- Return type
Dict
[Any
,Any
]
- pyairtable.metadata.get_table_schema(table)[source]¶
Returns the specific table schema record provided by base schema list
- Parameters
table (
Table
) –Table
instance
- Usage:
>>> get_table_schema(table) { "id": "tbltp8DGLhqbUmjK1", "name": "Apartments", "primaryFieldId": "fld1VnoyuotSTyxW1", "fields": [ { "id": "fld1VnoyuotSTyxW1", "name": "Name", "type": "singleLineText" } ], "views": [ { "id": "viwQpsuEDqHFqegkp", "name": "Grid view", "type": "grid" } ] }
- Return type
Optional
[Dict
[Any
,Any
]]