Update organization asset
Organization Assets
Update Organization Asset
Update an asset’s name, description, or group assignment. The asset must belong to your organization.
PATCH
Update organization asset
Documentation Index
Fetch the complete documentation index at: https://chainpatrol-knowledge-update-hosting-providers-list-1775664.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Update an asset’s name, description, or group assignment. This endpoint allows you to modify metadata for assets belonging to your organization. The asset’s content and type cannot be changed - create a new asset if you need to modify these fields.Quick Start
Authentication
Include your API key in theX-API-KEY header:
Example Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| assetId | number | Yes | ID of the asset to update |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| assetId | number | Yes | ID of the asset to update (must match path parameter) |
| name | string | No | New display name for the asset. Omit to leave unchanged. |
| description | string | null | No | New description for the asset. Pass null to clear. Omit to leave unchanged. |
| groupId | number | null | No | New group ID to assign. Pass null to ungroup. Omit to leave unchanged. |
At least one of
name, description, or groupId must be provided to update the asset.Response
Success Response
Response Fields
| Field | Type | Description |
|---|---|---|
| id | number | Asset ID |
| content | string | Asset content (unchanged) |
| name | string | Updated display name |
| description | string | null | Updated description (null if cleared) |
| groupId | number | null | Updated group ID (null if ungrouped) |
Update Operations
Update Name Only
Update Description Only
Clear Description
Change Group Assignment
Move asset to a different group:Ungroup Asset
Remove asset from all groups:Update Multiple Fields
Error Responses
400 Bad Request
Returned when the request is malformed or contains invalid data:401 Unauthorized
Returned when the API key is missing, invalid, or doesn’t have organization access:403 Forbidden
Returned when the asset doesn’t belong to your organization:404 Not Found
Returned when the asset ID or group ID doesn’t exist:Common Error Messages
| Error Message | Cause | Resolution |
|---|---|---|
| Asset with ID not found | Invalid asset ID | Verify the asset ID exists |
| Asset does not belong to your organization | Asset belongs to a different organization | Use an asset ID from your organization |
| Group with ID not found | Invalid group ID | Use a valid group ID from your organization |
| At least one field must be provided | Empty update request | Provide at least one field to update |
| Path parameter assetId does not match body | Mismatch between URL and body asset IDs | Ensure both asset IDs match |
Best Practices
Field Updates
- Partial updates: Only include fields you want to change
- Null vs. omit:
- Pass
nullto clear a field (description, groupId) - Omit the field to leave it unchanged
- Pass
- Validation: Validate group IDs exist before updating
Bulk Updates
When updating multiple assets, process them sequentially or in small batches:Error Handling
- Verify asset ownership before updating (check if asset belongs to your organization)
- Validate group IDs before assignment
- Handle 404 errors gracefully (asset may have been deleted)
- Log failed updates for auditing
Use Cases
Organize Assets into Groups
Add Descriptions to Assets
Notes
- Asset content and type cannot be modified - create a new asset if needed
- Only assets belonging to your organization can be updated
- Organization is automatically determined from your API key
- All update operations are atomic - either all fields update or none do
- The response contains the updated asset information
- Asset’s
updatedAttimestamp will be updated when any field changes
Authorizations
Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.
Path Parameters
ID of the asset to update
Required range:
x > 0