Vaclav
1
Hello,
I am trying to set up “Get one record”.
I am getting response back, but apparently in bad format.
Could you please provide me with a link to the documentation, where it is described how to proceed in this case?
That exclamation sign near to “Data format” says:
Use the input below to transform your API result at your convenience…
Is there any documentation please, how use this section?
Thank you
Vaclav
Hi @Vaclav If you over the tooltip next Data format
It should be explain what is the expected format.
Her you want to configure the getOne
routes, the expected format is a simple object with a least an id
attribute inside.
What I see, you have an array containing this object !
I suggest you to use the code editor
, on the left, to put this code :
return data[0];
After that click on the test
button, all should be ok now.
Let me know if that help.
Vaclav
3
Thank you @Arnaud_Moncel , yes, it helped.
I am wondering if there is any documentation, how to work with the field where is written
return data;
Or which syntax to use here.
Thank you
Unfortunately we don’t have much documentation. The only thing we have is this Install Forest Admin on a REST API - Documentation.
The syntax is JavaScript. Here data
represent the Data recieved
you see in the top right.
Vaclav
5
Ok, thank you @Arnaud_Moncel for you help!
1 Like