Retrieving Documents in a Folder

You can use the retrieveDocuments call to retrieve metadata of files and subfolders.

Sample URL

https://hostname:port/context/rest/v2/documents/retrieveDocuments/{id}

Method

GET

Parameters

Parameter Description
id Optional.

The ID of the folder.

If neither the id parameter and the path parameter is present, it uses the default value of root folder.

If both the id parameter and the path parameter are present, the path parameter will be ignored.

path Optional.

The fully qualified File Share path name of the folder, for example, /folder/subFolder.

userId Optional.

The user ID the documents are for. This parameter will be treated as an error unless the logon user has the necessary administrative rights. This is added in MFT 8.0.0.

Response

This call returns all files and subfolders as an array of document objects. If the folder is empty, the array will be empty.

Example:

[{"createdOn":1371245688930,"id":"7546beb7-e878-4743-8923-6f3098424fb8","latestVersion":0,"users":"O:UserId1:A","createdBy":"UserId1","shareId":"7546beb7-e878-4743-8923-6f3098424fb8","name":"Shared file","type":"F","size":1234}, {"createdOn":1371240064930,"id":"92b72b2c-294c-4700-a8d2-60afbdd4e586","latestVersion":1,"users":"O:UserId1:A","createdBy":"UserId1","shareId":"92b72b2c-294c-4700-a8d2-60afbdd4e586","lastUpdatedBy":"UserId1","name":"HG's Hi Lvl Folder ","lastUpdatedOn":1371240180930,"type":"D","size":0}, {"dateModified":1370541611930,"users":"O:UserId1:A","type":"D","lastUpdatedOn":1371240417930,"size":0,"id":"994f1944-19db-4ffb-9c20-740d2327c6cd",]