How to change dashboard sharing via API

Hi,
I’ve tried to change the sharing settings of several dashboards with the API Explorer.
First, I execute a “GET /dashboards/{id}/sharing” with a dashboard ID, where the sharing settings are correct. The result looks like the following:
{
“anyone”: null,
“users”: {},
“groups”: {
“local.AdminGroup”: “editor”
}
}

Now I want to update a dashboard with “PATCH /dashboards/{id}/sharing”.
If i copy/paste the code above, I get an error, that the group ID is not found.
{
“message”: “All updates were unsuccessful or invalid”,
“failures”: [
{
“action”: “permission_change”,
“id”: “local.AdminGroup”,
“reason”: “Invalid user or group”
},
{
“action”: “set group permissions”,
“id”: “all groups”,
“reason”: “‘local.AdminGroup’ is not a valid user or usergroup name”
}
]
}

The group ID is correct, as you can see it in the GET example above.
Any ideas on this one?

There’s a community-driven ExtraHop Chrome browser plugin that can help with that.

This is not an ExtraHop supported plugin, so use 'as-is '. But should be able to transfer dashboard ownership quickly. HTH

I am trying to do the exact same thing using Powershell programmatically for a script I am developing to make this a little more streamlined as we promote Dashboards up for full viewing. I am unfortunately running into the same problem even though the JSON format is correct. Is this a bug in the latest release?

I ran a quick test and see similar behavior. We’ll look into this further.

1 Like

Thanks, I look forward to hearing what you find out!

An update here, @buddyedwards1975 and @khohenbichler—this was a defect that will be addressed in the next 8.0 hotfix release.

The correct behavior once fixed will be that you have to prepend ‘local.’ or ‘remote.’ to the group name. In current releases, prepending ‘local.’ is being incorrectly rejected, as you’re finding.

perfect, thx!