Get workbook share permissions

post

/api/20210901/catalog/workbooks/{id}/actions/getSharePermissions

Get share permissions for a workbook with a given ID.

Request

Path Parameters
Supported Media Types
Request Body - */* ()
Root Schema : schema
Type: string
Allowed Values: [ "" ]
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : WorkbookSharePermissions
Type: array
Show Source
Nested Schema : WorkbookSharePermission
Type: object
Show Source
Nested Schema : accountType
Match All
User or ApplicationRole.
Show Source
  • Allowed Values: [ "User", "ApplicationRole" ]
  • User or ApplicationRole.
Nested Schema : permissions
Match All
Workbook share permissions for the account. This property can be omitted when updateMode is DeleteMatchingAccounts.
Show Source
Nested Schema : WorkbookSharePermissionFlags
Type: object
Show Source

400 Response

Bad Request (invalid query parameters, malformed headers, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

401 Response

Unauthorized (missing or expired credentials, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

403 Response

Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

404 Response

Not Found. The requested resource was not found.
Body ()
Root Schema : Error
Type: object
Show Source

500 Response

Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

In this example, you return the share permissions for a workbook with the object ID /shared/Sales/MySalesWorkbook. The Base64URL-safe encoded ID value for this workbook is L3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s.

You can get the ID of a workbook by using Get catalog items by type.

cURL Example:

curl -i \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Length: 0' \
  --request POST 'https://<hostname>/api/20210901/catalog/workbooks/L3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s/actions/getSharePermissions'

Example of Request Body

Not applicable.

Example of Response Body

The response returns an array that details the workbook’s share permissions. This example shows the user Jane Doe has view-only access and users with the Sales application role have both view and edit access.

[
  {
    "accountGuid": "jane.doe@example.com",
    "accountType": "User",
    "accountDisplayName": "Jane Doe",
    "permissions": {
      "view": true,
      "edit": false
    }
  },
  {
    "accountGuid": "Sales",
    "accountType": "ApplicationRole",
    "accountDisplayName": "Sales",
    "permissions": {
      "view": true,
      "edit": true
    }
  }
]
Back to Top