Hi!
I want to be able to fetch visualizations from the metadata API, perform modifications programmatically and post the modified objects to DHIS2 via the API as new visualizations. However, when performing post requests to the visualization endpoint, the new visualisations lack dataDimensionItems, organisationUnits, periods etc. as well as the columnDimensions, rowDimensions and filterDimensions fileds. This leads to empty visualizations in practice. Why is this?
I could use the metadata endpoint instead, but in that case, I have sometimes struggled to get the correct sharing settings for the posted objects when performing post requests to the metadata endpoint. What is the intended method for posting metadata to DHIS2? Is it better to use the metadata endpoint in general, or am I correct in assuming that I should generally use the specific endpoints for specific metadata types (like visualizations)?
Best regards, August Mathisen
1 post - 1 participant