Inserting data into datatable via API

Has anyone had experience of using sdk to insert data into data table. I am not able to locate documentation on the format of the request body

Edit: Sorry, I just realized that the API isn't properly documented. The contract type is just "object" so you would have no way to know how to use it. Let me check with the dev team to get an answer and I'll file a bug to get these APIs documented correctly.


Look for the functions with Datatable in the name.

Yeah, unfortunately the values in a DatatableRow aren't strongly typed which makes for an ugly SDK contract. There are some things that can be done (including better documentation) and we're created an Issue in the tracking system to address that.

In the mean time, the correct thing you should be doing here to make this work is to be supplying a JSON body with an object that looks like the table row you want to have - including string/number/boolean/null JSON data types. (Also a 'key' is required).
So for example the body could be:

{
"VINNumber": "XXXXYZZY",
"New Car": false,
"Comments": null,
"year": 1994
"KEY": "27272"
}

(Note that your 'key' field must be a STRING type only).

Does that make sense?

That does make sense. The important bit being the key field. Once I had that I was able to perform the inserts

Cheers

Mike

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.