Remove All Metadata Items

Removes all metadata that is associated with the target file.

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:

Remove all metadata items

URI

https://bartendercloud.com/api/librarian/files/{fileId}/metadata

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

fileId

Type: String

Specifies the ID of the file. Required.

Query Parameters

versionMajor

Type: Integer <int32>

Specifies the requested major version. Gets the latest version if both major and minor versions are not provided. Also gets the latest version if a major version is not provided and if minor versioning is not enabled in the space, regardless of the minor version value. Optional.

versionMinor

Type: Integer <int32>

Specifies the requested minor version. Required when minor versioning is enabled in the space; otherwise optional.

Example

Request body: None.

Response: System.Collections.Generic.Dictionary<string, object>

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

HttpResponseMessage msg = await client.DeleteAsync($"https://bartendercloud.com/api/librarian/files/{fileId}/metadata?versionMajor={majorVersion}&versionMinor={minorVersion}");
if (msg.IsSuccessStatusCode)
{
   var response = await msg.Content.ReadAsStringAsync();
   return JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string, object>>(response);
}