← Back to team overview

dhis2-users team mailing list archive

Re: Error Deleting TEI with WebAPI in 2.22

 

Hi Alex,

That is what the error message suggests, I guess the underlying question
was the how in light of the prescribed Json format:

{"trackedEntityInstances": [ { "trackedEntityInstance": "ID1" }]}


regards,

Sam Kasozi
+256 788-993-565
Skype: sam.kasoziug

On Fri, May 6, 2016 at 8:26 PM, Alex Tumwesigye <atumwesigye@xxxxxxxxx>
wrote:

> Dear Sam,
>
> Please specify  trackedEntity in your json.
>
> Alex
>
> On Fri, May 6, 2016 at 5:49 PM, Sam Kasozi <kasozis@xxxxxxxxx> wrote:
>
>> 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
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Alex Tumwesigye
>
> Technical Advisor - DHIS2 (Consultant),
> Ministry of Health/AFENET  | HISP Uganda
> Kampala
> Uganda
> +256 774149 775, + 256 759 800161
> Skype ID: talexie
>
> IT Consultant (Servers, Networks and Security, Health Information Systems
> - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant
>
>
> "I don't want to be anything other than what I have been - one tree hill "
>

Follow ups

References