Schema
Media
Represents a file that is stored in the media library.
Overview
Properties
uuid
The media file's unique identifier.
uuid
Yes
name
The media file's display name.
Latte in coffee cup
1
255
file_type
References Media File Type.
url
The URL to the source (original) media file.
uri
https://media-library-cdn.igloox.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg
Yes
preview_url
The URL to the preview of the media file.
uri
https://media-library-cdn.igloox.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg
Yes
file_name
The original name of the media file.
lattle_in_cup.jpg
Yes
mime_type
The mime type associated with the source (original) media file.
image/jpeg
Yes
size_as_bytes
The file size of the source (original) media file, in bytes.
502000
1
Yes
caption
The caption to associated with the media file (usually placed in alt tags).
Our delicious coffee in a cup!
1
255
Yes
dimensions
Yes
Any of
Any of 1
Any of 2
References Media Dimensions.
streams
Provides information on the video and audio streams in the source (original) media file. This property will only be non-null if `file_type` is `video`.
Yes
Yes
Nested properties
video
The video streams in the source (original) media file.
Array items
Items
Nested properties
width
The width of the video stream, in pixels.
480
1
height
The height of the video stream, in pixels.
270
1
codec
The codec used in the video stream.
h264
frame_rate
The average frame rate of the video stream.
30/1
duration
The duration of the video stream, in seconds.
30.033333
bit_rate
The bitrate of the video stream.
301201
aspect_ratio
The aspect ratio of the video stream.
16:9
audio
The audio streams in the source (original) media file.
Array items
Items
Nested properties
codec
The codec used in the audio stream.
aac
channels
The number of channels in the audio stream.
2
1
duration
The duration of the audio stream, in seconds.
30.526667
bit_rate
The bitrate of the audio stream.
112000
created_at
The date-time that the media was first uploaded.
date-time
Yes
Used by
Raw YAML
title: Media
type: object
x-tags:
- Models
description: Represents a file that is stored in the media library.
required:
- uuid
- name
- file_type
- url
- preview_url
- file_name
- mime_type
- size_as_bytes
- caption
- dimensions
- streams
- created_at
properties:
uuid:
type: string
format: uuid
description: The media file's unique identifier.
readOnly: true
name:
type: string
example: Latte in coffee cup
description: The media file's display name.
minLength: 1
maxLength: 255
file_type:
$ref: ./MediaFileType.yaml
url:
type: string
format: uri
description: The URL to the source (original) media file.
example: 'https://media-library-cdn.igloox.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg'
readOnly: true
preview_url:
type: string
format: uri
description: The URL to the preview of the media file.
example: 'https://media-library-cdn.igloox.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg'
readOnly: true
file_name:
type: string
description: The original name of the media file.
example: lattle_in_cup.jpg
readOnly: true
mime_type:
type: string
example: image/jpeg
description: The mime type associated with the source (original) media file.
readOnly: true
size_as_bytes:
type: integer
minimum: 1
description: 'The file size of the source (original) media file, in bytes.'
example: 502000
readOnly: true
caption:
type:
- string
- 'null'
description: The caption to associated with the media file (usually placed in alt tags).
example: Our delicious coffee in a cup!
minLength: 1
maxLength: 255
dimensions:
anyOf:
- type: 'null'
- $ref: ./MediaDimensions.yaml
streams:
type:
- object
- 'null'
description: |-
Provides information on the video and audio streams in the source (original) media file.
This property will only be non-null if `file_type` is `video`.
required:
- video
- audio
properties:
video:
type: array
description: The video streams in the source (original) media file.
items:
type: object
properties:
width:
type: integer
minimum: 1
description: 'The width of the video stream, in pixels.'
example: 480
height:
type: integer
minimum: 1
description: 'The height of the video stream, in pixels.'
example: 270
codec:
type: string
description: The codec used in the video stream.
example: h264
frame_rate:
type: string
description: The average frame rate of the video stream.
example: 30/1
duration:
type: string
description: 'The duration of the video stream, in seconds.'
example: '30.033333'
bit_rate:
type: string
description: The bitrate of the video stream.
example: '301201'
aspect_ratio:
type: string
description: The aspect ratio of the video stream.
example: '16:9'
audio:
type: array
description: The audio streams in the source (original) media file.
items:
type: object
properties:
codec:
type: string
description: The codec used in the audio stream.
example: aac
channels:
type: integer
minimum: 1
description: The number of channels in the audio stream.
example: 2
duration:
type: string
description: 'The duration of the audio stream, in seconds.'
example: '30.526667'
bit_rate:
type: string
description: The bitrate of the audio stream.
example: '112000'
readOnly: true
created_at:
type: string
description: The date-time that the media was first uploaded.
format: date-time
readOnly: true