Objective

It allows to retrieve information about all documents and subfolders included in a specified root folder. 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
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:

01

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
  • ACCESSRIGHT

These properties are retrieved with subqueries, increasing response time. Use only if needed.

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:
    • “/ShowFolderContent/?library={library}&user={user}&password={password}&rootDocNumber={rootDocNumber}&levelsLimit={levelsLimit}&orderByProperties={orderByProperties}&returnProperties={returnProperties}&showTrustees={showTrustees}&showVersions={showVersions}&showOnlyFolders={showOnlyFolders}&showExtraInfo={showExtraInfo}&dbSchema={dbSchema}&client={client}&project={project}”
    • “/ShowFolderContentDST/?library={library}&user={user}&dst={dst}&rootDocNumber={rootDocNumber}&levelsLimit={levelsLimit}&orderByProperties={orderByProperties}&returnProperties={returnProperties}&showTrustees={showTrustees}&showVersions={showVersions}&showOnlyFolders={showOnlyFolders}&showExtraInfo={showExtraInfo}&dbSchema={dbSchema}&client={client}&project={project}”

Example

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

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/ShowFolderContentDST/?library=DMTESTLEGAL&user=admin&dst=afd448a5d0f9b...55355b8c677ad16&docNumber=747&rootDocNumber=14&levelsLimit=0&orderByProperties=1&returnProperties=&showTrustees=true&showVersions=true&showOnlyFolders=false&showExtraInfo=true&dbSchema=DOCSADM

Error

Check the event.log file if you find errors.