Adding DataSecurity via REST API results in unknown error
Attempting to use the API to manage my datasecurity and following this example results in an unknown error.
https://support.sisense.com/hc/en-us/articles/230650668
Is there an updated way to do this that doesn't result in an error?
{ "status": "error", "message": "unknown error occurred" }
-
Hey Eric,
That documentation is a little out of date. There is a party as well as partyName that has to be populated.
Example Payloads:
[
{
"allMembers": null,
"column": "SalesOrderId",
"datatype": "numeric",
"members": [
"1"
],
"shares": [
{
"party": "5c746cc422059c1f48ed82c6",
"partyName": "ElliottAPITest@testuser.com",
"type": "user"
}
],
"table": "Fact Sales"
}
]
Also supports multiple users at a time:
[
{
"allMembers": null,
"column": "SalesOrderId",
"datatype": "numeric",
"members": [
"1"
],
"shares": [
{
"party": "5c746cc422059c1f48ed82c6",
"partyName": "ElliottAPITest@testuser.com",
"type": "user"
}
],
"table": "Fact Sales"
},
{
"allMembers": null,
"column": "SalesOrderId",
"datatype": "numeric",
"members": [
"2"
],
"shares": [
{
"party": "5c746cc422059c1f48ed82c7",
"partyName": "ElliottAPITest2@testuser.com",
"type": "user"
}
],
"table": "Fact Sales"
}
]
Hope this helps.
Best, Elliott
-
Hi Eric, you can find a detailed tutorial on the Data Security API as well as a Powershell code example here: https://developer.sisense.com/display/API2/Data+Security+API
Please sign in to leave a comment.
Comments
2 comments