Purge Items by Folder ID

Purges (permanently deletes) all items in the target 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:

Purge items by folder ID

URI

https://bartendercloud.com/api/librarian/items/{folderId}/purge

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 to purge. Required.

Query Parameters

None.

Example

Request body: None.

Response: None. After the task is queued, it runs asynchronously relative to the call.

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

// Assume that folderId is the ID of the target folder. 
HttpResponseMessage msg = await client.DeleteAsync($"https://bartendercloud.com/api/librarian/items/{folderId}/purge"); 
if (msg.IsSuccessStatusCode)
{
    return JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string, object>>(await msg.Content.ReadAsStringAsync());
}