Retrieves the classification metadata instance that has been applied to 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
.
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
.
Returns an instance of the securityClassification
metadata
template, which contains a Box__Security__Classification__Key
field that lists all the classifications available to this
enterprise.
Returned when the request parameters are not valid.
Returned if the metadata template specified was not applied to this file or the user does not have access to the file.
instance_not_found
- The metadata template was not applied to the
file.Returned when the method was not allowed.
An unexpected client error.
curl -i -X GET "https://api.box.com/2.0/files/12345/metadata/enterprise/securityClassification-6VMVochwUWo" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.fileClassifications.getClassificationOnFile(file.id);
client.file_classifications.get_classification_on_file(file.id)
await client.FileClassifications.GetClassificationOnFileAsync(fileId: file.Id);
try await client.fileClassifications.getClassificationOnFile(fileId: file.id)
BoxFile file = new BoxFile(api, "id");
Metadata metadata = file.getMetadata(Metadata.CLASSIFICATION_TEMPLATE_KEY);
metadata = client.file(file_id='11111').metadata(scope='enterprise', template='securityClassification-6VMVochwUWo').get()
var fileId = "0";
var fileMetadata = await client.MetadataManager.GetFileMetadataAsync(fileId, "enterprise", "securityClassification-6VMVochwUWo");
client.files.getMetadata('11111', 'enterprise', 'securityClassification-6VMVochwUWo')
.then(metadata => {
// the metadata instance, which includes the applied metadata
});
{
"$canEdit": true,
"$parent": "folder_59449484661,",
"$scope": "enterprise_27335",
"$template": "securityClassification-6VMVochwUWo",
"$type": "securityClassification-6VMVochwUWo-fd31537a-0f95-4d86-9f2b-5974a29978f8",
"$typeVersion": 5,
"$version": 1,
"Box__Security__Classification__Key": "Sensitive"
}