REST API - getFolderContent - GET

The tables summarize the REST API - getFolderContent - GET.

Request - GET

Format
GET <baseurl>/document/folder
					 
Query parameters
  • caseref=String or folderref=String: The caseref can be obtained using getCaseReferencesForDataView. The folderref can be obtained by a prior call to this API when subordinate folders have been added to the case folder in the CMS (see the examples below). Note that either caseref or folderref must be specified, but not both. (Some CMIS servers use characters in case references that must be URL encoded. If you are using such a CMIS server, URL encode the case reference, or use the alternative POST method with a request body.)
  • depth=Integer: The number of levels to recurse the folder structure in the CMS. The default value is -1, which means no limit.
  • metadata=Boolean: Pass true to include document metadata in response. Defaults to false.

Response - GET

JSON Returns a JSON representation of the content of the GetFolderContentResponse element.
XML Returns the content of the GetFolderContentResponse element (from the DocumentService schema).

Example - GET

Request
GET <baseurl>/document/folder?caseref=BDS-1-com.example.ordermodel.Order-1-0&depth=2&metadata=true
Response
{
  "xml-fragment": {
    "item": [
      {
        "document": {
          "reference": "DocumentID-e50c2653-0fd7-4fef-ad6f-2ee460ba52cf;1.0",
          "metadata": {
            "specifier": { "id": "e50c2653-0fd7-4fef-ad6f-2ee460ba52cf;1.0" },
            "name": "Proposal.docx",
            "version": "1.0",
            "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "createdDateTime": "2014-10-03T12:12:54.809",
            "createdBy": "admin",
            "lastModifiedDateTime": "2014-10-07T11:07:55.630",
            "lastModifiedBy": "admin"
          }
        }
      },
            .
            .
            .

      {
        "folder": {
          "reference": "FolderID-c9085f79-2efc-4835-a8f5-d43bcd892bbf",
          "metadata": {
            "id": "c9085f79-2efc-4835-a8f5-d43bcd892bbf",
            "name": "Contracts"
          }
        },
        "content": {
          "folder": {
            "reference": "FolderID-0fd5c876-906d-43b3-9889-92e67933c5e3",
            "metadata": {
              "id": "0fd5c876-906d-43b3-9889-92e67933c5e3",
              "name": "Contracts discussion"
            }
          }
        }
      }
    ]
  }
}