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 Operations

Enables renaming, deleting, and obtaining information on report and dashboard folders.

The following user permissions are needed to access this resource.

GET:

  • View access for the folder

PATCH/DELETE:

  • Manage access for the folder

Syntax

URI: /services/data/v43.0/folders/<folderid>

Formats: JSON

HTTP methods

Method Description
GET Gets information about the folder that has the specified folder ID.
PATCH Updates the label or name of the folder with the specified folder ID.
  • All users with manage access on the folder can change the folder label.
  • Only admin users can change the folder name.
DELETE Deletes the folder that has the specified folder ID.

Parameters

Parameter Description
folderId Specifies a unique folder ID.

GET

Gets information about the folder that has the specified folder ID.

/services/data/v43.0/folders/<folderid>

Output Payload

FolderDetailRepresentatiion

FolderDetailRepresentatiion

Field Type Available Version Description
id String 42.0 Unique folder identifier.
label String 42.0 Folder display name.
name String 42.0 Folder unique name.
namespace String 42.0 Namespace prefix to differentiate custom object and field names from those in use by other organizations.
type ConnectFolderTypeEnum 42.0 Defined by the type of entity the folder contains.
parentId ID 43.0 ID of the parent folder.
url ConnectUri 43.0 URL of the folder:

/services/data/v43.0/folders/<folderid>

childrenUrl ConnectUri 43.0 URL that represents the first level subfolders of the specified folder:

/services/data/v43.0/folders/<folderid>/children

depth Integer 43.0 Depth of the folder in the tree. A folder with depth 0 is the root folder.
supportedShareTypess List <supportedShareTypes> 43.0 List of supported share types for the folder in the organization.
sharesUrl ConnectUri 43.0 URL of the shares for the particular folder:

/services/data/v43.0/folders/<folderid>/shares

shareRecipientsUrl ConnectUri 43.0 URL of the recipients of the share:

/services/data/v43.0/folders/<folderid>/share-recipients

ancestors List <FolderSummaryRepresentation> 43.0 This folder’s ancestor folders, ordered by depth.

ConnectFolderTypeEnum

Type Description
Dashboard Dashboard folders.
Document Document folders.
Email Email folders.
Insights Insights folders.
Reports Reports folders.

FolderSummaryRepresentation

Field Type Available Version Description
id ID 43.0 Unique identifier.
label String 43.0 Display label.
name String 43.0 Folder unique name.
namespace String 43.0 Namespace prefix to differentiate custom object and field names from those in use by other organizations.
type ConnectFolderTypeEnum 43.0 Defined by the type of entity the folder contains.
parentId ID 43.0 ID of the parent folder.
url ConnectUri 43.0 URL of the folder:

/services/data/v43.0/folders/<folderid>

childrenUrl ConnectUri 43.0 URL that represents the first level subfolders of the specified folder:

/services/data/v43.0/folders/<folderid>/children

depth Int 43.0 Depth of the folder in the tree. A folder with depth 0 is the root folder.

Sample Output Response

1{
2  "ancestors" : [ ],
3  "childrenUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/children",
4  "depth" : 0,
5  "id" : "00lxx000000flSFAAY",
6  "label" : "report_folder",
7  "name" : "report_folder1",
8  "shareRecipientsUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/share-recipients?shareType=User&limit=100",
9  "sharesUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/shares",
10  "supportedShareTypes" : [ "user", "role", "roleandsubordinates", 	"roleandsubordinatesinternal", "group", "portalrole", "portalroleandsubordinates", 	"customerportaluser" ],
11  "type" : "report",
12  "url" : "/services/data/v43.0/folders/00lxx000000flSFAAY"
13}

PATCH

Updates the label or name of the folder with the specified folder ID.

  • Users with manage access on the folder can change the folder label.
  • Only admin users can change the folder name.

/services/data/v43.0/folders/<folderid>

Request Body

Query Parameter Name Group Since Available Version Description
folder Object 42.0 FolderInputRepresentation Users with edit access on the folder can change label . Admins can change name . type cannot be changed.

FolderInputRepresentation

Code Type Available Version Description
label String 42.0 Folder display name.
name String 42.0 Folder unique name. This is a mandatory field for admins; for non-admins, it is auto-generated.
type ConnectFolderTypeEnum 42.0 Defined by the type of entity the folder contains:
parentId String 43.0 ID of the parent folder. This field is valid only for subfolders.

Sample Request Body

1{
2  "label": "report_folder1",
3  "name": "report_folder1"
4}

Sample Raw Response

1{
2  "ancestors" : [ ],
3  "childrenUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/children",
4  "depth" : 0,
5  "id" : "00lxx000000flSFAAY",
6  "label" : "report_folder1",
7  "name" : "report_folder1",
8  "shareRecipientsUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/share-recipients?shareType=User&limit=100",
9  "sharesUrl" : "/services/data/v43.0/folders/00lxx000000flSFAAY/shares",
10  "supportedShareTypes" : [ "user", "role", "roleandsubordinates", 	"roleandsubordinatesinternal", "group", "portalrole", "portalroleandsubordinates", 	"customerportaluser" ],
11  "type" : "report",
12  "url" : "/services/data/v43.0/folders/00lxx000000flSFAAY"
13}

DELETE

Deletes the folder that has the specified folder ID.

/services/data/v43.0/folders/<folderid>