Deletes a piece of folder metadata.
12345
The unique identifier that represent a folder.
The ID for any folder can be determined
by visiting this folder in the web application
and copying the ID from the URL. For example,
for the URL https://*.app.box.com/folder/123
the folder_id
is 123
.
The root folder of a Box account is
always represented by the ID 0
.
global
The scope of the metadata template
Value is one of global
,enterprise
properties
The name of the metadata template
Returns an empty response when the metadata is successfully deleted.
Returned when the request parameters are not valid. This may happen of the
scope
is not valid.
Returns an error when the folder does not have an instance of the metadata template applied to it, or when the user does not have access to the folder.
instance_not_found
- An instance of the metadata template with the
given scope
and templateKey
was not found on this folder.not_found
- The folder was not found, or the user does not have access
to the folder.Returned when the method was not allowed. This often happens when the
folder ID is not valid or the root folder with ID 0
.
An unexpected client error.
curl -i -X DELETE "https://api.box.com/2.0/folders/4353455/metadata/enterprise_27335/blueprintTemplate" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.folderMetadata.deleteFolderMetadataById(
folder.id,
'enterprise' as DeleteFolderMetadataByIdScope,
templateKey,
);
client.folder_metadata.delete_folder_metadata_by_id(
folder.id, DeleteFolderMetadataByIdScope.ENTERPRISE.value, template_key
)
await client.FolderMetadata.DeleteFolderMetadataByIdAsync(folderId: folder.Id, scope: DeleteFolderMetadataByIdScope.Enterprise, templateKey: templateKey);
try await client.folderMetadata.deleteFolderMetadataById(folderId: folder.id, scope: DeleteFolderMetadataByIdScope.global, templateKey: "properties")
BoxFolder folder = new BoxFolder(api, "id");
folder.deleteMetadata("myMetadataTemplate");
client.folder(folder_id='11111').metadata(scope='enterprise', template='myMetadata').delete()
await client.MetadataManager.DeleteFolderMetadataAsync("11111", "enterprise", "marketingCollateral");
client.folders.deleteMetadata('67890', client.metadata.scopes.GLOBAL, client.metadata.templates.PROPERTIES)
.then(() => {
// removal succeeded — no value returned
});
client.metadata.delete(
forFolderWithId: "22222",
scope: "enterprise",
templateKey: "personnelRecord"
) { (result: Result<Void, BoxSDKError>) in
guard case .success = result {
print("Error deleting metadata instance")
return
}
print("Metadata instance deleted")
}