Forum Discussion

rahuldhomane's avatar
12-08-2021

Row level data security using Rest API

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

Replies have been turned off for this discussion
  • 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.

    • rahuldhomane's avatar
      rahuldhomane
      ETL

      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
        }
      ]

      • Alek_qbeeq's avatar
        Alek_qbeeq
        Cloud Apps

        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