Back to All

JSON BODY

I want to create a new row in a database. I've tried it in your web and it works, but I don't now where I must put de "dataSourceRow" var into "params" var.

Example:

 var url = 'https://api.goformz.com:443/v2/datasources/*******************/rows';
 
var headers = {
    'Authorization': 'Basic ***************************'
 }    

var dataSourceRow = {
    'keyColumn':  "DATA1",
    'value': "[\"DATA2\",\"DATA3"\]" 
 }

var params = {
   "headers": headers,
   "dataSourceRow": dataSourceRow
 }

var response = UrlFetchApp.fetch(url, params);

With this code the response is 200, but the row isn't created.

Where I must insert de "dataSourceRow" var?

Thanks.