Easily create an API with just 3 variables:
- Give your API a title
- Copy the Airtable account API key (from https://airtable.com/account)
- Copy the base App id (from https://airtable.com/api)
And you’re done! You have an API to your Airtable data.
Example JavaScript code to retrieve a JSON string (All records):
function haalAgenda() {
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: "get",
headers: myHeaders,
redirect: "follow",
};
fetch("https://v1.nocodeapi.com/<user>/airtable/<id>?tableName=Gebeurtenissen", requestOptions)
.then(response => response.text())
.then(result => toonAgenda(result))
.catch(error => console.log('error', error));}