Folder Collections

Enables creation of report and dashboard folders and obtaining the list of folders.

The following user permissions are needed to access this resource.

POST:

  • Create Dashboard Folders (for dashboard folders)
  • Create Report Folders (for report folders)

GET:

  • View access to the folder

Syntax 

URI: /services/data/v43.0/folders/

Formats: JSON

HTTP methods

MethodDescription
POSTCreates a new folder with the specified name, label, and type.
GETGets the list of folders.

POST 

Creates a new folder with the specified name, label, type, and parent ID (subfolders only).

/services/data/v43.0/folders/

Request Body

Query Parameter NameGroupAvailable VersionValuesDescription
folderObject42.0, 43.0FolderInputRepresentationSpecifies the folder name, label, type, and parent ID.

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.

ConnectFolderTypeEnum

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

Sample Request Body

1{
2  "label": "report_folder",
3  "name": "report_folder1",
4  "type": "report"
5  "parentId": "00lxx000000fffffff"
6}

Sample Output Response

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

GET 

Gets the list of report and dashboard folders.

/services/data/v43.0/folders/

Parameters

FieldTypeAvailable VersionDescription
typeConnectFolderTypeEnum43.0Defined by the type of entity the folder contains. If not specified, returns all visible folders. If specified, returns visible folders of the specified type.
pageInteger43.0Integer that indicates which page of results to return. Default is 1.
pageSizeInteger43.0Integer that indicates how many results to return per page. Default is 10.

Output Payload

FolderCollectionRepresentation

FolderCollectionRepresentation

FieldTypeAvailable VersionDescription
foldersFolderSummaryRepresentation43.0Collection of folders.
totalSizeInteger43.0Size of the folder collection.
urlConnectUri43.0URL of the folder collection.
nextPageurlConnectUri43.0URL to the next page in the collection.
previousPageurlConnectUri43.0URL to the next page in the collection.

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.
childrenUrlConnectUri43.0URL that represents the first level subfolders of the specified folder.
depthInt43.0Depth of the folder in the tree. A folder with depth 0 is the root folder.

Sample Output Response

1{
2  "folders" : [ {
3    "childrenUrl" : "/services/data/v43.0/folders/00lRM000000jCWjYAM/children",
4    "id" : "00lRM000000jCWjYAM",
5    "label" : "Asia Sales",
6    "name" : "Asia_Sales",
7    "type" : "report",
8    "url" : "/services/data/v43.0/folders/00lRM000000jCWjYAM"
9  }, {
10    "childrenUrl" : "/services/data/v43.0/folders/00lRM000000jDmNYAU/children",
11    "id" : "00lRM000000jDmNYAU",
12    "label" : "Europe Sales",
13    "name" : "Europe_Sales",
14    "type" : "report",
15    "url" : "/services/data/v43.0/folders/00lRM000000jDmNYAU"
16  }, {
17    "childrenUrl" : "/services/data/v43.0/folders/00lRM000000jHKXYA2/children",
18    "id" : "00lRM000000jHKXYA2",
19    "label" : "North America Sales",
20    "name" : "North_America_Sales",
21    "type" : "report",
22    "url" : "/services/data/v43.0/folders/00lRM000000jHKXYA2"
23  } ],
24  "totalSize" : 3,
25  "url" : "/services/data/v43.0/folders?page=1&pageSize=10"
26}