Put /api/v3/dashboard/{dashboardId}/share

Operation: EditDashboardShareV3

Summary

Update the shared users and user groups for a dashboard
To remove sharing completely set SharedWithEveryone to false, SharedUserIds to [], and SharedUserGroupIds to []
You must have created the dashboard and have SharedDashboardsOrMaps Create permission
or have DashboardAdministrator Manage permission and the dashboard must be shared at all
or have DashboardAdministrator Manage permission and the dashboard is public

Path and Query Parameters

Parameter Description Type Location
dashboardId Dashboard IdentifierRequired integer Path

Request Body Parameters

Content-Type: application/json

Type Reference: ShareRequest

Parameter Description Type
sharedWithEveryone Set to True to share the item everyone
When true, SharedUsers and SharedUserGroups should be set to empty lists [] Required
boolean
sharedUserIds The list of individual user ids an item should be shared with
Should be an empty list [], when SharedWithEveryone is true Required
array
sharedUserGroupIds The list of user group ids an item should be shared with
Should be an empty list [], when SharedWithEveryone is true Required
array

Request Body

{
  "sharedWithEveryone": false,
  "sharedUserIds": [
    1
  ],
  "sharedUserGroupIds": [
    1
  ]
}

Response Parameters

HTTP 200


Body Parameters

Content Type: application/json

Type Reference: ShareResponse

Parameter Description Type
sharedWithEveryone True if the item is shared with everyone boolean
sharedUsers The list of individual users an item has been assigned to be shared with
This does NOT take into account users that are in a shared user group
UserChild [Array]
   userId The user identifier integer
   userCode The user code string
   fullName The user’s full name string
sharedUserGroups The list of user groups an item has been assigned to be shared with UserGroupChild [Array]
   userGroupId The user group identifier integer
   userGroupName The user group name string

Responses

HTTP 200

Body

Content Type: application/json
{
  "sharedWithEveryone": false,
  "sharedUsers": [
    {
      "userId": 1,
      "userCode": "string",
      "fullName": "string"
    }
  ],
  "sharedUserGroups": [
    {
      "userGroupId": 1,
      "userGroupName": "string"
    }
  ]
}