cancel
Showing results for 
Search instead for 
Did you mean: 

REST API: How to replace a datasecurity rule for live elasticube

waldbaer
7 - Data Storage
7 - Data Storage

Hi there,

in https://sisense.dev/guides/restApi/v1/#/elasticubes/addDataContextForLiveElasticube for the dataContext you can read

> If exact same shares array exits for table and column, then rule will be overwritten

What exactly does "exact same shares array" mean?

I retrieved all rules for a given data model with https://sisense.dev/guides/restApi/v1/#/elasticubes/getDataContextForLiveElasticube, then picked one rule and sent it to the POST route with changed members.

I tried a shares array entry with and without partyName property when sending.

The result was added rules instead of the existing rule replaced.

Version: L2023.1.0.184

1 REPLY 1

SamAlbertCSM
Sisense Team Member
Sisense Team Member

This is a POST API, which are designed to only add, not modify or delete, data on a server. This is true and makes sense for the use case, data security rules should be granular enough to allow users to see distinct values in a columnHowever, this line If exact same shares array exits for table and column, then rule will be overwritten was meant to be deleted from the swagger docs. We are still checking internally here but  If you want to implement this behavior, they need to leverage either the following apis in their workflow
PUT /elasticubes/live/datasecurity/{dataSecurityId}
or
DELETE /elasticubes/live/datasecurity/{dataSecurityId}