Box Developer Documentation
 
    Latest version

    Get metadata template by name

    get
    https://api.box.com/2.0
    /metadata_templates/:scope/:template_key/schema

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

    Retrieves a metadata template by its scope and templateKey values.

    To find the scope and templateKey for a template, list all templates for an enterprise or globally, or list all templates applied to a file or folder.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Path Parameters

    stringin pathrequired
    global

    The scope of the metadata template

    Value is one of global,enterprise

    stringin pathrequired
    properties

    The name of the metadata template

    Response

    application/jsonMetadata template

    Returns the metadata template matching the scope and template name.

    application/jsonClient error

    Returned if any of the request parameters are not valid.

    • bad_request: Often returned when the scope of the template is not recognised. Please make sure to use either enterprise or global as the scope value.
    application/jsonClient error

    Returned when a template with the given scope and template_key can not be found.

    application/jsonClient error

    An unexpected client error.

    get
    Get metadata template by name
    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/metadata_templates/enterprise/blueprintTemplate/schema" \
         -H "authorization: Bearer <ACCESS_TOKEN>"

    Response Example

    {
      "id": "58063d82-4128-7b43-bba9-92f706befcdf",
      "type": "metadata_template",
      "copyInstanceOnItemCopy": true,
      "displayName": "Product Info",
      "fields": [
        {
          "description": "The category",
          "displayName": "Category",
          "hidden": true,
          "key": "category",
          "options": [
            {
              "key": "Category 1",
              "id": "45dc2849-a4a7-40a9-a751-4a699a589190"
            }
          ],
          "type": "string",
          "id": "822227e0-47a5-921b-88a8-494760b2e6d2"
        }
      ],
      "hidden": true,
      "scope": "enterprise_123456",
      "templateKey": "productInfo"
    }