API call to get value for each category without specifying the categories

Hi, I am working with a country that modified the age/sex categories for their monthly health facility data. The dataElements are the same, but the categories changed. The problem arises when one wants to request the data for periods when the original categories were used. The current categories are available in the pivot table app by selecting details, but the previous ones are not. Thus, it is only possible to get totals for the older data.

I wonder if one potential solution lies with the API syntax. Typically, I request the specific codes for each dataElement.categoryOptionCombo like this:


Unfortunately, the historic categoryOptionCombos are not visible, so it is not possible to request that data. However, I note that one does not need to know all the orgUnit codes in order to request the data for each orgUnit. By virtue of the “LEVEL-4” in the example above, the request will return data for each orgUnit at LEVEL-4. Is there a similar way of requesting all of the categoryOptionCombos? Something perhaps like dimension=dx:skCpTGEd2F6.[all]?

The developers manual is very useful for developing API calls, but I suspect there are some endpoints not covered there and I have not seen a way to do what I am looking for. Does anyone know if this is possible? Apologies if I missed it. Also, please let me know if there are other solutions to consider.

I know of several countries that have either recently changed their categories, or are considering it, and it would be a shame for them to not be able to access their historic detailed data. (Note: by some guesswork, I was able to find the historic categoryOptionCombo codes, but this may not always be possible and the general problem remains. There should be an easy way to recall all detailed data).

All the best, John