Updating datavalue using API

Dear all

Best wishes for 2018.

I would like to know if it is possible to update (delect or change) data value using API

This is an sql request I want to perform:

  1. UPDATE datavalue SET categoryOptionComboid=IDA Where CategoryOptionComboid=IDB;

  2. DELET from datavalue WHERE categoryoptionComboid =IDB;

How can I have the Same result with API;

I will be thankfull if someone can help me.

Regards