This is something that I am sure is possible, but I can’t quite seem to get working.
tl;dr:
I have a RESTful webservice set up (and all that works, Querying/Inserting etc.) but in order to do so, I had to “add” all the fields to the REST model in Skuid myself.
This was ok for the proof of concept I was delivering, but now I need to take this to the next level, and a requirement is that should the responses definition change on the service, Skuid needs to “easily” take these new fields into account.
It sounds daft, but I am sure at some point in the past, I used the Skuid REST Model builder to somehow “unpick” the service results and create a bunch of fields for me, can anyone prompt me as to how this is done?
Loads more detail:
So it’s actually a Salesforce REST webservice I am contacting.
And lets say it has an inner class return type like so:
I can then define my REST data source, similar to so:
And this all “works” for GETting and POSTing data to and from my webservice (I know there is no Insert/Update method in that screenshot! They are dummies). But like I said, I had to create the fields “billNo” and “billAmt” on the model myself.
If I look at the fields list (prior to creating them by hand) I literally get blank:
and this makes me wonder, because if I “break” my REST model (change the service call or settings etc) I do get this:
So it looks like the field list is _trying _to load some fields, and not getting any.
My GET method does return void because I put my payload in the response body, as serialised JSON… but even if I give it a return type and throw back one of my objects, I cannot seem to get Skuid to deduce the fields in the response.
Things I don’t know about - do I need to define a POST (be it a Query or Insert) method on the Skuid model? Do I need to return from my GET, am I making my responseBody wrong? (it’s totally standard RESTful JSON) do I need to tell Skuid how to interpret the response…? is it more complicated than that even?!!
I am aware of this “Path to Contents” field… but when I pop that out - there are no fields to select, because - likewise - I don’t think Skuid is working out the response it’ll be getting from this service.
Any input very welcome. I consider myself pretty well Skuid and programming experienced, so feel free to go hard on the terminology and concepts