dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38564
Error Posting DataValueSet payload to DHIS2 via Web API
Hi All
I'm trying to upload a dataValueSet payload to DHIS2. The payload structure
is as follows:
{
- "dataSet":"uokZhuVwx5F",
- "completeDate":"2014-06-29",
- "period":"201406",
- "orgUnit":"G4uL7kaWCqS",
- "dataValues":[
1. {
- "dataElement":"N1p2C3w2X2u",
- "value":"1",
- "storedBy":"Farai_Mutero"
}
]
}
The curl command I'm using to post is structured as follows:
curl -d @{local_path}\dataValues.json "http://{ip_address}/api/dataValueSets"
-H "Content-Type:application/json" -u admin:district -v
I have verified the accuracy of the UIDs in the payload and they are
correct. However the error message returned from DHIS2 is as follows:
{"status":"ERROR","description":"The import process failed: Failed to
create
statement","importCount":{"imported":0,"updated":0,"ignored":0,"deleted":0}}
The DHIS2 server version I'm posting to is:
Version:2.19Build revision:16781Build date:2015-05-18 23:21
Can someone please enlighten me on what the error may be?
Regards
--
Farai Mutero
Follow ups