Parameters

NameTypeRequired?
asset_idtextyes
propertiestext (stringified JSON)yes

Use

Modify an asset's properties.

NOTE: A successful call will completely replace the existing JSON properties object with the new one passed in the call. It may be useful to first query the Unearth API for the existing properties JSON of an asset and use the results to build the replacement properties JSON object to be passed in the modifyAsset call.

NOTE: Properties are passed as a stringified JSON object. This means that the entire JSON object must be encased in quotes and inner quotes must be escaped.

Examples

# update JSON properties of asset with ID='123abc'
mutation MyMutation {
	modifyAsset(assetId: "123abc", properties: "{\"property\": \"new value\"}" {
  	 id
	}
}
# update JSON properties (URL field type) of asset with ID='123abc'
mutation MyMutation {
  modifyAsset(assetId: "123abc", properties: "{\"URL\": {\"URL\": \"https://app.unearthlabs.com\", \"display\": \"Unearth URL\"}}") {
    properties
    id
  }
}