Revoke User

delete

/documents/api/1.1/shares/{folderId}/user

Delete a user's access to a shared folder.

Request

Supported Media Types
  • application/json
  • application/xml
Path Parameters
folderId
Type: string
Required: true

Globally unique identifier (GUID) for the folder. If the referenced folder is the user's home folder, the value for folderId is self.

Body Parameter
The request body defines details of the get shared folder users request. There are no required attributes.
Root Schema : ShareDeleteUserBody
The request body defines details of the revoke user request. Bold indicates a required value.
Example application/json

{
    "userID":"U7ECC74059E0FEDFEC66BF5AT00000000001",
    "message":"Removing your access to this shared folder."
}

Response

Supported Media Types
  • application/json
  • application/xml
200 Response

The request was fulfilled.

Body
The response body includes information about the revoke user operation.
Root Schema : ShareDeleteUserResponse
The response body includes information about the revoke user operation.
Example application/json

{
    "id":"F1321DC48E3B123D02DBEE88T0000000000100000001",
    "type":"share",
    "errorCode":"0"
}
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.

Examples

The following example removes access to the specified folder for the specified user.

DELETE .../shares/F1321DC48E3B123D02DBEE88T0000000000100000001/user

Request Header

None.

Request Body

HTTP Status Code

{
    "userID": " U7ECC74059E0FEDFEC66BF5AT00000000001",
    "message": "removing your access to this shared folder"
}
HTTP_STATUS = 200

JSON Response

{
    "errorCode": "0",
    "id": "F1321DC48E3B123D02DBEE88T0000000000100000001",
    "type": "share",
    "user": {
        "displayName": "User BB",
        "id": "U7ECC74059E0FEDFEC66BF5AT00000000001",
        "type": "user"
    }
}