Get Shared Folder Users

get

/documents/api/1.2/shares/{folderId}/items

Get information about a shared folder and the users who share it.

Request

Supported Media Types
Path Parameters
  • Globally unique identifier (GUID) for the folder. If the referenced folder is the user's home folder, the value for folderId is self

    .
Body ()
The request body defines details of the get shared folder users request. There are no required attributes.
Root Schema : ShareFolderUsersBody
Type: object
The request body defines details of the get shared folder users request. There are no required attributes.
Show Source
  • Return only users with whom the specified folder is shared explicitly (true) or all users who have access to the specified folder whether directly or via sharing of one of the parent folders (false). By default, this option is false.
Example Request (application/json)
{
    "currentOnly":"true"
}
Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : ShareFolderUsersResponse
Type: object
The response body includes information about the get shared folder users operation.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UserWithLoginName
Type: object
User information.
Show Source
Nested Schema : ShareDefinition
Type: object
Share information
Show Source
Example Response (application/json)
{
    "count":"1",
    "id":"F1321DC48E3B123D02DBEE88T0000000000100000001",
    "type":"share",
    "errorCode":"0",
    "items":[
        {
            "type":"share",
            "role":"manager",
            "user":{
                "id":"U7ECC74059E0FEDFEC66BF5AT00000000001",
                "displayName":"User BB",
                "loginName":"userBBLoginName",
                "provisioningStatus":"active",
                "type":"user"
            }
        }
    ],
    "ownedBy":{
        "id":"U7ECC74059E0FEDFEC66BF5AT00000000002",
        "displayName":"User AA",
        "loginName":"userAALoginName",
        "type":"user"
    }
}

400 Response

Request parameters are not formatted correctly.

403 Response

Forbidden if the user does not have read permission.

404 Response

Folder ID is not found.

Back to Top

Examples

The following example retrieves users and groups with access to the specified folder:

GET .../shares/F1321DC48E3B123D02DBEE88T0000000000100000001/items?currentOnly=true

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
  "count": "1",
  "errorCode": "0",
  "id": "F1321DC48E3B123D02DBEE88T0000000000100000001",
  "type": "share",
  "items": [
    {
      "type": "share",
      "user": {
        "displayName": "User BB",
        "loginName": "userBBLoginName",
        "id": "U7ECC74059E0FEDFEC66BF5AT00000000001",
        "type": "user",
        "provisioningStatus": "active"
      },
      "role": "manager"
    }
  ],
  "ownedBy": {
    "id": "U7ECC74059E0FEDFEC66BF5AT00000000002",
    "displayName": "User AA",
    "loginName": "userAALoginName",
    "type": "user"
  }
}
Back to Top