Metadata Template Patch Item

A patch operation for the changes to make to the metadata template.

associative array

The data for the operation. This will vary depending on the operation being performed.

string
New name

The value of a custom data entry.

option1

For operations that affect a single enum option this defines the key of the option that is affected.

string array
["option1","option2","option3"]

For operations that affect multiple enum options this defines the keys of the options that are affected.

string
category

For operations that affect a single field this defines the key of the field that is affected.

string array
["category","name"]

For operations that affect multiple fields this defines the keys of the fields that are affected.

option1

For operations that affect a single multi select option this defines the key of the option that is affected.

["option1","option2","option3"]

For operations that affect multiple multi select options this defines the keys of the options that are affected.

string
addEnumOption

The type of change to perform on the template. Some of these are hazardous as they will change existing templates.

Value is one of "editTemplate", "addField", "reorderFields", "addEnumOption", "reorderEnumOptions", "reorderMultiSelectOptions", "addMultiSelectOption", "editField", "removeField", "editEnumOption", "removeEnumOption", "editMultiSelectOption", "removeMultiSelectOption"

Response Example

{
  "op": "addEnumOption",
  "data": {
    "displayName": "New name"
  },
  "fieldKey": "category",
  "fieldKeys": [
    "category",
    "name"
  ],
  "enumOptionKey": "option1",
  "enumOptionKeys": [
    "option1",
    "option2",
    "option3"
  ],
  "multiSelectOptionKey": "option1",
  "multiSelectOptionKeys": [
    "option1",
    "option2",
    "option3"
  ]
}