← Back to team overview

dhis2-devs team mailing list archive

Error Deleting TEI with WebAPI in 2.22

 

I want to delete a TEI in 2.22 with the following details
(trackedEntity="XV3kldsZq0H" & trackedEntityInstance="an1MP0brTkC") using

curl -X POST -d "{\"trackedEntityInstances\":
[{\"trackedEntityInstance\":\"an1MP0brTkC\"}]}" -H "Content-Type:
application/json" -u sam:*** "https:// ...
/api/trackedEntityInstances?importStrategy=DELETE"

However it returns the following Error message:

{"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"An
error occurred, please check import summary.",
"response":{"responseType":"ImportSummary","status":"ERROR","importCount":{"imported":0,"updated":0,"ignored":1,"deleted":0},
"conflicts":[{"object":"TrackedEntityInstance.trackedEntity","value":"Missing
required property trackedEntity"}]}

Is something wrong in the Json syntax?

Regards,

Sam Kasozi
+256 788 993565 | Skype: sam.kasoziug

Follow ups