i've inserted some data into database against dataset in dhis2 but it doesn't marked it as completed in "completedatasetregistration" this table of Database. I want to ask about how can i do this using API.
I've tried this one
"$url = "http://64.50.171.246:8080/api/26/completeDataSetRegistrations period=201503 dataSet=Ep9cqvuYYKb organisationUnit=AMaQFVRNoaL storedBy=imported"
but its not working as it shows the status as 'success' but not marked the data set.
i’ve inserted some data into database against dataset in dhis2 but it doesn’t marked it as completed in “completedatasetregistration” this table of Database. I want to ask about how can i do this using API.
Hi Jason,
yeah, i have already read the documentation and i've tried it as well but still its not working. I don't know what the issue is. Kindly guide me.
Thank You.
Regards: Rabbia Naz Ali
···
On 2017-11-22 12:51, Jason Pickering wrote:
Hi Rabia,
Did you have chance to read our documentation about completing data
sets?
On Wed, Nov 22, 2017 at 8:46 AM, <rabbia@pace-tech.com> wrote:
Aoa,
i've inserted some data into database against dataset in dhis2 but
it doesn't marked it as completed in "completedatasetregistration"
this table of Database. I want to ask about how can i do this using
API.
I've tried this one
"$url =
"http://64.50.171.246:8080/api/26/completeDataSetRegistrations [1]
period=201503 dataSet=Ep9cqvuYYKb organisationUnit=AMaQFVRNoaL
storedBy=imported"
but its not working as it shows the status as 'success' but not
marked the data set.
This seems to work fine. I just copied the request from the data entry form on the demo site as a curl command and modified it slightly. There are other ways to do this as well as mentioned in the docs. Otherwise, you should provide the exact request you are making, the exact payload, and the exact response from the server.
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.