Webservice: Document Metadata

handling of templates and attribute sets

Index Method Request(s) Response Description
1 getAttributeOptionsByCategory sid
setId
attribute
category
retrieves the options for the given attribute inside a given category
2 grantGroupToTemplate sid
templateId
groupId
permissions
grants group permission to the template
3 getAttributeSetById sid
setId
attributeSet gets an attribute set by it's identifier
4 setAttributeOptions sid
setId
attribute
options
saves the options for the given attribute
5 grantUserToTemplate sid
templateId
userId
permissions
grants user permission to the template
6 getAttributeOptions sid
setId
attribute
retrieves the options for the given attribute
7 storeTemplate sid
template
templateId creates/updates a template; you can completely customize the template through a value object; returns the identifier of the created/updated template
8 listTemplates sid
template lists all the templates
9 getTemplate sid
name
template gets an existing template by it's name
10 listAttributeSets sid
attributeSet lists all the attribute sets
11 getAttributeSet sid
name
attributeSet gets an attribute set by it's name
12 storeAttributeSet sid
attributeSet
setId creates/updates an attribute set; you can completely customize the set through a value object; returns the identifier of the created/updated set
13 deleteTemplate sid
templateId
deletes an existing template
14 isTemplateWritable sid
templateId
tests if a template is writable
15 getTemplateById sid
templateId
template gets an existing template by it's identifier
16 deleteAttributeSet sid
setId
deletes an existing attribute set
17 isTemplateReadable sid
templateId
tests if a template is readable
18 getGrantedGroups sid
templateId
retrieves the list of granted groups for the given folder
19 getGrantedUsers sid
templateId
retrieves the list of granted users for the given folder

Method #1: getAttributeOptionsByCategory

retrieves the options for the given attribute inside a given category

Request

Name Type Required Multiple Description
     sid
String Y
     setId
Long Y
     attribute
String Y
     category
String Y

Response

Name Type Required Multiple Description
    
WSAttributeOption Y Y
          serialVersionUID
Long Y
          value
String Y the value
          category
String the category

Method #2: grantGroupToTemplate

grants group permission to the template

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
Long Y
     groupId
Long Y
     permissions
Int Y the permission integer representation; if '0', the group will be not granted to access the template

Method #3: getAttributeSetById

gets an attribute set by it's identifier

Request

Name Type Required Multiple Description
     sid
String Y
     setId
Long Y

Response

Name Type Required Multiple Description
     attributeSet
WSAttributeSet Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #4: setAttributeOptions

saves the options for the given attribute

Request

Name Type Required Multiple Description
     sid
String Y
     setId
Long Y
     attribute
String Y
     options
WSAttributeOption Y Y
          serialVersionUID
Long Y
          value
String Y the value
          category
String the category

Method #5: grantUserToTemplate

grants user permission to the template

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
Long Y
     userId
Long Y
     permissions
Int Y the permission integer representation; if '0', the user will be not granted to access the template

Method #6: getAttributeOptions

retrieves the options for the given attribute

Request

Name Type Required Multiple Description
     sid
String Y
     setId
Long Y
     attribute
String Y

Response

Name Type Required Multiple Description
    
String Y Y

Method #7: storeTemplate

creates/updates a template; you can completely customize the template through a value object; returns the identifier of the created/updated template

Request

Name Type Required Multiple Description
     sid
String Y
     template
WSTemplate Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String Y
          docsCount
Int the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          validation
String
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Response

Name Type Required Multiple Description
     templateId
Long Y

Method #8: listTemplates

lists all the templates

Request

Name Type Required Multiple Description
     sid
String Y

Response

Name Type Required Multiple Description
     template
WSTemplate Y Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String Y
          docsCount
Int the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          validation
String
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #9: getTemplate

gets an existing template by it's name

Request

Name Type Required Multiple Description
     sid
String Y
     name
String Y

Response

Name Type Required Multiple Description
     template
WSTemplate Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String Y
          docsCount
Int the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          validation
String
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #10: listAttributeSets

lists all the attribute sets

Request

Name Type Required Multiple Description
     sid
String Y

Response

Name Type Required Multiple Description
     attributeSet
WSAttributeSet Y Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #11: getAttributeSet

gets an attribute set by it's name

Request

Name Type Required Multiple Description
     sid
String Y
     name
String Y

Response

Name Type Required Multiple Description
     attributeSet
WSAttributeSet Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #12: storeAttributeSet

creates/updates an attribute set; you can completely customize the set through a value object; returns the identifier of the created/updated set

Request

Name Type Required Multiple Description
     sid
String Y
     attributeSet
WSAttributeSet Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Response

Name Type Required Multiple Description
     setId
Long Y

Method #13: deleteTemplate

deletes an existing template

Request

Name Type Required Multiple Description
     sid
String Y
     templateId
Long Y

Method #14: isTemplateWritable

tests if a template is writable

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
Long Y

Response

Name Type Required Multiple Description
    
Boolean Y

Method #15: getTemplateById

gets an existing template by it's identifier

Request

Name Type Required Multiple Description
     sid
String Y
     templateId
Long Y

Response

Name Type Required Multiple Description
     template
WSTemplate Y
          id
Long Y unique identifier
          name
String Y
          description
String
          lastModified
String Y
          docsCount
Int the last modified date (format must be 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd')
          validation
String
          attributes
WSAttribute Y
               name
String Y name of the attribute
               stringValue
String
               intValue
Long
               doubleValue
Double
               dateValue
String the date value; format must be 'yyyy-MM-dd'
               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), 6 = folder (intValue represents the folders's id)
               mandatory
Int Y
               hidden
Int Y
               position
Int
               label
String
               editor
Int Y 0 = free, 1 = preset
               setId
Long Id of the attribute set
               multiple
Int Y 0 = single value, 1 = one or more values
               parent
String The reference attribute name, used for multi value attributes
               dependsOn
String Name of another attribute on which the value of this attribute also depends, used for managing linked presets
               stringValues
String Read only. In case of multiple string values, contains the values separated by a comma
               validation
String Optional validation script
               initialization
String Optional initialization script

Method #16: deleteAttributeSet

deletes an existing attribute set

Request

Name Type Required Multiple Description
     sid
String Y
     setId
Long Y

Method #17: isTemplateReadable

tests if a template is readable

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
Long Y

Response

Name Type Required Multiple Description
    
Boolean Y

Method #18: getGrantedGroups

retrieves the list of granted groups for the given folder

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
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. Storage
  2. Automation
  3. Email
  4. Move
  5. Password
  6. Print
  7. Subscription
  8. Calendar
  9. Workflow
  10. Archive
  11. Sign
  12. Export
  13. Import
  14. Rename
  15. Delete
  16. Immutable
  17. Security
  18. Add
  19. Write
  20. Download
  21. 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 000000000100010100111 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 000000001100100010101 in binary representation.


Method #19: getGrantedUsers

retrieves the list of granted users for the given folder

Request

Name Type Required Multiple Description
     sid
String Y identifier of the session
     templateId
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. Storage
  2. Automation
  3. Email
  4. Move
  5. Password
  6. Print
  7. Subscription
  8. Calendar
  9. Workflow
  10. Archive
  11. Sign
  12. Export
  13. Import
  14. Rename
  15. Delete
  16. Immutable
  17. Security
  18. Add
  19. Write
  20. Download
  21. 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 000000000100010100111 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 000000001100100010101 in binary representation.