Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Folder Share Recipients
Return a list of folder share recipients.
The following user permissions are needed to access this resource:
- View access to the folder
Syntax
URI: /services/data/v41.0/folders/<folderId>/share-recipients?shareType=<shareType>
Formats: JSON
HTTP methods
| Method | Description |
|---|---|
| GET | Returns a list of recipients with whom the folder can be shared. |
Parameters
| Parameter | Description | Default |
|---|---|---|
| folderId | Return data for this unique folder ID. | |
| shareType | Return data for the recipients of the specified type, such as user, group, or role. | User |
| searchTerm | Search to match share recipients names. | “ ” |
| limit | Limit to the number of search results. | 100 |
GET
Response Body
| Property | Type | Description | Default |
|---|---|---|---|
| shareRecipients | List<FolderShareRecipientRepresentation> | List of recipients along with their share type. | |
| shareType | ConnectFolderShareTypeEnum | Defined by the type of folder share. | |
| shareWithId | ID | Return the URL for share recipients. | |
| shareWithLabel | String | Label of the folder share recipient. |
| Parameter | Type | Available Version | Description |
|---|---|---|---|
| shareWithId | ID | 41.0 | The ID of the folder share recipient. |
| shareWithLabel | String | 41.0 | The label of the folder share recipient. |
| shareType | ConnectFolderShareTypeEnum | 41.0 | The share type of the recipient. |
| imageUrl | ConnectUri | 42.0 | The url of the image for the recipient. |
| imageColor | String | 42.0 | The color of the image for the recipient. |
| Type | Description |
|---|---|
| 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 | 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. |
Output Example 1
Get share recipients of type user.1/services/data/v41.0/folders/00lR0000000MQT5IAO/share-recipients?shareType=User
2
3{
4"shareRecipients" : [ {
5 "shareType" : "user",
6 "shareWithId" : "005R0000000Kg8wIAC",
7 "shareWithLabel" : "Hank Chen"
8}, {
9 "shareType" : "user",
10 "shareWithId" : "005R0000000KkU6IAK",
11 "shareWithLabel" : "Integration User"
12}, {
13 "shareType" : "user",
14 "shareWithId" : "005R0000000Kg8xIAC",
15 "shareWithLabel" : "Nadia Smith"
16}, {
17 "shareType" : "user",
18 "shareWithId" : "005R0000000Kg8zIAC",
19 "shareWithLabel" : "Sarah Vasquez"
20} ]
21}Output Example 2
Search for share recipients of type Public Group, with search term Group.1/services/data/v41.0/folders/00lR0000000MQT5IAO/share-recipients?shareType=Group&searchTerm=Group
2{
3"shareRecipients" : [ {
4 "shareType" : "group",
5 "shareWithId" : "00GR0000000EypUMAS",
6 "shareWithLabel" : "Finance"
7}, {
8 "shareType" : "group",
9 "shareWithId" : "00GR0000000EypeMAC",
10 "shareWithLabel" : "Marketing"
11}, {
12 "shareType" : "group",
13 "shareWithId" : "00GR0000000NvpIMAS",
14 "shareWithLabel" : "Products"
15}, {
16 "shareType" : "group",
17 "shareWithId" : "00GR0000000EypZMAS",
18 "shareWithLabel" : "Sales"
19}, {
20 "shareType" : "group",
21 "shareWithId" : "00GR0000000EypjMAC",
22 "shareWithLabel" : "Technology"
23} ]
24}