Getting this 409 error when I call an API to pull lastUpdated organisationUnits from DHIS2 version 2.35.5:
{"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Unfiltered access to metadata export requires super user or 'F_METADATA_EXPORT' authority."}
Just recently started coming up , likely after the DHIs2 version was updated.
Is it that the user I am using to pull the data via the api does not have the F_METADATA_EXPORT authority?
Thank you @Gassim . Yes indeed the user I am using does not have that F_METADATA_EXPORT authority in their list of authorities. This means I either use a super user account to grant this current user this authority or use the su account credentials for the data pull?
Also what does unfiltered access mean in this case, as I see there is a filter in the api call that filters by the lastUpdated date?
There is a parameter called ‘filter’; for example, filter=metadataObject:eq:value, and this filter means it will not retrieve all information at once but only those that match the filter whereas the lastUpdated is used to order not “filter”. It will retrieve all data by the order of lastUpdated without filter.
Thank you for your patience @ndethi! I was experimenting on my own and reading through the docs but then a quick search in the community of practice I found that a similar question has been asked before with a solution: