Newer Version Available

This content describes an older version of this product. View Latest

Folder Shares

Extracts a list of current folder shares (GET), adds new shares (POST), or replaces existing shares (PUT).

Syntax

The following user permissions are needed to access this resource:

  • GET: View Dashboards in Public Folders (for dashboard folders), View Reports in Public Folders (for report folders)
  • POST/PUT: Manage Dashboards in Public Folders (for dashboard folders), Manage Reports in Public Folders (for report folders)
URI
/services/data/v41.0/folders/<folderId>/shares
Formats
JSON
HTTP methods
Method Description
GET Returns a list of current folder shares.
PUT Creates new shares to replace the existing shares in the share list for the folder.
POST Creates new shares and appends them to the existing share list for the folder.
Parameters
Parameter Description
folderId Perform the operation for this unique folder ID.

GET

Response Body
Property Type Description
accessType ConnectFolderAccessTypeEnum Type of access: View, Edit, or Manage
shareId ID Unique identifier of the share.
shareType ConnectFolderShareTypeEnum Type of share. The following are the supported share types.
  • Group. Users in a specified public group.
  • Role. Users with a specified role.
  • RoleAndSubordinates. Users with a specified role and users with a role subordinate to that role.
  • RoleAndSubordinatesInternal. Users with a specified role and users with a role subordinate to that role, except public portal users.
  • Organization. All internal users.
  • AllPrmUsers. All PRM Portal users.
  • User. The specified individual user.
  • PartnerUser. The specified individual user of a partner portal.
  • AllCspUsers. All Customer Success Portal users.
  • CustomerPortalUser. The specified individual user of a customer portal.
  • PortalRole. Users with a specified role in a portal.
  • PortalRoleAndSubordinates. Portal users with a specified role, and portal users with a role subordinate to that role.
  • ChannelProgramGroup. PRM Portal users who are members of the specified channel programs and levels group.
sharedWithId ID Unique identifier of the share recipient.
sharedWithLabel String Label of the share recipient.
url ConnectUri URL of the share.
Status Codes
Condition Code Payload
Success 200 FolderShareCollectionRepresentation
Missing perm 403 [ { "errorCode" : "FUNCTIONALITY_NOT_ENABLED", "message" : "<message>]"}]
No such folder, Unsupported folder type, Unauthorized (missing access on a specific folder) 404 [ { "errorCode" : "<errorCode>", "message" : "<message>" } ]
Output Example 1

Sample raw response for a folder not shared with anyone.

1{
2	“shares” 		: []
3}
Output Example 2

Sample raw response for a folder shared with two users and a public group.

1{
2"shares" : [ {
3  "accessType" : "view",
4  "shareId" : "0AFR00000004LtpOAE",
5  "shareType" : "group",
6  "sharedWithId" : "00GR0000000Mi1nMAC",
7  "sharedWithLabel" : "Demo Group",
8  "url" : "/services/data/v41.0/folders/00lR0000000MQT5IAO/shares/0AFR00000004LtpOAE"
9}, {
10  "accessType" : "edit",
11  "shareId" : "0AFR00000004LtkOAE",
12  "shareType" : "user",
13  "sharedWithId" : "005R0000000Kg8yIAC",
14  "sharedWithLabel" : "Brian Alison",
15  "url" : "/services/data/v41.0/folders/00lR0000000MQT5IAO/shares/0AFR00000004LtkOAE"
16}, {
17  "accessType" : "manage",
18  "shareId" : "0AFR00000004LtlOAE",
19  "shareType" : "user",
20  "sharedWithId" : "005R0000000Kg8cIAC",
21  "sharedWithLabel" : "Fred Williamson",
22  "url" : "/services/data/v41.0/folders/00lR0000000MQT5IAO/shares/0AFR00000004LtlOAE"
23} ]
24}

PUT/POST

Request Body
Query Param Name Group Since Values Description
folder Object 210 FolderSharesInputRepresentation Folder input representation containing a list of shares.
Status Codes
Condition Code Payload
Success 200 FolderSharesInputRepresentation
Missing perm 403 [ { "errorCode" : "FUNCTIONALITY_NOT_ENABLED", "message" : "<message>]"}]
No such folder, Unsupported folder type, Unauthorized (missing access on a specific folder) 404 [ { "errorCode" : "<errorCode>", "message" : "<message>" } ]
Sample Request Body
1{
2"shares" : [ {
3  "accessType" : "view",
4  "shareType" : "group",
5  "shareWithId" : "00GR0000000Mi1nMAC"
6}, {
7  "accessType" : "edit",
8  "shareType" : "user",
9  "shareWithId" : "005R0000000Kg8yIAC"
10}, {
11  "accessType" : "manage",
12  "shareType" : "user",
13  "shareWithId" : "005R0000000Kg8cIAC"
14} ]
15}