curl --location 'https://mydomain.cloud.gooddata.com/api/v1/actions/workspaces/<workspace_id>/analyticalDashboards/<dashboard_id>/managePermissions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '[
{
"assigneeIdentifier": {
"id": "bright_funds_dashboard_viewers",
"type": "userGroup"
},
"permissions": ["VIEW"]
}
]'
Usually results in a 400 bad request error:
{
"detail": "[Path '/0'] Object has missing required properties ('id','type')",
"status": 400,
"title": "Bad Request",
"traceId": "c32ef6d240a5fcd0"
}
but if I mash the button enough times it seems to work /shrug.
Also note the json payload documented here: https://www.gooddata.com/developers/cloud-native/doc/cloud/api-and-sdk/api/api_reference_all/#operation/manageDashboardPermissions
Does not match the format of the json payload documented here: https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-organization/manage-permissions/set-permissions-for-dashboards/
asignee vs assigneeIdentifier - assigneeIdentifier - I tried both.
Also, I swear I’ve seen this intermittently work so I believe I’m formatting the request properly.
Best answer by Moises Morales
View original