cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Row level data security using Rest API

rahuldhomane
10 - ETL
10 - ETL

I want to fix row level data security using REST API for all the elastic cubes I would be creating. Can someone help me with the exact parameters and REST API request that I need to use?

4 REPLIES 4

irismaessen
11 - Data Pipeline
11 - Data Pipeline

If you are using elasticubes, the API request is {baseurl}/api/elasticubes/datasecurity to set data security on multiple cubes, or {baseurl}/api/elasticubes/{server}/{elasticube}/datasecurity for a single cube.

I would check the REST API documentation within your Sisense instance for an example of what the request should look like. To find the above, you should be looking in the the 0.9 version of the REST API.

I am getting the following error message with the below post request:

----Error---
 
"status": "error",
 
"message": "[object Object]"
}

 

--------Request------

[
 {
    "column": "CLIENT_ID",
    "shares": [
      {
 "party": "rahul.dhomane",      
 "type": "user"
      }
    ],
    "table": "s01_a_n_se_ratig_y_clien.txt",
    "allMembers": null,
    "datatype": "text",
    "members": [
      "0653"
    ],
    "exclusionary": false
  }
]

I've only ever personally used these APIs with the ids of groups as values for "party". Perhaps you need the id of the user instead of the name?

Hi @rahuldhomane 
Please refer to this example:

[
  {
    "allMembers": true,
    "column": "string",
    "datatype": "string",
    "elasticube": "string",
    "exclusionary": true,
    "members": [
      "string"
    ],
    "server": "string",
    "shares": [
      {
        "party": "string",
        "type": "string"
      }
    ],
    "table": "string"
  }
]



According to documentation, party property needs to be UUID/OID of the User or Group entity
Data Security API  
To get the user ID, type prism.user._id in the browser console while logged into sisense.
If you want to get any user id, you can use rest api v1.0 -> GET/users

- Alek