REST API Table update

Ron28
Mega Sage

I'm doing a table update from a Node.js script using Axios, which appears to work however the data format in the table appears to change from what was sent as a stringified JSON object, to a mix between object and xml. 
In the table, the column where the object goes is defined as a string. The highlighted line is one that was added via REST API (incorrect format), the others manually added (correct format).
The table where the REST API is adding a record is in an application scope.

Screenshot.jpg
No matter what I try, my data always looks like "var=value" rather than {"var":"value"}    - Any idea what causes this? And what to do to fix it so the REST API update adds the string sent rather than updating it?

Thanks

Ron

1 ACCEPTED SOLUTION

Ron28
Mega Sage

Worked it out after many hours. The 'Body' object in the REST API trigger threw me. The Body object is not passed from the axios post, but CONTAINS the object passed. In the REST API under Body I defined a 'data' key with  a string value, then on the client end passed a 'data: JSON.strigify(json)' parameter. 

View solution in original post

1 REPLY 1

Ron28
Mega Sage

Worked it out after many hours. The 'Body' object in the REST API trigger threw me. The Body object is not passed from the axios post, but CONTAINS the object passed. In the REST API under Body I defined a 'data' key with  a string value, then on the client end passed a 'data: JSON.strigify(json)' parameter.