500 error while accessing forms kobo REST API

Hi.
We are facing inconsistent behavior while accessing kobo forms API. API e.g as below,
https://kobodb.mycompany.com/api/v1/forms
Above API returns all forms from the kobo server. The error we got while accessing API as below,

 500 Error
If this is a significant error that needs to be fixed, please send a support request to support@kobotoolbox.org with information about what triggered this error.

We are able to access https://kobotoolbox and able to create the form as well as submission history.

Welcome to the community, @Rajendra! Seems like you are trying this out in a self-hosted server? Could you try this in one of the publicly hosted servers (to see if it behaves in the same way)?

@Kal_Lam We can’t do that… our environment is on self-hosted. We can’t test it due to data sensitivity. Is there anything else on which we can focus to get it fixed?

Hi @Rajendra, if you are facing inconsistent behaviour with the endpoint, it may be due to the request timing out if you have many forms and insufficient server resources for the load. Perhaps you can try using the v2 assets endpoint with a query limit? Something like:

https://kf.kobotoolbox.org/api/v2/assets.json?limit=100
1 Like