Getting Metadata of a Folder

You can use the getFolder call to retrieve name, collaborators, and other attributes of a folder.

Sample URL

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

Method

GET

Parameters

Parameter Description
id The ID of the document.

This parameter is required if the path parameter is not present.

path The fully qualified File Share path name.

This parameter is required if the id parameter is not present; otherwise, it is ignored.

Response

The call returns the folder. This is similar to the getFile call.

Example:

{"createdOn":1371245293603,"id":"8a2d03eb-e4e5-480b-893e-4fa6939f1b38","latestVersion":0,"parentId":"f51ca25f-1582-43b7-93d0-22a8e8b96713","users":"O:UserId1:A;E:UserId3:P","createdBy":"UserId1","shareId":"8a2d03eb-e4e5-480b-893e-4fa6939f1b38","name":"Sub folder of HG's Hi Lvl Folder 1","type":"D","size":0}

The format of the Users field is <User Type>:<User Id>:<Share Status>:<User Display>. The valid user type values are E (Editor), O (Owner), R (Root), V (Viewer), and N (not a collaborator). The valid values of share status is A (accepted) and P (pending).

The difference between <User Id> and <User Display> is <User Display> does not have the authenticator prefix for LDAP users. They are the same for database users.
Note: There might be duplicate because User Display is not unique. All duplicates should be displayed.