Skip to main content

I have connected Podio api to skuid. But the Body parameter with every request is not working. I filter items from an App and for that i have to give some json parameter to the endpoint. I checked the same in Postman it worked. But not working in Skuid. why?

A few thoughts. 
1. Inspect your network traffic to see the specific request and body that Skuid is sending to Podio. This will let you see the difference between what Skuid is sending and Postman. 

2. Can you post a picture of your setup - showing where the body parameter is configured? 

3. Are you trying to merge data into the body parameters?  That is not currently supported in our declarative builder. You have to do that in Javascript.  Its a known issue and will be changed.  But… 

Hopefully these items help. 


Ok, Actually i have to pass limit and offset to get data from datasouce. The limit and offset have to pass as body parameter as {“limit” : 500, “offset” : 0}, this will return 500 data. As by default it is returning only 20 data. I am passing body data as

I was sending data like this.

But it is not working. How to send it through javascript?


(function(skuid) { var $ = skuid.$;

$(document.body).one(‘pageload’, function() {

var myModel = skuid.model.getModel(‘leads’);

var myComponent = skuid.component.getById(‘sk-2-Bt-265’);

});


try {  

var request = '{ ' +
'{ "limit" : 500}, ' +
'{ "offset" : 0} ' +
'}';
console.log(request);

$.ajax('/item/app/20031858/filter', {
data: request,
type: 'POST',
crossDomain: true,
dataType: "json",
beforeSend: function(xhr) {

xhr.setRequestHeader('Content-Type', 'application/json');
},
success: function(response) {
console.log( responseo0].outputValues.output, responseu1].outputValues.output]); // V'returnValue1', 'returnValue2']
},
error: function(jqXHR, textStatus, errorThrown) {
console.log( jqXHR, textStatus, errorThrown]);
}
});
} catch (e) {
console.log(e);
alert(e);
}

})(skuid);


This is the javascript code currently i am sending but not working.


Again the best thing here is to inspect the network traffic that is being generated by Postman and what is generated by Skuid.  This will show you what is working in Postman, and how it is different than what is happening in Skuid. 


Also make sure the parametres are not being passed as extensions of the enpoint (URL parameters) rather than in the body.  You may be able to define those things just in the base URL for an individual model instead of having to create a separate body payload in the data source. 


But they are body parameters not url parameters.


How to send json body Parameter in SKUID?


This reply was created from a merged topic originally titled Podio REST api post data. Hello,

I have connect Podio api with skuid and making a post request. The post request requires body parameters to be send as {“limit”:500,“offset”:0}.I am trying to send body parameter under data source as Common Request Body Data


But this is not working.Where am making mistake.and how to pass json data in body parameter? or any other way to do this.


Reply