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 Shares
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
| 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 | Defined by the type of folder access. |
| shareId | ID | Unique identifier of the share. |
| shareType | ConnectFolderShareTypeEnum | Defined by the type of folder share. |
| sharedWithId | ID | Unique identifier of the share recipient. |
| sharedWithLabel | String | Label of the share recipient. |
| url | ConnectUri | URL of the share. |
| Type | Description |
|---|---|
| View | View access to the folder. |
| Edit | Edit access to the folder. |
| Manage | Manage access to the folder. |
| 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
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 | Available Version | Values | Description |
|---|---|---|---|---|
| folder | Object | 41.0 | FolderSharesInputRepresentation | Folder 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}