Removes a classification from the list of classifications available to the enterprise.
This API can also be called by including the enterprise ID in the
URL explicitly, for example
/metadata_templates/enterprise_12345/securityClassification-6VMVochwUWo/schema
.
An array that contains one or more classifications to remove.
Sensitive
The label of the classification to remove.
Box__Security__Classification__Key
Box__Security__Classification__Key
removeEnumOption
removeEnumOption
Returns the updated securityClassification
metadata template, which
contains a Box__Security__Classification__Key
field that lists all
the classifications available to this enterprise.
Returned if any of the request parameters are not valid.
Returned when a template name is not correct. Please make sure the URL for the request is correct.
An unexpected client error.
curl -i -X PUT "https://api.box.com/2.0/metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json-patch+json" \
-d '[{
"op": "removeEnumOption",
"fieldKey": "Box__Security__Classification__Key",
"enumOptionKey": "Sensitive"
}]'
List<MetadataTemplate.FieldOperation> updates = new ArrayList<MetadataTemplate.FieldOperation>();
String update = "{\n op: \"removeEnumOption\",\n fieldKey: \"Box__Security__Classification__Key\",\n enumOptionKey: \"Sensitive\"\n}";
updates.add(new MetadataTemplate.FieldOperation(addCategoryFieldJSON));
MetadataTemplate.updateMetadataTemplate(api, Metadata.ENTERPRISE_METADATA_SCOPE, Metadata.CLASSIFICATION_TEMPLATE_KEY, updates);
template = client.metadata_template('enterprise', 'securityClassification-6VMVochwUWo')
updates = template.start_update()
updates.remove_enum_option('Box__Security__Classification__Key', 'Sensitive')
updated_template = template.update_info(updates)
var operations = [{
op: "removeEnumOption",
fieldKey: "Box__Security__Classification__Key",
enumOptionKey: "Sensitive"
}];
client.metadata.updateTemplate('enterprise', 'securityClassification-6VMVochwUWo', operations)
.then(template => {
// the updated classification template
});
{
"id": "58063d82-4128-7b43-bba9-92f706befcdf",
"type": "metadata_template",
"copyInstanceOnItemCopy": true,
"displayName": "Classification",
"fields": [
{
"id": "822227e0-47a5-921b-88a8-494760b2e6d2",
"type": "enum",
"key": "Box__Security__Classification__Key",
"displayName": "Classification",
"hidden": false,
"options": [
{
"id": "46aea176-3483-4431-856c-6b5b13d1cc50",
"key": "Sensitive",
"staticConfig": {
"classification": {
"classificationDefinition": "Sensitive information",
"colorID": 4
}
}
}
]
}
],
"hidden": false,
"scope": "enterprise_123456",
"templateKey": "securityClassification-6VMVochwUWo"
}