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
-
id(required): string
Catalog item ID in base64url format.
Supported Media Types
- */*
Response
Supported Media Types
- application/json
200 Response
Successful operation
400 Response
Bad Request (invalid query parameters, malformed headers, and so on).
Root Schema : Error
Type:
Show Source
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
Unauthorized (missing or expired credentials, and so on).
Root Schema : Error
Type:
Show Source
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
403 Response
Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Root Schema : Error
Type:
Show Source
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
Not Found. The requested resource was not found.
Root Schema : Error
Type:
Show Source
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
500 Response
Internal Server Error. The server encountered an unexpected condition
preventing fulfilment of the request.
Root Schema : Error
Type:
Show Source
object-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
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
}
}
]