Get a Folder's Permissions by the Folder Path

Gets permissions for a folder by using the folder path.

Note: For more information about this command, including descriptions of any path and request parameters, request body schema, response codes and schemas, and payload examples, refer to the online API reference for this command at the following web page:

Get a folder's permissions by the folder path

URI

https://bartendercloud.com/api/librarian/folders/path/{folderPath}/permissions

Note: The bartendercloud.com domain that is referenced in the URI and in the code example that follows must be replaced with the contents of the DataCenterURI claim that is extracted from your access token. For more information, refer to Extracting the DataCenterURI Claim.

Path Parameters

folderPath

Type: String

Specifies the path of the requested folder. Required.

Comment: The {folderPath} parameter must be single-URL encoded, and the path must start with the "librarian://{spaceName}/" prefix. Replace {spaceName} with the name of the target space (such as Main or $temp).

For example, the actual path for the "My Folder" folder in the Main space is as follows: 

librarian://Main/My Folder/

The URL-encoded {folderPath} parameter is as follows:

librarian%3A%2F%2FMain%2FMy%20Folder%2F

The full URI would resemble the following: 

https://bartendercloud.com/api/librarian/folders/path/librarian%3A%2F%2FMain%2FMy%20Folder%2F/permissions

Query Parameters

None.

Example

Request body: None.

Response: See FolderPermissions.

Copy
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");

var folderPath = System.Uri.EscapeDataString("librarian://Main/My Folder");
HttpResponseMessage msg = await client.GetAsync($"https://bartendercloud.com/api/librarian/folders/path/{folderPath}/permissions");

if (msg.IsSuccessStatusCode)
{
   var response = await msg.Content.ReadAsStringAsync();
   return JsonConvert.DeserializeObject<FolderPermissions>(response);
}