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

MethodDescription
GETGets information about the folder that has the specified folder ID.
PATCHUpdates 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.
DELETEDeletes the folder that has the specified folder ID.

Parameters

ParameterDescription
folderIdSpecifies 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

FieldTypeAvailable VersionDescription
idString42.0Unique folder identifier.
labelString42.0Folder display name.
nameString42.0Folder unique name.
namespaceString42.0Namespace prefix to differentiate custom object and field names from those in use by other organizations.
typeConnectFolderTypeEnum42.0Defined by the type of entity the folder contains.
parentIdID43.0ID of the parent folder.
urlConnectUri43.0URL of the folder: /services/data/v43.0/folders/<folderid>
childrenUrlConnectUri43.0URL that represents the first level subfolders of the specified folder: /services/data/v43.0/folders/<folderid>/children
depthInteger43.0Depth of the folder in the tree. A folder with depth 0 is the root folder.
supportedShareTypessList <supportedShareTypes>43.0List of supported share types for the folder in the organization.
sharesUrlConnectUri43.0URL of the shares for the particular folder: /services/data/v43.0/folders/<folderid>/shares
shareRecipientsUrlConnectUri43.0URL of the recipients of the share: /services/data/v43.0/folders/<folderid>/share-recipients
ancestorsList <FolderSummaryRepresentation>43.0This folder’s ancestor folders, ordered by depth.

ConnectFolderTypeEnum

TypeDescription
DashboardDashboard folders.
DocumentDocument folders.
EmailEmail folders.
InsightsInsights folders.
ReportsReports folders.

FolderSummaryRepresentation

FieldTypeAvailable VersionDescription
idID43.0Unique identifier.
labelString43.0Display label.
nameString43.0Folder unique name.
namespaceString43.0Namespace prefix to differentiate custom object and field names from those in use by other organizations.
typeConnectFolderTypeEnum43.0Defined by the type of entity the folder contains.
parentIdID43.0ID of the parent folder.
urlConnectUri43.0URL of the folder: /services/data/v43.0/folders/<folderid>
childrenUrlConnectUri43.0URL that represents the first level subfolders of the specified folder: /services/data/v43.0/folders/<folderid>/children
depthInt43.0Depth 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 NameGroupSinceAvailable VersionDescription
folderObject42.0FolderInputRepresentationUsers with edit access on the folder can change label . Admins can change name . type cannot be changed.

FolderInputRepresentation

CodeTypeAvailable VersionDescription
labelString42.0Folder display name.
nameString42.0Folder unique name. This is a mandatory field for admins; for non-admins, it is auto-generated.
typeConnectFolderTypeEnum42.0Defined by the type of entity the folder contains:
parentIdString43.0ID 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>