Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

URL: /digizuitecore/legacyservice/api/metadata/update

Method: POST

Auth required: YES

The exact request to send here depends on the specific meta field type you want to update, so each field type is documented as a separate request. You don’t need to pass in a meta field type as the type is inferred based on the target field.

All the requests go to the same endpoint, and requests can be bulked by passing multiple updates in the updates array.

If the response is successful, you get a 204 No Content status code.

Request properties available on all metafield types:

Name

Type

Description

targetItemIds (tick)

list of ints

The itemIds of the assets to update with this update request part.

metaFieldLabelId

int

The metafieldLabelId of the metafield in a specific language to update.

Either this or metaFieldItemGuid should be specified

metaFieldItemGuid

guid

The itemGuid of the meta field to update. This always updates the value in the current access key language if used.

Either this or metaFieldLabelId should be specified.

Bit request properties

Name

Type

Description

value

bool

The value to assign

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51512,
      "targetItemIds": [
        20433
      ],
      "value": true
    }
  ]
}

DateTime request properties

Name

Type

Description

value

DateTime/null

The value to assign, or null to clear the field.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51518,
      "targetItemIds": [
        20433
      ],
      "value": "2023-07-13T14:15:00"
    }
  ]
}

Float request properties

Name

Type

Description

value

double/null

The value to assign, or null to clear the field.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51520,
      "targetItemIds": [
        20433
      ],
      "value": 42.5
    }
  ]
}

Int request properties

Name

Type

Description

value

int/null

The value to assign, or null to clear the field.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51522,
      "targetItemIds": [
        20433
      ],
      "value": 49
    }
  ]
}

String/Note/Link request properties

Name

Type

Description

value

string/null

The value to assign, or null to clear the field.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 50727,
      "targetItemIds": [
        20433
      ],
      "value": "This is a description"
    }
  ]
}

EditComboValue request properties

Name

Type

Description

comboValue

string/null

The value to assign, or null to clear the field.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51498,
      "targetItemIds": [
        20433
      ],
      "comboValue": "foo"
    }
  ]
}

EditMultiComboValuerequest properties

Name

Type

Description

comboValues

list of strings

The values to work on, the exact work depending on updateMethod

updateMethod

enum/string, of

  • Set

  • Merge

  • Unset

How the values should be updated.

  • Set: The values are assigned, and all other values are removed.

  • Merge: The values are added to the existing values.

  • Unset: The values are removed from the existing values.

If not specified Set will be used.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51500,
      "targetItemIds": [
        20433
      ],
      "comboValues": [
        "foo",
        "bar"
      ],
      "updateMethod": "Set"
    }
  ]
}

ComboValue request properties

Name

Type

Description

comboValue

int/object/null

If you want to select an existing value, pass the id of the combo value.

If you pass in an object you can create a new value on-the-fly. If the combo already exists it will be reused.

Pass null to clear the value.

comboValue.label

string

The name/title/label of the combo value.

comboValue.optionValue

string

The option value of the combo value

 Example - Set known combo value
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51496,
      "targetItemIds": [
        20433
      ],
      "comboValue": 50204
    }
  ]
}

 Example - Set dynamic combo value
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51496,
      "targetItemIds": [
        20433
      ],
      "comboValue": {
        "label": "five",
        "optionValue": "five"
      }
    }
  ]
}

MultiComboValue request properties

Name

Type

Description

comboValues

array of int/object

If you want to select an existing value, pass the id of the combo value.

If you pass in an object you can create a new value on-the-fly. If the combo already exists it will be reused.

comboValues.label

string

The name/title/label of the combo value.

comboValues.optionValue

string

The option value of the combo value

updateMethod

enum/string, of

  • Set

  • Merge

  • Unset

How the values should be updated.

  • Set: The values are assigned, and all other values are removed.

  • Merge: The values are added to the existing values.

  • Unset: The values are removed from the existing values.

If not specified Set will be used.

 Example - Set known combo values
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51502,
      "targetItemIds": [
        20433
      ],
      "comboValues": [
        50202,
        50200
      ]
    }
  ]
}

 Example - Set dynamic combo values
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51502,
      "targetItemIds": [
        20433
      ],
      "comboValues": [
        {
          "label": "One",
          "value": "One"
        },
        {
          "label": "Four",
          "value": "Four"
        }
      ]
    }
  ]
}

MasterItemReference/SlaveItemReference request properties

Name

Type

Description

itemIds

list of int

The itemIds if the items to select, to work on, the exact work depending on updateMethod

updateMethod

enum/string, of

  • Set

  • Merge

  • Unset

How the values should be updated.

  • Set: The values are assigned, and all other values are removed.

  • Merge: The values are added to the existing values.

  • Unset: The values are removed from the existing values.

If not specified Set will be used.

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 51508,
      "targetItemIds": [
        20433
      ],
      "itemIds": [
        9725,
        9743
      ]
    }
  ]
}

Tree request properties

Name

Type

Description

treeValues

list of int/object

If you want to select existing tree nodes, pass their ids.

If you want to create new ones on-the-fly, you can pass an object. This object can be recursive to specify nodes further down in the tree.

treeValues.label

string

The name/title/label of the tree value.

treeValues.optionValue

string

The option value of the tree value

treeValues.select

bool

If this value should be selected or if it is just for reference. Useful if you only want to select the leaf node in a tree, and not any of the nodes on the way.

treeValues.children

array of objects

This can be specified recursively. See the request examples.

updateMethod

enum/string, of

  • Set

  • Merge

  • Unset

How the values should be updated.

  • Set: The values are assigned, and all other values are removed.

  • Merge: The values are added to the existing values.

  • Unset: The values are removed from the existing values.

If not specified Set will be used.

 Example - Set known tree value
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 50751,
      "targetItemIds": [
        20433
      ],
      "treeValues": [
        18
      ]
    }
  ]
}

 Example - Set dynamic tree values
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 50751,
      "targetItemIds": [
        20433
      ],
      "treeValues": [
        {
          "label": "my root folder",
          "optionValue": "my-root-folder",
          "children": [
            {
              "label": "my child folder",
              "optionValue": "my-child-folder",
              "select": false,
              "children": [
                {
                  "label": "My child child folder",
                  "optionValue": "my-child-child-folder"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Update multiple items/fields at the same time

This example will set the title of 2 assets to different values. The description to the same, but in separate parts, and same keywords for each asset in one part:

 Example
POST https://<my-dam>/digizuitecore/legacyservice/api/metadata/update
Authorization: AccessKey MIIC...o0Y=
Content-Type: application/json

{
  "updates": [
    {
      "metaFieldLabelId": 50723,
      "targetItemIds": [
        20433
      ],
      "value": "This is asset one"
    },
    {
      "metaFieldLabelId": 50723,
      "targetItemIds": [
        20432
      ],
      "value": "This is asset two"
    },
    {
      "metaFieldLabelId": 50727,
      "targetItemIds": [
        20433
      ],
      "value": "This is the description"
    },
    {
      "metaFieldLabelId": 50727,
      "targetItemIds": [
        20432
      ],
      "value": "This is the description"
    },
    {
      "metaFieldLabelId": 10438,
      "targetItemIds": [
        20432, 20433
      ],
      "comboValues": [
        "cat",
        "dog"
      ]
    }
  ]
}

  • No labels