/ng-cms/media/{projectId}/{mediaId}https://apis-spb.konso.io/ng-cms/media/{projectId}/{mediaId}smart_toyAgentic specGet a media asset by ID
Получает единственный медиаресурс по указанному идентификатору.
Параметры запроса
projectIdstringThe unique identifier of the project (bucket)
mediaIdstringThe unique identifier of the 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 nullтип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)curl --request GET \
--url https://apis-spb.konso.io/ng-cms/media/{projectId}/{mediaId} \
--header 'Authorization: Bearer <token>'{
"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
}Исходный код
Референсные реализации этого эндпоинта — если поведение неочевидно, проще свериться с кодом, чем гадать.
Клиентские библиотеки
Официальные SDK для вызова этого метода из вашего кода — без ручной сборки запроса.
TS