Update asset metadata
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/content/asset-update
Overview
Updates asset filename and/or tags without re-uploading file content.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Required permission:
Updateon thecontentfeature
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes (or auth_token) | API key for authentication |
| auth_token | String | Yes (or api_key) | Auth token for authentication |
| app_id | String | Yes | Application identifier |
| asset_id | String | Yes | GridFS ObjectID of asset to update |
| asset_name | String | No (or asset_tags) | New filename |
| asset_tags | String | No (or asset_name) | JSON stringified array of tags |
At least one of asset_name or asset_tags must be provided.
Examples
Example 1: Update Filename
/i/content/asset-update?api_key=YOUR_API_KEY&app_id=5be987d7b93798516eb5289a&asset_id=507f1f77bcf86cd799439011&asset_name=homepage_banner_v2
Example 2: Update Tags
/i/content/asset-update?api_key=YOUR_API_KEY&app_id=5be987d7b93798516eb5289a&asset_id=507f1f77bcf86cd799439011&asset_tags=["campaign","spring-2026"]
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| result | String | Success confirmation |
Error Responses
| HTTP Status | Response |
|---|---|
| 400 | "File parameters are missing" |
| 400 | "There is an error while updating asset! Please check error logs." |
| 400 | "There is an error while updating asset. ..." |
Behavior
- Validates request authentication and permissions.
- Requires
asset_id,app_id, and at least one ofasset_name/asset_tags. - Parses
asset_tagswhen provided. - Updates the GridFS file metadata document.
Related Endpoints
- Assets - Read: List assets
- Assets - Upload: Upload an asset
- Assets - Delete: Delete an asset
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly_fs.content_assets{app_id}.files | Endpoint data source | ** - GridFS file metadata |