API DocsRESTAsset service

UpdateAsset

Update fields on an asset.

PATCH
/api/v1/assets

Request Body

application/jsonRequired

The request for a call to AssetService_UpdateAsset to update a single existing asset.

assetobject

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are tags and metadata.

curl -X PATCH "<API_URL>/api/v1/assets" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "asset": {
      "assetId": "string",
      "name": "string",
      "organizationId": "string",
      "createdDate": "2019-08-24T14:15:22Z",
      "createdByUserId": "string",
      "modifiedDate": "2019-08-24T14:15:22Z",
      "modifiedByUserId": "string",
      "tags": [
        "string"
      ],
      "metadata": [
        {
          "key": {
            "name": "string",
            "type": "METADATA_KEY_TYPE_UNSPECIFIED"
          },
          "stringValue": "string",
          "numberValue": 0.1,
          "booleanValue": true
        }
      ]
    },
    "updateMask": "string"
  }'

A successful response.

{
  "asset": {
    "assetId": "string",
    "name": "string",
    "organizationId": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "createdByUserId": "string",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "modifiedByUserId": "string",
    "tags": [
      "string"
    ],
    "metadata": [
      {
        "key": {
          "name": "string",
          "type": "METADATA_KEY_TYPE_UNSPECIFIED"
        },
        "stringValue": "string",
        "numberValue": 0.1,
        "booleanValue": true
      }
    ]
  }
}