Get User File Permission

Prev Next

This tutorial demonstrates how to get user file permissions via the RESTful API.

The steps include:

  • Get a user file permission with the file ID

Additional API documentation

To get a list of most of the API requests available, with the 12d Synergy server running, browse http://synergy.myserver.com/api-docs/ui/index.

(Replace synergy.myserver.com with the external server address and update the port numbers if necessary.).

1.1. Getting the Personal Access Token to access API

The tutorial for getting the PAT is here: Generate PAT in Web client.

1.2. Getting a file using the file ID

This request can be found in the API documentation under Files marked 'Get a file by ID'.

Sample Request

/curl --location 'http://{your-server-here}/api/v1/files/{file-id-here}/permission' \

--header 'Authorization: Bearer <token-here>' \

--header 'Content-Type: application/json'

Below is a sample response of a user’s permission on file b2.txt.

Sample Response

{

    "can_view": true,

    "can_read": true,

    "can_write": true,

    "can_leave_notes": true

}