FolderTemplates

Dynamic folder templates

Get Folder Templates for Current Account

GET https://account.sf-api.com/sf/v3/FolderTemplates 

Returns all folder templates for the current account.

Returns: Folder templates for current account

Get folder template

GET https://account.sf-api.com/sf/v3/FolderTemplates(id) 

Returns folder template with the specified ID

Returns: Folder template

Create 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

Update 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

templateFolderTemplate
overwriteBoolean 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 Folder Template

DELETE https://account.sf-api.com/sf/v3/FolderTemplates(id) 

Removes a folder template

idString

Apply folder template to folders in bulk

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

templateIdString Folder Template ID
folderIdString Folder ID
batchSizeInt32 Number of subfolders to be processed

Returns: The status of the operation: how many subfolders are left, and how many subfolders in total