GET
/ng-cms/media/{projectId}/{mediaId}https://apis-spb.konso.io/ng-cms/media/{projectId}/{mediaId}Get a media asset by ID
Параметры запроса
projectIdstringThe unique identifier of the project (bucket)
mediaIdstringThe unique identifier of the media asset
Ответы
200The requested media asset.
тип: CmsMediaAssetDto
idstringUnique identifier of the media assetprojectIdstringProject (bucket) this asset belongs tofileNamestringOriginal filename as uploadedtitlestringHuman-readable titledescriptionstringOptional description of the assetmimeTypestringMIME type of the file (e.g. image/jpeg)sizeBytesnumberFile size in bytesstorageProviderstringStorage backend used (e.g. s3)storageKeystringKey used to identify the file in storagepublicUrlstringPublicly accessible URL for the assetmetadataobjectAdditional key-value metadata attached to the assetcreatedBynumberID of the user who uploaded the assetcreatedAtstringISO 8601 timestamp of uploadupdatedAtstringISO 8601 timestamp of last update, or nullupdatedBynumberID of the user who last updated the assetupdatedByNamestringName of the user who last updated the assetpublishedAtstringISO 8601 timestamp of publication, or nullpublishedBynumberID of the user who published the asset, or null401Unauthorized. A valid bearer token is required.
404Not Found. No media asset exists with the given ID.
412Precondition Failed. The project's current plan does not allow access to this resource, or payment is required to proceed.
500Unexpected server error.
тип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)Язык:
expand_more
Пример запроса
curl --request GET \
--url https://apis-spb.konso.io/ng-cms/media/{projectId}/{mediaId} \
--header 'Authorization: Bearer <token>'Response Example200
{
"id": "ma_f1e2d3c4b5a6",
"projectId": "my-project-id",
"fileName": "hero.jpg",
"title": "Hero Image",
"description": "Main banner image",
"mimeType": "image/jpeg",
"sizeBytes": 204800,
"storageProvider": "s3",
"storageKey": "hero.jpg",
"publicUrl": "https://cdn.example.com/my-project-id/hero.jpg",
"metadata": {},
"createdBy": 42,
"createdAt": "2025-05-01T09:00:00Z",
"updatedAt": null,
"updatedBy": null,
"updatedByName": null,
"publishedAt": null,
"publishedBy": null
}KONSO