Complete DataSet Registration

This Topic is very old but new comers may get some lesson.
I had same issue and way i solved the issue is as follows:
Step 1: Create a json File as shown below:
{ "completeDataSetRegistrations": [ { "dataSet": "datasetID", "period": "201101", "organisationUnit": "orgUnitID", "completed": true } ]}
Step 2: use the following Command in terminal or CMD inside the directory where your JSON file is located.
curl -d @fileName.json "serverAddress/api/completeDataSetRegistrations" -H "Content-Type:application/json" -u admin:district

i used admin:district as it’s universilly used as username and password for DHIS2.

4 Likes