Skip to main content

Update asset metadata

Endpoint

/i/content/asset-update

Enterprise Only
This API is available exclusively in Countly Enterprise.

Overview

Updates asset filename and/or tags without re-uploading file content.

Authentication

  • Authentication methods:
    • API Key (parameter): api_key=YOUR_API_KEY
    • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
    • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Required permission: Update on the content feature

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key for authentication
auth_tokenStringYes (or api_key)Auth token for authentication
app_idStringYesApplication identifier
asset_idStringYesGridFS ObjectID of asset to update
asset_nameStringNo (or asset_tags)New filename
asset_tagsStringNo (or asset_name)JSON stringified array of tags

At least one of asset_name or asset_tags must be provided.

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringSuccess confirmation

Error Responses

HTTP StatusResponse
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/Processing

  1. Validates request authentication and permissions.
  2. Requires asset_id, app_id, and at least one of asset_name / asset_tags.
  3. Parses asset_tags when provided.
  4. Updates the GridFS file metadata document.

Database Collections

CollectionUsed forData touched by this endpoint
countly_fs.content_assets{app_id}.filesEndpoint data source** - GridFS file metadata

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"]

Ⓔ Enterprise

This feature is part of Countly Enterprise.

Get Access:

Already a Customer? Use support portal if you have any questions


Last Updated

2026-02-16