Quantcast
Channel: DHIS2 Community - Latest topics
Viewing all articles
Browse latest Browse all 1855

Breaking change in dataValueSets.csv API return value

$
0
0

We have been using the following API for a few years to get data from DHIS2 into an external system and do further processing, which is called every hour to get incremental updates -

https://******/api/dataValueSets.csv

When it was 2.36.x - if you look at the following image, the last field in each row was ‘deleted’, which is kept BLANK (or not supplied) when the row is a new data entry, and it has a value of ‘true’ if it is a deleted value. Means, if a person enters 20 first time, and then deletes 20 and enters 30 - DHIS2 generates 3 lines - one for 20 with deleted field empty, one for 20 with deleted ‘true’ and another for 30 with deleted empty. This helps us to sync the data properly.

Picture1

Now, in 2.4, the API CSV format changed to –

Picture2

Now, the ‘deleted’ column is always present. For the deleted rows it has ‘true’, and for the rows which are new entry it has value ‘null’. And this broke the sync function.

As our data transfer function did not expect value other than ‘true’ in the deleted column - the new rows are not handled and sync started failing.

Maybe this was mentioned in version Whats New documentation. Just curious to know, was the breaking change in API intentional? Comments from the dev team will be highly appreciated.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1855

Trending Articles