Option value cannot be reset from API

The DHIS2 data entry page option value drop down value can be deleted by pressing the cross button like following screen -

Screenshot 2021-04-21 205456ppp

The same thing we tried to achieve using API does not work -

API call POST URL: http://domain/api/dataValueSets.json
JSON:
{
“dataSet”: “oTgCLoG5OkY”,
“period”: “202011”,
“orgUnit”: “QaKFcnthE5N”,
“dataValues”: [
{
“dataElement”: “lMVSpV05xPP”,
“categoryOptionCombo”: “AKEt2SmXK0Q”,
“attributeOptionCombo”: “HllvX50cXC0”,
“deleted”: true,
“value”: null
}
]
}

Any help would be appreciated.

@Gassim @debora @austin - can anyone answer this?

1 Like

@Mahmud Sorry for the delay in the response. Which version is this?

1 Like

2.35

@Mahmud Please check this Web API - DHIS2 Documentation And see if it helps you to delete the individual data values using the mentioned API.
Let us know how it goes.

A side note is that, you can always use the Browser Inspection (The Network tab in Chrome for example) to see what API is being invoked when you perform an action (a click) on a page.

1 Like