Objective

It allows to retrieve information about documents and subfolders included in a specified root folder considering the access security level of the user sent as parameter. This method only retrieves the documents and folders to which the user has enough permissions. It is a recursive method so it could performance could be affected if the subfolder depth is high. DST must be provided.

Parameters

ParameterDescriptionType
libraryeDOCS libraryString
userUser nameString
passwordUser passwordString
formIt is the name of the form used to search documents.String
rootDocNumberDocument number of the root folder.String
LevelsLimitNumber of levels to include in the returned XML file. It determines the depth of the recursive search, which directly affects the performance of the method. The bigger the number, the poorer the performance. It is suggested not to request more than 3 or 4 levels, but it depends on the server configuration and the number of documents or subfolders. To retrieve all levels from the root node, use the value “0”.String
orderByPropertiesA list of the properties to order the results by, as well as the desired order. 0 forces ascending order and 1 forces descending order. The order affects documents and folders as well. It’s possible to combine ascending and descending order types.

All the properties passed in orderByProperties should also be included in the returnProperties parameter.

The value 2 will order the documents as they are ordered by the calling user’s preferences. These preferences are defined in the FOLDER_ITEM table.

String
returnPropertiesBy default the method always retrieves the following properties:

  • DOCNAMEUP: the name of the folder as it appears in DM.
  • DOCNUMBER: the document number of the document or the folder.
  • APPLICATION_NAME: the name of the application (only for documents).

Other properties of the profile table can be added if needed by passing a string with the specific properties desired.

String
showTrusteesIf “true” is passed, security information is included in the result XML. Response time increases when security information is requested.String
showVersionsIf “true” is passed, a XML file node is included with all information returned by the GetVersions method. Response time increases when version information is requested.String
showOnlyFoldersIf “true” is passed, documents are not included in the XML file.String
showExtraInfoIf “true” is passed, the method will return the following extra properties.

  • LAST_ACCESS_FULL_NAME
  • LAST_EDIT_FULL_NAME
  • ACCESSRIGHTS

String
clientOptional parameter for the client codeString
projectOptional parameter for the project codeString

Rest Invoke

  • http://localhost:port/GSService/xml/ or http://localhost:port/GSService/json/
  • UriTemplate:
    • “/GetFolderContent/?library={library}&user={user}&password={password}&rootDocNumber={rootDocNumber}&levelsLimit={levelsLimit}&orderByProperties={orderByProperties}&returnProperties={returnProperties}&showTrustees={showTrustees}&showVersions={showVersions}&showOnlyFolders={showOnlyFolders}&showExtraInfo={showExtraInfo}&client={client}&project={project}”
    • “/GetFolderContentDST/?library={library}&user={user}&dst={dst}&rootDocNumber={rootDocNumber}&levelsLimit={levelsLimit}&orderByProperties={orderByProperties}&returnProperties={returnProperties}&showTrustees={showTrustees}&showVersions={showVersions}&showOnlyFolders={showOnlyFolders}&showExtraInfo={showExtraInfo}&client={client}&project={project}”

Example

http://localhost:8732/GSService/xml/GetFolderContent/?library=DMTESTLEGAL&user=admin&password=owc123&rootDocNumber=14&levelsLimit=0&orderByProperties=2&returnProperties=false&showTrustees=true&showVersions=true&showOnlyFolders=false&showExtraInfo=true

The method returns an XML file with the profile properties requested. Its size depends on the number of properties, the number of levels, the number of documents and subfolders to be retrieved per each level and the server resources.

The XML file is structured as follows. Each “folder” has a folder node. This node contains the following subnodes:

  • “profile” –> includes the folder properties.
  • “security” –> includes information about users and groups access list.
  • “content” –> could be empty or it could include the following subnodes:
    • “folder” –> includes subfolder properties as defined for the parent node.
    • “document” –> includes document information and it could contain the following subnodes:
      • “profile” –> includes document properties.
      • “security” –> includes information about users and groups access list.
      • “versions” –> includes information about versions and subversions.

DST Example

http://localhost:8732/GSService/xml/GetFolderContentDST/?library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&rootDocNumber=14&levelsLimit=0&orderByProperties=<DOCNAME>2</DOCNAME>&returnProperties=false&showTrustees=true&showVersions=true&showOnlyFolders=false&showExtraInfo=true

Error

It returns the document type name or an error. Check the event.log file if you find errors.