创建资产

创建新资产。

身份验证

AuthorizationBearer

Bearer 身份验证,格式为 Bearer <token>,其中 token 是您的身份验证令牌。

路径参数

asset_idstring必需格式: "uuid"

请求

While supported, we encourage you to switch from application/x-ww-form-urlencoded to application/json in order to support future workflows that will only be supported through JSON.

When is_realtime_upload is true, call must be made in application/json.

typeenum必需

Must be file if is_realtime_upload is true.

允许的值:
namestring可选
The name the asset should have in Frame.io. This value does not have to match the name of the file on disk; it can be whatever you want it to be in Frame.io. Required if `is_realtime_upload` is `false`. If `is_realtime_upload` is `true`, must containa valid extension in the form of `".[ext]"`, unless `extension` is provided, in which case this field may be `null` or omitted.
extensionstring可选
Required when `is_realtime_upload` is `true`, when `name` is not known at time of asset creation. If `name` is provided, must match extension of that value. Ignored when `is_realtime_upload` is `false`. When supplied, asset will be creted with `name` value of `"[new file].extension"`.
filetypestring可选

MIME type like video/quicktime. Many languages have built in utilities for detecting file mimetype (see Go and Python for examples).

Required if is_realtime_upload is true.

is_realtime_uploadboolean可选默认为 false

If true, File data for this asset is to be uploaded through the Real-time Uploads API.

If false, File data for this asset will be uploaded through the default API.

Must be false if filetype is not file.

descriptionstring可选
Brief description of the Asset
filesizeinteger可选

File size in bytes.

Required if is_realtime_upload is not true.

propertiesobject可选

Custom key-value data

sourceobject可选

响应头

x-ratelimit-limitdouble

The number of times you can make this call within the x-ratelimit-window

x-ratelimit-remainingstring可选

The number of remaining times you can make this API call in the x-ratelimit-window

x-ratelimit-windowstring可选
The length in milliseconds of the rate limit window

响应

Asset create success response.

When is_realtime_asset was set to true in the request, a simplified payload will be returned.

object
OR
RealtimeAssetCreateResponseobject

错误

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error