Folder Shares

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

The following user permissions are needed to access this resource.

POST/PUT:

  • Manage access to the folder

GET:

  • View access to the folder

Syntax 

URI: /services/data/v41.0/folders/<folderId>/shares

Formats: JSON

HTTP methods

MethodDescription
GETReturns a list of current folder shares.
PUTCreates new shares to replace the existing shares in the share list for the folder.
POSTCreates new shares and appends them to the existing share list for the folder.

Parameters

ParameterDescription
folderIdPerform the operation for this unique folder ID.

GET 

Response Body

PropertyTypeDescription
accessTypeConnectFolderAccessTypeEnumDefined by the type of folder access.
shareIdIDUnique identifier of the share.
shareTypeConnectFolderShareTypeEnumDefined by the type of folder share.
sharedWithIdIDUnique identifier of the share recipient.
sharedWithLabelStringLabel of the share recipient.
urlConnectUriURL of the share.

ConnectFolderAccessTypeEnum

TypeDescription
ViewView access to the folder.
EditEdit access to the folder.
ManageManage access to the folder.

ConnectFolderShareTypeEnum

TypeDescription
GroupUsers in a specified public group.
RoleUsers with a specified role.
RoleAndSubordinatesUsers with a specified role and users with a role subordinate to that role.
RoleAndSubordinatesInternalUsers with a specified role and users with a role subordinate to that role, except public portal users.
OrganizationAll internal users.
AllPrmUsersAll PRM Portal users.
UserThe specified individual user.
PartnerUserThe specified individual user of a partner portal.
AllCspUsersAll Customer Success Portal users.
CustomerPortalUserThe specified individual user of a customer portal.
PortalRoleUsers with a specified role in a portal.
PortalRoleAndSubordinatesPortalRoleAndSubordinates. Portal users with a specified role, and portal users with a role subordinate to that role.
ChannelProgramGroupPRM Portal users who are members of the specified channel programs and levels group.

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 NameGroupAvailable VersionValuesDescription
folderObject41.0FolderSharesInputRepresentationFolder input representation containing a list of shares.

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}