Working with the frontend, you would use regular JavaScript inside a frontend function. This is an example of a GET call with handling of the result data and error:
fetch('https://some-system/api123/get/data',{
method:'GET',
body:'',
headers:{
'Content-Type':'application/json',
'Authorization':'Bearer MYTOKEN'
}
}).then(
res => {
// res has the result body, this could be JSON, XML or anything else
},
err => {
// the error case is handled here, err contains the error message
}
);
You can find examples for frontend functions in many apps (REI3 Tickets, Password Safe, TimeTracker, ...). In the error case, you could use an instance function to show a dialog with the error message (placeholders for these are available in the function editor).
For the backend, you would call a backend function with your data from the frontend function that fetched it - JSON would be a good choice as argument type to send a lot of data and easily parse it on the backend. Once you created a backend function (and enabled the 'frontend call' option) you can find it´s placeholder in the frontend function editor.
I do not have a lot of time today - I can look for a backend example tomorrow. Maybe you can get the frontend part ready til then. The short version is: The backend function receives the JSON data, parses it and then executes INSERT/UPDATE statements to write to the DB.