Project

General

Profile

Bug #11412

Updated by François ARMAND about 7 years ago

Today, there is no way to delete a node property set by datasources, even after we have deleted/disabled the datasource.  

 As a workaround, one can use the "Behavior on 404 : delete" configuration for the data source, by it is just a hack.  

 I propose as a first step to add an api endpoint to delete a datasource property (for a node or for all nodes). We will need a full user story to behavior on what to do when the datasource is deleted, and perhaps an other user story to have some kind of "sudo" super power in the UI to force delete/update a node property, even if it is owned by an other provider.  

 Ex API usage:  

 <pre> 
 # delete on all nodes 
 % curl -k -H "X-API-Token: xxxxxxx" -H "Content-Type: application/json" -X POST 'http://...rudder.../api/latest/datasources/clear/ds_test1' 
 {"action":"clearValueOneDatasourceAllNodes","result":"success","data":"Data for all nodes, for data source 'ds_test1', cleared"} 



 # delete on one node 
 % curl -k -H "X-API-Token: dTxvl4eL8p3YqvwefVbaJLdy8DyEt7Vw" -H "Content-Type: application/json" -X POST 'http://localhost:8085/rudder-web/api/latest/datasources/clear/ds_test1/node/f9a71efb-7c27-11e5-957f-f01faf3ee752' 
 {"action": "clearValueOneDatasourceOneNode","result": "success","data": "Data for node 'f9a71efb-7c27-11e5-957f-f01faf3ee752', for data source 'ds_test1', cleared"} 


 # can not delete for non data source prop 
 % curl -k -H "X-API-Token: xxxxxxxx" -H "Content-Type: application/json" -X POST 'https://...rudder.../api/latest/datasources/clear/test_non_ds/node/f9a71efb-7c27-11e5-957f-f01faf3ee752' 
 {"action":"clearValueOneDatasourceOneNode","result":"error","errorDetails":"Could not clear data source property <- Can not update property 'test_non_ds' on node 'f9a71efb-7c27-11e5-957f-f01faf3ee752': this property is not managed by data sou 

 </pre>

Back