Assets
Model properties
- Name
id
- Type
- string
- Description
Unique identifier for the asset.
- Name
is_uploaded
- Type
- boolean
- Description
Whether or not the asset has been uploaded to Editframe.
- Name
uploaded_at
- Type
- date
- Description
The date and time the asset was uploaded to Editframe.
- Name
status
- Type
- string
- Description
The status of the asset. Possible values are
uploaded
,uploading
,failed
.
- Name
metadata
- Type
- object
- Description
An object containing user-supplied metadata about the asset. This object is empty by default. For video assets, this object will contain the following properties:
codec
,bitrate
,thumbnail
,resolution
,thumbnail_filename
.
- Name
type
- Type
- string
- Description
The MIME type of the asset.
- Name
asset_url
- Type
- url
- Description
The URL of the asset.
List all assets
This endpoint allows you to retrieve a paginated list of all your assets. By default, a maximum of 15 assets are shown per page.
Request parameters
- Name
page
- Type
- integer
- Description
Specify the page number to retrieve. Default is 1.
- Name
per_page
- Type
- integer
- Description
Limit the number of flows returned per page. Default is 15.
Request
curl --location 'https://api.editframe.com/v2/assets' \
--header 'Authorization: Bearer {token}'
Response
{
"data": [
{
"id": "yKOqd1e2nJ",
"is_uploaded": true,
"metadata": {
"codec": "h264",
"bitrate": "5799621",
"thumbnail": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/thumbnail",
"resolution": "1920x1080",
"thumbnail_filename": "3JeboVM26P_thumbnail.jpg"
},
"status": "uploaded",
"type": "video/mp4",
"asset_url": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/stream",
"uploaded_at": 1690278378
},
{
"id": "K0abXD5bwd",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/yKOqd7QnJZ/IMG_7754.jpg",
"uploaded_at": 1687509510
},
{
"id": "6jx24geqZW",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/yKOqd7QnJZ/IMG_7754.jpg",
"uploaded_at": 1687509375
},
{
"id": "yKOqdBdbnJ",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/yKOqd7QnJZ/IMG_7754.jpg",
"uploaded_at": 1687509291
},
{
"id": "eanq9AVq84",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/assets/assets/stream",
"uploaded_at": 1687509136
},
{
"id": "1pMqrLNb4k",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/assets/stream",
"uploaded_at": 1687509056
},
{
"id": "1XPbe7OqzV",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/assets/yKOqd7QnJZ/stream",
"uploaded_at": 1687508951
},
{
"id": "DkR2a6xbjN",
"is_uploaded": true,
"metadata": {
},
"status": "uploaded",
"type": "image/jpeg",
"asset_url": "https://api.editframe.com/assets/yKOqd7QnJZ/stream",
"uploaded_at": 1687508895
}
],
"links": {
"first": "https://api.editframe.com/v2/assets?page=1",
"last": "https://api.editframe.com/v2/assets?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://api.editframe.com/v2/assets?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://api.editframe.com/v2/assets",
"per_page": 15,
"to": 7,
"total": 7
}
}
Upload a new asset
This endpoint allows you to upload a new asset to Editframe.
Request parameters
- Name
file
- Type
- file
- required
- Description
The file to upload. This can be a video, image, or audio file.
- Name
url
- Type
- file
- required
- Description
The URL of the file to upload. This can be a video, image, or audio file.
- Name
sync
- Type
- boolean
- required
- Description
Whether or not to wait for the asset to be processed before returning a response. If set to
true
, the response will include thestatus
property, which will be set touploaded
when the asset is ready to use. If set tofalse
, the response will not include thestatus
property and the asset will be processed in the background and you can listen for theasset.uploaded
webhook event to know when the asset is ready to use . Default isfalse
.
You must provide either the file
or url
parameter, but not both.
Request
curl --location 'https://api.editframe.com/v2/assets' \
--header 'Authorization: Bearer W8oU7eFmKBoCyKOqd7QnJZ' \
--form 'file=@"PATH_TO_FILE"'
Response
{
"data": {
"id": "yKOqd1e2nJ",
"is_uploaded": true,
"metadata": {
"codec": "h264",
"bitrate": "5799621",
"thumbnail": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/thumbnail",
"resolution": "1920x1080",
"thumbnail_filename": "3JeboVM26P_thumbnail.jpg"
},
"status": "uploaded",
"type": "video/mp4",
"asset_url": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/stream",
"uploaded_at": 1690278378
}
}
Retrieve an asset
This endpoint allows you to retrieve an individual asset by providing the asset id. Refer to the model properties to see which properties are included with asset objects.
Request
curl https://api.editframe.com/v2/assets/mZjqAPPQ4e \
-H "Authorization: Bearer {token}"
Response
{
"data": {
"id": "yKOqd1e2nJ",
"is_uploaded": true,
"metadata": {
"codec": "h264",
"bitrate": "5799621",
"thumbnail": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/thumbnail",
"resolution": "1920x1080",
"thumbnail_filename": "3JeboVM26P_thumbnail.jpg"
},
"status": "uploaded",
"type": "video/mp4",
"asset_url": "https://api.editframe.com/v2/assets/yKOqd1e2nJ/stream",
"uploaded_at": 1690278378
}
}
Delete an asset
This endpoint allows you to delete an asset by providing the asset id. This action cannot be undone.
Request
curl -X DELETE https://api.editframe.com/v2/assets/yKOqd1e2nJ \
-H "Authorization: Bearer {token}"