Modify Asset

To modify assets, a user needs to be authenticated with a role that has “update” access with a specific tool in a specific project.

The parameters currently used to create assets are asset_id and properties.

  • The assetId relates to the id of the content record to-be updated.
  • The properties field represents a JSON string that will be used when updating the asset. After a successfully modifying an asset, the properties field will replace the existing field. Note: to update a single field in a properties JSON you must copy over the entire existing JSON or else other fields will be lost. Specific tools have specific properties (Name, URL, Legacy ID, …) and this properties JSON string is where these are defined

Input parameters

  • assetId
    • String
    • (external) id of asset to modify
  • properties
    • String
    • String representation of JSON blob to replace existing asset properties
    • Example
      • {"Name": "Updated Name!"}
    • Note: in some cases you need to either nest single quotes in double, or escape inner quotes in string JSON representation

Possible Errors

  • Asset not found
    • Asset id passed in call is invalid/not found
  • Forbidden
    • Caller does not have the required permissions to modify this content
  • Invalid properties
    • Properties do not match the JSON schema for properties of this tool’s asset type

Example Graphql call:

mutation MyMutation {
  modifyAsset(assetId: "123abc", properties: "{\"test\":\"test\"}") {
    id
  }
}