Webservice: Folder

folders handling and CRUD operations

Index Method Request(s) Response Description
1 update sid
folder
updates an existing folder; you need the RENAME permission
2 delete sid
folderId
deletes an existing folder
3 create sid
folder
folder Creates a new folder; returns the newly created folder
4 copy sid
folderId
targetId
foldersOnly
inheritSecurity
copies an existing folder into another location
5 getPath sid
folderId
folders computes the path from the root to the target folder; returns the array of folders, the first is the root
6 rename sid
folderId
name
renames an existing folder
7 createPath sid
parentId
path
folder creates the folder for the specified path; all unexisting nodes will be created
8 isReadable sid
folderId
tests if a folder is readable
9 move sid
folderId
parentId
moves an existing folder with the given identifier
10 createAlias sid
arg1
arg2
folder creates a new folder alias; returns the newly created alias
11 findByPath sid
path
folder finds the folder at the specified path
12 getRootFolder sid
folder gets the root folder
13 isGranted sid
folderId
permission
tests if the current user has a specific permission on a folder
14 getFolder sid
folderId
folder gets an existing folder
15 listChildren sid
folderId
folder lists all direct children of a parent folder: readable only sub-folders are returned
16 createFolder sid
parentId
name
folderId creates a new folder; returns the newly created folder
17 listWorkspaces sid
workspaces retrieves the list of all workspaces
18 getGrantedGroups sid
folderId
retrieves the list of granted groups for the given folder
19 grantGroup sid
folderId
groupId
permissions
recursive
grants group permission to the folder
20 getGrantedUsers sid
folderId
retrieves the list of granted users for the given folder
21 grantUser sid
folderId
userId
permissions
recursive
grants user permission to the folder
22 isWriteable sid
folderId
tests if a folder is writeable
23 getDefaultWorkspace sid
workspace gets the default workspace

Method #1: update

updates an existing folder; you need the RENAME permission

Request

Name Type Required Multiple Description
     sid
String Y
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #2: delete

deletes an existing folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Method #3: create

Creates a new folder; returns the newly created folder

Request

Name Type Required Multiple Description
     sid
String Y
     folder
WSFolder Y definition of the new folder
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #4: copy

copies an existing folder into another location

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     targetId
Long Y the new folder's parent
     foldersOnly
Int Y 0 = copy folders and files, 1 = copy just folders
     inheritSecurity
Int Y 0 = no sec. policies are inherited, 1 = sec. policies are inherited from the new parent folder

Method #5: getPath

computes the path from the root to the target folder; returns the array of folders, the first is the root

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
     folders
WSFolder Y Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #6: rename

renames an existing folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     name
String Y the new folder's name

Method #7: createPath

creates the folder for the specified path; all unexisting nodes will be created

Request

Name Type Required Multiple Description
     sid
String Y
     parentId
Long Y
     path
String Y the folder's path(for example /Default/dog/cat/mouse)

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #8: isReadable

tests if a folder is readable

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
    
Boolean Y

Method #9: move

moves an existing folder with the given identifier

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     parentId
Long Y the new folder's parent

Method #10: createAlias

creates a new folder alias; returns the newly created alias

Request

Name Type Required Multiple Description
     sid
String Y
     arg1
Long Y identifier of the folder in which the alias will be created
     arg2
Long Y identifier of the referenced folder

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #11: findByPath

finds the folder at the specified path

Request

Name Type Required Multiple Description
     sid
String Y
     path
String Y the folder's path(for example /Default/dog/cat/mouse)

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #12: getRootFolder

gets the root folder

Request

Name Type Required Multiple Description
     sid
String Y

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #13: isGranted

tests if the current user has a specific permission on a folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     permission
Int Y the permissions' integer representation

Response

Name Type Required Multiple Description
    
Boolean Y

Method #14: getFolder

gets an existing folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
     folder
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #15: listChildren

lists all direct children of a parent folder: readable only sub-folders are returned

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
     folder
WSFolder Y Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #16: createFolder

creates a new folder; returns the newly created folder

Request

Name Type Required Multiple Description
     sid
String Y
     parentId
Long Y
     name
String Y

Response

Name Type Required Multiple Description
     folderId
Long Y

Method #17: listWorkspaces

retrieves the list of all workspaces

Request

Name Type Required Multiple Description
     sid
String Y

Response

Name Type Required Multiple Description
     workspaces
WSFolder Y Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document

Method #18: getGrantedGroups

retrieves the list of granted groups for the given folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
    
WSRight Y Y
          id
Long Y unique identifier of a user or a group
          permissions
Int Y permissions mask.
this is an integer representation of a list of 17 bits. Each bit refers to a permission: 0 to deny, 1 to grant the permission.
This list represent the bit array starting from left to right:
  1. Password
  2. Print
  3. Subscription
  4. Calendar
  5. Workflow
  6. Archive
  7. Sign
  8. Export
  9. Import
  10. Rename
  11. Delete
  12. Immutable
  13. Security
  14. Add
  15. Write
  16. Download
  17. Read
In particular, 'Read' is represented by the last right bit while 'Download' is represented by the first left bit.
Here are two examples:

A) if you want to assign to a user the permissions Read, Write, Immutable, Rename, Sign, Download, the 'permissions' value must be 2215, in fact it is 00000100010100111 in binary representation.

B) if you want to assign to a group the permissions Read, Write, Add, Security, Import, Archive, Workflow, the 'permissions' value must be 6421, in fact it is 00001100100010101 in binary representation.



Method #19: grantGroup

grants group permission to the folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     groupId
Long Y
     permissions
Int Y the permission integer representation; if '0', the group will be not granted to access the folder
     recursive
Boolean Y the grant operation is applied also to the subfolders

Method #20: getGrantedUsers

retrieves the list of granted users for the given folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
    
WSRight Y Y
          id
Long Y unique identifier of a user or a group
          permissions
Int Y permissions mask.
this is an integer representation of a list of 17 bits. Each bit refers to a permission: 0 to deny, 1 to grant the permission.
This list represent the bit array starting from left to right:
  1. Password
  2. Print
  3. Subscription
  4. Calendar
  5. Workflow
  6. Archive
  7. Sign
  8. Export
  9. Import
  10. Rename
  11. Delete
  12. Immutable
  13. Security
  14. Add
  15. Write
  16. Download
  17. Read
In particular, 'Read' is represented by the last right bit while 'Download' is represented by the first left bit.
Here are two examples:

A) if you want to assign to a user the permissions Read, Write, Immutable, Rename, Sign, Download, the 'permissions' value must be 2215, in fact it is 00000100010100111 in binary representation.

B) if you want to assign to a group the permissions Read, Write, Add, Security, Import, Archive, Workflow, the 'permissions' value must be 6421, in fact it is 00001100100010101 in binary representation.



Method #21: grantUser

grants user permission to the folder

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y
     userId
Long Y
     permissions
Int Y the permission integer representation; if '0', the user will be not granted to access the folder
     recursive
Boolean Y the grant operation is applied also to the subfolders

Method #22: isWriteable

tests if a folder is writeable

Request

Name Type Required Multiple Description
     sid
String Y
     folderId
Long Y

Response

Name Type Required Multiple Description
    
Boolean Y

Method #23: getDefaultWorkspace

gets the default workspace

Request

Name Type Required Multiple Description
     sid
String Y

Response

Name Type Required Multiple Description
     workspace
WSFolder Y
          id
Long Y unique identifier of the folder
          name
String Y
          parentId
Long Y identifier of the parent folder
          description
String Y
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          type
Int Y 0 = Folder, 1 = Workspace
          templateId
Long template assigned to folder
          templateLocked
Int Y 0 = the template is unlocked, 1 = the template is locked
          creation
String the creation date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          creator
String who created the folder
          position
Int Y
          hidden
Int Y 0 = visible, 1 = hidden
          foldRef
Long the referenced folder, used in case of folder alias
          attributes
WSAttribute Y array of attributes
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String
               type
Int Y 0 = String, 1 = int, 2 = double, 3 = date, 4 = user (intValue represents the user's id), 5 = boolean (intValue must be 0 or 1)
               mandatory
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
          storage
Integer the storage to use for new files. Valid only in case of workspace.
          tags
String Y tags applied to the document