v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Classifications

Add classification

Adds one or more new classifications to 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.

put/metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema#add

Request body

op'addEnumOption' required

The type of change to perform on the classification object.

fieldKey'Box__Security__Classification__Key' required

Defines classifications available in the enterprise.

Example request

[
  {
    "op": "addEnumOption",
    "fieldKey": "Box__Security__Classification__Key",
    "data": {
      "key": "Sensitive",
      "staticConfig": {
        "classification": {
          "classificationDefinition": "Sensitive information that must not be shared.",
          "colorID": 4
        }
      }
    }
  }
]

Response

Returns the updated securityClassification metadata template, which contains a Box__Security__Classification__Key field that lists all the classifications available to this enterprise.

idstring required

The ID of the classification template.

type'metadata_template' required

The value will always be metadata_template.

scopestring required

The scope of the classification template. This is in the format enterprise_{id} where the id is the enterprise ID.

templateKey'securityClassification-6VMVochwUWo' required

The value will always be securityClassification-6VMVochwUWo.

displayName'Classification' required

The name of this template as shown in web and mobile interfaces.

hiddenboolean

Determines if the template is always available in web and mobile interfaces.

copyInstanceOnItemCopyboolean

Determines if classifications are copied along when the file or folder is copied.

Example response

{
  "id": "58063d82-4128-7b43-bba9-92f706befcdf",
  "type": "metadata_template",
  "scope": "enterprise_123456",
  "templateKey": "securityClassification-6VMVochwUWo",
  "displayName": "Classification",
  "copyInstanceOnItemCopy": true,
  "fields": [
    {
      "id": "822227e0-47a5-921b-88a8-494760b2e6d2",
      "type": "enum",
      "key": "Box__Security__Classification__Key",
      "displayName": "Classification",
      "options": [
        {
          "id": "46aea176-3483-4431-856c-6b5b13d1cc50",
          "key": "Sensitive",
          "staticConfig": {
            "classification": {
              "classificationDefinition": "Sensitive information",
              "colorID": 4
            }
          }
        }
      ]
    }
  ]
}