Let me start off by saying I'm a novice. And also by saying that Domo Support and there documentation is disappointing when it comes to helping you output data when building a connector. The combination of the two have induced a headache.
I am building a connector.
I am able to access an API.
I am able to get data to populate the console.
I am not able to create an output dataset that I can send over to Domo.
Here is my script that returns data to the console, but that's as far as I can get. I would really appreciate any assistance I can get.
var res = httprequest.post('https://us3.api.samsara.com/v1/fleet/drivers?access_token=xxxxxx','{\"groupId\": ssss}');
DOMO.log('res: ' + res);
var data = JSON.parse(res).features;
datagrid.addColumn('id', datagrid.DATA_TYPE_STRING);
datagrid.addColumn('name', datagrid.DATA_TYPE_STRING);
DOMO.log('data: ');
for(var i = 0; i < data.length; i++){
var drivers = data[i].properties;
datagrid.addCell(id);
datagrid.addCell(name);
datagrid.endRow();
}
