Creating Questions using APIs

I am trying to use the APIs to create a new library question, the Idea is that I have a list of entities in my system and I want to create a select-one question in the library with the values from the list of entities that I have in the system instead of writing those values by hand and making mistakes.

Can you please point me to the correct API and what is the payload for that API to create the question.

Thanks

Welcome,
Another option might be to extract your items into Excel and put/copy (and edit?) them into a choice list in an XLSForm (.xlsx file) and upload this to KoBo.
You might also use/refernce an external file with the item list in your form.

1 Like

Thanks for the reply, that is one option, but I prefer doing it using APIs since I am going to create many controls (one for each group) and there is also the possibility of updating that list (adding/removing)

Hi @mhand7, this is possible and you can refer to the thread here for some guidance:

2 Likes

@Josh Thanks for the help, it helped me a lot to create the question.

Just a note for the future, do not forget to add ?format=json to receive a meaningful response.
so the API will be https://kf.kobotoolbox.org/api/v2/assets/?format=json

2 Likes