YQueue DocsDevelopers

Schema

Media

Represents a file that is stored in the media library.

  • Foundation

Overview

object · 12 properties · 12 required

Properties

uuid

string Required

The media file's unique identifier.

Format uuid
Read only Yes

name

string Required

The media file's display name.

Example Latte in coffee cup
Min length 1
Max length 255

file_type

string Required

The generic file type associated with the media file.

Read only Yes

Allowed values

imagevideoaudio

url

string Required

The URL to the source (original) media file.

Format uri
Example https://media-library-cdn.yqueue.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg
Read only Yes

preview_url

string Required

The URL to the preview of the media file.

Format uri
Example https://media-library-cdn.yqueue.co/9793890a-fe2d-41b4-9ed5-7894c8b0a2b2/lattle_in_cup.jpg
Read only Yes

file_name

string Required

The original name of the media file.

Example lattle_in_cup.jpg
Read only Yes

mime_type

string Required

The mime type associated with the source (original) media file.

Example image/jpeg
Read only Yes

size_as_bytes

integer Required

The file size of the source (original) media file, in bytes.

Example 502000
Minimum 1
Read only Yes

caption

string | null Required

The caption to associate with the media file (usually placed in alt tags).

Example Our delicious coffee in a cup!
Min length 1
Max length 255
Nullable Yes

dimensions

anyOf Required
Nullable Yes
Read only Yes
Any of

Any of 1

null

Any of 2

reference

References Dimensions.

streams

object | null Required

Provides information on the video and audio streams in the source (original) media file. Image files have dimensions and no streams. Video files have dimensions and streams. Audio files have streams and no dimensions.

Nullable Yes
Read only Yes
Nested properties

video

array Required

The video streams in the source (original) media file.

Array items
Items
object
Nested properties
width
integer | null Required

The width of the video stream, in pixels.

Example 480
Minimum 1
Nullable Yes
height
integer | null Required

The height of the video stream, in pixels.

Example 270
Minimum 1
Nullable Yes
codec
string | null Required

The codec used in the video stream.

Example h264
Nullable Yes
frame_rate
string | null Required

The average frame rate of the video stream.

Example 30/1
Nullable Yes
duration
string | null Required

The duration of the video stream, in seconds.

Example 30.033333
Nullable Yes
bit_rate
string | null Required

The bitrate of the video stream.

Example 301201
Nullable Yes
aspect_ratio
string | null Required

The aspect ratio of the video stream.

Example 16:9
Nullable Yes

audio

array Required

The audio streams in the source (original) media file.

Array items
Items
object
Nested properties
codec
string | null Required

The codec used in the audio stream.

Example aac
Nullable Yes
channels
integer | null Required

The number of channels in the audio stream.

Example 2
Minimum 1
Nullable Yes
duration
string | null Required

The duration of the audio stream, in seconds.

Example 30.526667
Nullable Yes
bit_rate
string | null Required

The bitrate of the audio stream.

Example 112000
Nullable Yes

created_at

string Required

The date-time that the media was first uploaded.

Format date-time
Read only Yes

Used by

Raw YAML
Download source
title: Media
type: object
description: Represents a file that is stored in the media library.
x-tags:
  - Foundation
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:
    type: string
    enum:
      - image
      - video
      - audio
    description: The generic file type associated with the media file.
    readOnly: true
  url:
    type: string
    format: uri
    description: The URL to the source (original) media file.
    example: 'https://media-library-cdn.yqueue.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.yqueue.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 associate 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: ./Dimensions.yaml
    readOnly: true
  streams:
    type:
      - object
      - 'null'
    description: |-
      Provides information on the video and audio streams in the source (original) media file.

      Image files have dimensions and no streams. Video files have dimensions and streams. Audio files have streams and no dimensions.
    required:
      - video
      - audio
    properties:
      video:
        type: array
        description: The video streams in the source (original) media file.
        items:
          type: object
          required:
            - width
            - height
            - codec
            - frame_rate
            - duration
            - bit_rate
            - aspect_ratio
          properties:
            width:
              type:
                - integer
                - 'null'
              minimum: 1
              description: 'The width of the video stream, in pixels.'
              example: 480
            height:
              type:
                - integer
                - 'null'
              minimum: 1
              description: 'The height of the video stream, in pixels.'
              example: 270
            codec:
              type:
                - string
                - 'null'
              description: The codec used in the video stream.
              example: h264
            frame_rate:
              type:
                - string
                - 'null'
              description: The average frame rate of the video stream.
              example: 30/1
            duration:
              type:
                - string
                - 'null'
              description: 'The duration of the video stream, in seconds.'
              example: '30.033333'
            bit_rate:
              type:
                - string
                - 'null'
              description: The bitrate of the video stream.
              example: '301201'
            aspect_ratio:
              type:
                - string
                - 'null'
              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
          required:
            - codec
            - channels
            - duration
            - bit_rate
          properties:
            codec:
              type:
                - string
                - 'null'
              description: The codec used in the audio stream.
              example: aac
            channels:
              type:
                - integer
                - 'null'
              minimum: 1
              description: The number of channels in the audio stream.
              example: 2
            duration:
              type:
                - string
                - 'null'
              description: 'The duration of the audio stream, in seconds.'
              example: '30.526667'
            bit_rate:
              type:
                - string
                - 'null'
              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

Search documentation

Search across this documentation site.