POST/ng-cms/media/{projectId}/from-url

Create a media asset from URL

Параметры запроса

projectIdstring
Обязательный

The unique identifier of the project (bucket)

Тело запроса

CreateMediaFromUrlRequest
urlstring
Обязательный

Publicly accessible URL of the remote asset to register or download

titlestring
Необязательный

Human-readable title for the asset. Defaults to the filename extracted from the URL if omitted.

descriptionstring
Необязательный

Optional description of the media asset.

uploadboolean
Необязательный

If true, the file is downloaded from the URL and uploaded to storage (S3). If false (default), the URL is stored as-is without downloading.

Ответы

201Media asset created successfully. Returns the new asset ID.

тип: ApiResponse<string>

successbooleanAlways true on success
resultstringThe ID of the newly created media asset
errorsErrorDetail[]List of errors (empty on success)
400Bad Request. No URL was provided, or when upload=true the remote URL returned a non-success HTTP status.
401Unauthorized. A valid bearer token is required.
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 false
errorsErrorDetail[]List of server-side errors
correlationIdstringUnique ID for tracing the error
messagestringError message
stackstringStack trace (non-production only)

Оставаясь на сайте, Вы даете свое согласие на использование файлов cookie