---
title: "PATCH /asset/agent-space/{agentSpaceId}/assets/{assetId}"
method: PATCH
path: "/asset/agent-space/{agentSpaceId}/assets/{assetId}"
---

# PATCH /asset/agent-space/{agentSpaceId}/assets/{assetId}

`PATCH /asset/agent-space/{agentSpaceId}/assets/{assetId}`

Updates an asset in the specified agent space

## Path parameters

- `agentSpaceId` string, required — Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)
- `assetId` string, required — Generic resource identifier (allows alphanumeric characters, hyphens, and underscores; 1-128 characters)

## Request body

- object
  - `metadata` object — Metadata fields to update. Only the fields present in this document are updated. Omitted fields retain their current values.
  - `content` object — Content for an asset: a single file, a zip bundle, or a source URL to import from
    - `file` object — A single file with path and content
      - `path` string, required — The path of the file within the asset
      - `body` object, required — The file content
        - `bytes` string — Binary file content
        - `text` string — Text file content
      - `metadata` object — Optional metadata for this file
    - `zip` object — A zip file containing multiple files
      - `zipFile` string, required — The zip file bytes
    - `sourceUrl` object — A source URL to import asset content from
      - `url` string, required — The source URL to import asset content from
  - `clientToken` string — A unique, case-sensitive identifier used for idempotent asset update

## Response `200`

Success

- UpdateAssetResponse — Response structure for updating an asset
  - `asset` object, required — The asset object
    - `assetId` string, required — The unique identifier for this asset
    - `assetType` string, required — The type of this asset
    - `metadata` object, required — The metadata for this asset
    - `version` integer, required — The version number of this asset
    - `createdAt` string, date-time, required — Timestamp when this asset was created
    - `updatedAt` string, date-time, required — Timestamp when this asset was last updated

## Other responses

- `480` — ValidationException
- `481` — ContentSizeExceededException
- `482` — ServiceQuotaExceededException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — AccessDeniedException
- `486` — ResourceNotFoundException
- `487` — ThrottlingException
- `488` — InvalidParameterException

---

[API](https://skmtc.net/aws/apis/devops-agent.md) · [All operations](https://skmtc.net/aws/apis/devops-agent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/devops-agent/versions/ca2af02d3853/schema)
