Airtable. Curl w extension KIO4_Terminal. Show. Create. Update. Delete

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

- 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’

4 Likes

Not all Android versions have the command curl, check
curl --version
shell_curl