Update metadata template
Changed onUpdates a metadata template.
The metadata template can only be updated if the template already exists.
The update is applied atomically. If any errors occur during the application of the operations, the metadata template will not be changed.
Request
- Base URLhttps://api.box.com/2.0
- URLhttps://api.box.com/2.0/metadata_templates/{scope}/{template_key}/schema
- AuthOAuth 2Authorization code: https://account.box.com/api/oauth2/authorizeToken URL: https://api.box.com/oauth2/token
Path parameters
The scope of the metadata template.
The name of the metadata template.
Request body
Example request
[
{
"op": "addEnumOption",
"data": {
"name": "Aaron Levie"
},
"fieldKey": "category",
"fieldKeys": [
"category",
"name"
],
"enumOptionKey": "option1",
"enumOptionKeys": [
"option1",
"option2",
"option3"
],
"multiSelectOptionKey": "option1",
"multiSelectOptionKeys": [
"option1",
"option2",
"option3"
]
}
]Response
Returns the updated metadata template, with the custom template data included.
Example response
{
"id": "58063d82-4128-7b43-bba9-92f706befcdf",
"type": "metadata_template",
"scope": "enterprise_123456",
"templateKey": "productInfo",
"displayName": "Product Info",
"hidden": true,
"fields": [
{
"type": "string",
"key": "category",
"displayName": "Category",
"description": "The category",
"hidden": true,
"options": [
{
"key": "Category 1",
"id": "45dc2849-a4a7-40a9-a751-4a699a589190"
}
],
"taxonomyKey": "locationTaxonomy",
"taxonomyId": "05ece6d7-fec4-4d3f-bfd2-36fd4dddea97",
"namespace": "enterprise_123456",
"optionsRules": {
"multiSelect": true,
"selectableLevels": [
1,
2
]
},
"id": "822227e0-47a5-921b-88a8-494760b2e6d2"
}
],
"copyInstanceOnItemCopy": true
}Changes
- warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status
- warning