Single trackedentityAttribute update with web api

(Bayzed) #1

Is it possible to update one trackedentityAttribute with web api rather than whole TEI.

Regards…
Bayzed

1 Like
(Julhas Sujan) #2

Hi @Bayzed,

You can try using the below payload:

https://yourserver/api/trackedEntityInstances
{
“trackedEntityInstances”: [{
“trackedEntityInstance”: “uid”,
“orgUnit”: “uid”,
“trackedEntityType”: “uid”,
“attributes”: [{
“attribute”: “att_id”,
“value”: “att_value”
}]
}, {
“trackedEntityInstance”: “uid”,
“orgUnit”: “uid”,
“trackedEntityType”: “uid”,
“attributes”: [{
“attribute”: “att_id”,
“value”: “att_value”
}]
}]
}
Regards
Julhas

1 Like
(Bayzed) #3

Thanks @julhas but this will remove all other data on that instance. I want to update only one field and other fields need to remain unchanged on a TEI.

Regards…
Bayzed

1 Like