DHIS2 completeDataSetRegistrations API

The following JSON payload works in Query Playground and also in Mutation API call inside DHIS2 web app running under v2.35 -

{
“resource”: “completeDataSetRegistrations”,
“type”: “create”,
“data”: {
“completeDataSetRegistrations”: [
{
“dataSet”: “xfMFBphI2b4”,
“period”: “202101”,
“organisationUnit”: “mMbmIv58JVn”,
“completed”: false
}
]
}
}

The call resets the complete flag of a dataset, facility and period.

Now, when we run the same app in DHIS2 1.31.9, the query fails. We found that the internal mechanism of the above API call is different in 1.31.9, it uses DELETE instead of POST, and Completed parameter is not present.

We are struggling to find the proper JSON payload to reset Complete flag in the app under DHIS2 1.31.9 executed via Mutation API call.

Any idea?

I think the api changed you have the field “completed”: true/false
that you update, and so don’t delete anymore the completeDataSetRegistration

Most of the time what I do is going in the screen using the feature, looking at the network view and see requests going to dhis2 api to deduce what I should do.

Never used the query playground and mutation api but you might like the Taskr app with js snippets DHIS2 App Hub

As I mentioned, we have seen what v2.31.9 is doing when we Uncomplete - it sends DELETE instead of POST. And we cannot make the DELETE to work with Mutation API.

Anyone from DHIS2 dev team reading this?

@Scott or anyone from dev team can help?