API fields - Inspector and building queries

REST api’s are enabled in some eramba sections, out documentation aims to explain how to use them but you need to be a bit of a developer to use them in full, that is because we dont document:

1/ the type of field (integer, string, etc)
2/ whether is mandatory or not

documenting this in a system that changes so much and has a small team like us is a killer, but that does not mean you cant find that by yourself.

  • the parameters for a section can easily be identified by inspecting the POST parameters sent to eramba, this video shows how to do that with Chrome inspector.

video: https://drive.google.com/file/d/1Xutt9ZKCFQeVXggUKOoW8e1cAmgA94la/view?usp=sharing

  • if the parameter is mandatory or not, simply click “add” on the sectoin you want to try and before oyu complete any field simply click “save” , eramba wlil tell you what parameters on the form are mandatory

  • as the type of field, eramba has two types over JSON: string and integer … if the field is a dropdown you will use an integer, otherwise is a string. how long or short that is defined in multiple places but generally speaking is 100 characters for the title and much more for the text (i think that will be limited by mysql type text).


In the case you want to select more than one value on the field (drop down) then of course you need to send an array on the json.

I hope this helps , we got some interesting API questions this week and we thought this might be helpful

1 Like