Dynamic folder templates
GET https://account.sf-api.com/sf/v3/FolderTemplates
Returns all folder templates for the current account.
Returns: Folder templates for current account
GET https://account.sf-api.com/sf/v3/FolderTemplates(id)
Returns folder template with the specified ID
Returns: Folder template
POST https://account.sf-api.com/sf/v3/FolderTemplates
{
"Name": "Client Folder",
"Description": "For all client folders created in 2014 or after",
"Items": [
{
"Name": "Folder 1",
"Items": [
{
"Name": "Subfolder1"
}
]
},
{
"Name": "Folder 2"
}
]
}
Creates a new folder template.
Returns: The created folder template
PATCH https://account.sf-api.com/sf/v3/FolderTemplates?overwrite=false
{
"Name": "Client Folder",
"Description": "For all client folders created in 2014 or after",
"Items": [
{
"Name": "A new folder",
"Items": [
{
"TemplateId": "ft-12345-abdef-abdef-12345-abdef",
"Name": "A new subfolder"
}
]
},
{
"Id": "fti-xxxxx-xxxxx-xxxxx-xxxxx",
"Name": "An existing folder with a different name"
}
]
}
Updates an existing folder template
| template | FolderTemplate | |
| overwrite | Boolean | Indicates whether an object with the same name must be overwritten or not. Default is false. If false, then an existing item with the same name will return an error. |
Returns: The updated folder template
DELETE https://account.sf-api.com/sf/v3/FolderTemplates(id)
Removes a folder template
| id | String |
POST https://account.sf-api.com/sf/v3/FolderTemplates(templateId)/BulkApply?folderId=o9ab674-48d2-4f72-a49f-eef75d64b62f&batchSize=10
Applies the specified folder template to all subfolders of provided folder ID
| templateId | String | Folder Template ID |
| folderId | String | Folder ID |
| batchSize | Int32 | Number of subfolders to be processed |
Returns: The status of the operation: how many subfolders are left, and how many subfolders in total