Box Developer Documentation
Latest version

Remove classification from file

delete
https://api.box.com/2.0
/files/:file_id/metadata/enterprise/securityClassification-6VMVochwUWo

Removes any classifications from a file.

This API can also be called by including the enterprise ID in the URL explicitly, for example /files/:id//enterprise_12345/securityClassification-6VMVochwUWo.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The unique identifier that represents a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.

Response

none

Returns an empty response when the classification is successfully deleted.

application/jsonClient error

Returned when the request parameters are not valid.

application/jsonClient error

Returns an error when the file does not have any classification applied to it, or when the user does not have access to the file.

  • instance_not_found - An instance of the classification metadata template with the was not found on this file.
  • not_found - The file was not found, or the user does not have access to the file.
application/jsonClient error

Returned when the method was not allowed.

application/jsonClient error

An unexpected client error.

delete
Remove classification from file
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE "https://api.box.com/2.0/files/12345/metadata/enterprise/securityClassification-6VMVochwUWo" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.fileClassifications.deleteClassificationFromFile(file.id);
Python Gen
client.file_classifications.delete_classification_from_file(file.id)
.NET Gen
await client.FileClassifications.DeleteClassificationFromFileAsync(fileId: file.Id);
Swift Gen (Beta)
try await client.fileClassifications.deleteClassificationFromFile(fileId: file.id)
Java
BoxFile file = new BoxFile(api, "id");
file.deleteMetadata(Metadata.CLASSIFICATION_TEMPLATE_KEY);
Python
client.file(file_id='11111').metadata(scope='securityClassification-6VMVochwUWo', template='myMetadata').delete()
.NET
var fileId = "0";

var fileMetadata = await client.MetadataManager.DeleteFileMetadataAsync(fileId, "enterprise", "securityClassification-6VMVochwUWo");
Node
client.files.deleteMetadata('11111', 'enterprise', 'securityClassification-6VMVochwUWo')
	.then(() => {
		// removal succeeded — no value returned
	});;