Help

Fetching the table schema of an airtable base

Topic Labels: API
3005 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_Fleck
4 - Data Explorer
4 - Data Explorer

Hi there devs,

we have so many bases we need to keep in sync. Right now we need to do it manually and this is very annoying. I want to build a script that displays the difference between different tables from two given bases.

So does somebody know how to retrieve the table schema of an airtable base?

Airtable is making an xhr call to:

Airtable: Organize anything you can imagine

Airtable works like a spreadsheet but gives you the power of a database to organize anything. Sign up for free.

In this response there will be a json object retrieved with all the infos:

  1. tableSchemas: [{id: “tblCQdEDrzVc5QEQKf”, name: “STANDUP”, primaryColumnId: “fld9TUSAYKjLZgDhVR”,…},…]

  2. 0: {id: “tblCQdErzVc5DQEQKf”, name: “STANDUP”, primaryColumnId: “fld9TUSADYKjLZghVR”,…}

1. columns: [{id: "fld9TUSADYKjLZghVR", name: "To Do", type: "text"},…]

  1. 0: {id: "fld9TUSAYKDjLZghVR", name: "To Do", type: "text"}

    1. id: "fld9TUSADYKjLZghVR"
    2. name: "To Do"
    3. type: "text"

  2. 1: {id: "fldWO0GMdDgktl4O01", name: "Notes", type: "multilineText"}

    1. id: "fldWO0GMdgDktl4O01"
    2. name: "Notes"
    3. type: "multilineText"

  3. 2: {id: "fldTapLVqADNOPsBeS", name: "Attachments", type: "multipleAttachment"}
  4. 3: {id: "fldO4AhDDXSF8ACbO8", name: "Owner", type: "collaborator", typeOptions: {shouldNotify: true}}
  5. 4: {id: "fldeD5TkinFDG8pNzy", name: "Project", type: "select",…}
  6. 5: {id: "fld2OJxtRDYKdg1quQ", name: "Priority", type: "rating",…}
  7. 6: {id: "fldfMsfpmDxhgX2zYb", name: "Status", type: "select",…}
  8. 7: {id: "fldxIbThXD8GWOf3Tp", name: "Deadline", type: "date",…}
  9. 8: {id: "fldQgQ8xoDKnugE3xj", name: "Reporter", type: "collaborator", typeOptions: {shouldNotify: true}}
  10. 9: {id: "fldpfKODxOiYZZvZ1Z", name: "Urgency", type: "checkbox",…}

But i don´t know how to generate this request manually?

Anybody have some idea?

Thanks in advance.

1 Reply 1
openside
10 - Mercury
10 - Mercury

Check out using the scripting block with this script

https://builtonair.com/script/meta-definition/