Box Developer Documentation
 
    Latest version

    Get classification on file

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

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    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.

    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

    application/jsonClassification

    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.

    application/jsonClient error

    Returned when the request parameters are not valid.

    application/jsonClient error

    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.
    application/jsonClient error

    Returned when the method was not allowed.

    application/jsonClient error

    An unexpected client error.

    get
    Get classification on file
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    cURL
    curl -i -X GET "https://api.box.com/2.0/files/12345/metadata/enterprise/securityClassification-6VMVochwUWo" \
         -H "authorization: Bearer <ACCESS_TOKEN>"

    Response Example

    {
      "$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"
    }