/ng-cms/media/{projectId}/from-urlhttps://apis-spb.konso.io/ng-cms/media/{projectId}/from-urlsmart_toyAgentic specCreate a media asset from URL
Регистрирует удаленный URL в качестве медиа-ресурса, при необходимости скачивает и загружает его в хранилище.
Параметры запроса
projectIdstringThe unique identifier of the project (bucket)
Тело запроса
CreateMediaFromUrlRequesturlstringPublicly accessible URL of the remote asset to register or download
titlestringHuman-readable title for the asset. Defaults to the filename extracted from the URL if omitted.
descriptionstringOptional description of the media asset.
uploadbooleanIf true, the file is downloaded from the URL and uploaded to storage (S3). If false (default), the URL is stored as-is without downloading.
Ответы
тип: ApiResponse<string>
successbooleanAlways true on successresultstringThe ID of the newly created media asseterrorsErrorDetail[]List of errors (empty on success)тип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)curl --request POST \
--url https://apis-spb.konso.io/ng-cms/media/{projectId}/from-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/hero.jpg",
"title": "Hero Image",
"upload": true
}'{
"success": true,
"result": "ma_a1b2c3d4e5f6",
"errors": []
}