Hello friends,
with extension com.KIO4_Terminal.aix we can manage Airtable by curl.
On this web page (Spanish) I have put the basic process:
http://kio4.com/appinventor/135_airtable_instalacion.htm
- It is about creating the following database in Airtable .
Careful with double quotation marks, check image:
- We manage the database by curl
- Show all data:
curl https://api.airtable.com/v0/appbUhcPzqHA1CIBU/Table%201 -H “Authorization: Bearer YOUR_API_KEY”
- Retrieve a record: Antonio (recfHx8HocBaZiY49)
curl https://api.airtable.com/v0/appbUhcPzqHA1CIBU/Table%201/recfHx8HocBaZiY49 - H “Authorization: Bearer YOUR_API_KEY”
- Create a record: Ricardo.
curl -v -X POST https://api.airtable.com/v0/appbUhcPzqHA1CIBU/Table%201 -H “Authorization: Bearer YOUR_API_KEY” -H “Content-Type: application/json” --data ‘{ “records”: [ { “fields”: { “Nombre”: “Ricardo”, “Edad”: “29”, “Ciudad”: “Medina Sidonia”, “Puntos”: 8934 } } ], “typecast”: true }’
- Update a record: “Edad” of Antonio.
curl -v -X PATCH https://api.airtable.com/v0/appbUhcPzqHA1CIBU/Table%201 -H “Authorization: Bearer YOUR_API_KEY” -H “Content-Type: application/json”
–data ‘{
“records”: [
{
“id”: “recfHx8HocBaZiY49”,
“fields”: {
“Nombre”: “Antonio”,
“Edad”: “27”,
“Ciudad”: “Cádiz”,
“Puntos”: 5678
}
}
]
}’
- Delete a record: Ricardo. (reclD3Jc5f2zHcmtg)
curl -v -X DELETE https://api.airtable.com/v0/appbUhcPzqHA1CIBU/Table%201 -H “Authorization: Bearer YOUR_API_KEY” -G --data-urlencode ‘records=reclD3Jc5f2zHcmtg’