Get a Folder by the Folder ID

Gets a folder by using the folder ID.

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 by the folder ID

URI

https://bartendercloud.com/api/librarian/folders/{folderId}

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

folderId

Type: String

Specifies the ID of the folder. Required.

Query Parameters

includeHidden

Type: Boolean

When true, specifies that the response includes hidden subfolders. The default value is false. Optional.

includeDeleted

Type: Boolean

When true, specifies that the response includes deleted subfolders. The default value is false. Optional.

Example

Request body: None.

Response: See Folder.

Copy
// Assume that folderId is the ID of the target folder. 
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");

// In the set of subfolders that are returned, also include subfolders that are marked as hidden.
HttpResponseMessage msg = await client.GetAsync($"https://bartendercloud.com/api/librarian/folders/{folderId}?includeHidden=true");

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