Error requesting /resources.json apiEndpoint in JSON format (v. 2.36.7) [fixed]

Hi there all!

Question: what happened to the /api/resources.json?
And in general is it possible to get the list of actual API points with full descriptions?

Thank you.

HI @Ulanbek (:

Are you able to access /api/resources,json? I’m able to access it on, see image:

Using /api/schemas you’ll be able to view list of all metadata apiEndpoints and more info about the metadata properties. [your-instance-url]/api/schemas
And from the API documentation (Using the API - Introduction - DHIS2 Documentation) you’ll find more details about using these apiEndpoints, filters, explanation with examples…etc

Hope this helps. Thank you!



Hi @Ulanbek, If you mean something like an OpenAPI (Swagger) spec, that is something we have looked at in the past. The DHIS2 API is very large and complex and it’s not trivial to generate a full OpenAPI spec. However, I’m hopeful that we can generate a spec for parts of the API (starting with the metadata endpoints) in the not-too-distant future.

1 Like

Hi @Gassim

Thank you for your quick reply. Currently I am using 2.36.6 and when I tried to get an access to the api/resources.json I got an error

Moreover as you pointed [[your-instance-url]/api/schemas] I couldn’t find any Instance_URL/api/resources.json ApiEndPoint, although the ApiEndPoint exists in XML format Instance_URL/api/resources. So it seems this end point was removed or it must have some parameters to be passed to get resources list in JSON format.

Any ideas?
Thank you
Best, Ulanbek

Hi @phil,

Thank you for your reply. Actually I was wondering to get at least list of existing ApiEndpoints, not that deep as you mentioned. Although it will be useful for the future development as well. So will patiently wait that not-too-distant future :slight_smile:

Thank you @phil


I opened this ticket about an updated OpenAPI Spec (which can be imported to Postman) here: Log in - DHIS 2 JIRA. It is currently in “planned” status.


Cool @chase.freeman !


1 Like

@Gassim , could you check this one DHIS 2 Demo - Sierra Leone
You will get error


It seems the JSON response is causing the error. The Default XML response at the /resources endpoint is working (Play -2.36.7)

1 Like

XML endpoint works - no problems there. But for me more convenient to get results in json format.
Either this is bug, or something wrong internally.


Indeed. I agree with you and it is likely a bug.

1 Like

I agree, it seems to be a bug on 2.36. We will raise an issue.

(P.S. This is probably the wrong thread for discussing issues with 2.36, though! :wink: )

1 Like

@phil I do agree this is wrong place to discuss but we have found the bug :slight_smile:

1 Like

Thanks @Ulanbek, @chase.freeman, and @jaime.bosque ! I’ve moved the discussion to a new topic thread.

@Ulanbek would you like to create a bug issue in please? Thank you! (:

@Ulanbek ,
Have you tried to use the format=json instead of the .json ?
I tried this and I get the results


Thank you @kose for your reply. Yes I know it, but would be more shorter and convenient when you can write direcly api/resources.json

Regards, Ulanbek

@Kose thanks! I forgot completely we could do that… As @Ulanbek we could still create a jira bug issue, would you like me to do it on your behalf? Thanks!

Dear @Gassim,
Thanks for your support and help. Yes, please create the bug report.
Thanks again
Regards, Ulanbek

Is there a bug report for this already?

Thanks for the reminder @german! (:

@here here’s the Jira issue, you can ‘watch’ to receive email updates, and you can add your vote to the issue:

DHIS2-12591 # API resources.json endpoint error v. 2.36.7

Update: @here the issue has been fixed:


1 Like