Skip to main content

Merge Metadata

POST 

/qlibs/:qlibid/q/:qwtoken/meta

Merge the provided metadata with the existing metadata of the given content object. The merge is performed recursively according to the following rules:

  • JSON arrays are merged by appending the values in the new array to the existing array
  • JSON objects are merged key by key
    • a existing value is simply replaced with the new value if the types don't match (otherwise they are recursively merged as stated before)
    • an existing key is removed if the new value null

Merge Example:

Merging the existing structure:

{
"a": "va",
"b": [ "one", "two" ],
"c": "vc",
"d": { "e": "ve" }
}

with this structure:

{
"a": "new va",
"b": [ "three", "four" ],
"c": null,
"d": "vd"
}

yields:

{
"a": "new va",
"b": [ "one", "two", "three", "four" ],
"d": "vd"
}

Request

Responses

The metadata was successfully merged.