Get list of video assets

GET /assets

List all video assets in FastPix.

Query parameters

  • limit number Required

    Maximum count of items to include per page

  • offset number Required

    An integer that indicates the distance from the object's start to a particular element contained within the same object.

  • orderBy string Required

    Value can be either DESC or ASC, by default DESC

Responses

  • 200 application/json

    List of video assets

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • data array[object]
      Hide data attributes Show data attributes object
      • The term "thumbnail" originally applied to real, tiny drawings or pictures that roughly matched the size of a human thumbnail. On screens, nevertheless, it's frequently used to refer to digital images.

      • id string(uuid)

        The Asset Id is assigned a universal unique identifier, which can contain a maximum of 255 characters.

      • environmentId string(uuid)

        The Environment Id is assigned a universal unique identifier, which can contain a maximum of 255 characters.

      • metadata object

        Videos can be tagged with metadata tags in "key" : "value" pairs. You can search for videos with specific key value pairs using this parameter. Dynamic Metadata allows you to define a key that allows any value pair. Max: 255 characters. Upto 10 entries are allowed.

      • Max resolution can be used to control the maximum resolution your asset is encoded, stored, and streamed at. If not set, this defaults to 1080p.

      • Available resolution can be used to control the maximum resolution your asset is encoded, stored, and streamed at. If not set, this defaults to 1080p.

      • status string

        The status of the asset.

        • Possible values: 'preparing', 'ready'
      • Subtitles or captions are on-screen text synchronized with the audio of a video file. They provide a written transcript of the spoken words, enhancing the video's accessibility and comprehension.

        Default value is false.

      • playbackIds array[object]

        An array of Playback ID objects. Use these to create HLS playback URLs. See Play your videos for more details.

        Hide playbackIds attributes Show playbackIds attributes object
        • id string(uuid)

          Unique identifier for the PlaybackID

        • Determines if access to the streamed content is kept private or available to all.

      • tracks array[object]

        The individual media tracks that make up an asset.

        Hide tracks attributes Show tracks attributes object
        • id string(uuid)

          The track Id is assigned a universal unique identifier, which can contain a maximum of 255 characters.

        • type string Required

          The individual media tracks that make up an asset.

        • width number

          The maximum width in pixels available for the track. Only set for the video type track.

        • height number

          The maximum height in pixels available for the track. Only set for the video type track.

        • The maximum frame rate available for the track. Only set for the video type track. This field may return -1 if the frame rate of the input cannot be reliably determined.

      • duration number

        The duration of the asset in seconds (max duration for a single asset is 12 hours).

      • The maximum frame rate available for the track. Only set for the video type track. This field may return -1 if the frame rate of the input cannot be reliably determined.

      • The aspect ratio of a video is a value that describes the relative shape of a video based on its width and height.

      • createdAt string(date-time)

        Time the Asset was created, defined as a localDateTime (UTC Time).

      • updatedAt string(date-time)

        Time the Asset was updated, defined as a localDateTime (UTC Time).

    • Hide pagination attributes Show pagination attributes
      • It gives the total number of video assets that are accessible overall.

      • An integer representing the distance, as of right now, between the object's start and a specific element that it contains.

      • The offset count is expressed as total records by limit.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • error object
      Hide error attributes Show error attributes
      • code integer

        Displays the status code of the error.

      • message string

        It demonstrates the cause of the error.

  • 422 application/json

    Get video asset payload validation error

    Hide response attributes Show response attributes object
    • success boolean Required

      It demonstrates either the request is successfull or not.

    • error object Required
      Hide error attributes Show error attributes
      • code integer Required

        Displays the status code of the error.

      • message string Required

        It demonstrates the cause of the error.

      • fields array[object] Required
        Hide fields attributes Show fields attributes object
        • field string

          Shows the field name related to the error.

        • message string

          Shows why the error occur.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean
    • error object
      Hide error attributes Show error attributes
      • code number

        It demonstrates either the request is successfull or not.

      • message string

        It demonstrates the cause of the error.

GET /assets
curl \
 -X GET https://api.fastpix.io/v1/video/assets?limit=%7B%22available%22%3D%3E10%7D&offset=%7B%22availableValue%22%3D%3E1%7D&orderBy=%7B%22availableValue%22%3D%3E%22desc%22%7D \
 --user "username:password"
Response examples (200)
{
  "success": true,
  "data": [
    {
      "thumbnail": "https://images.fastpix.io/6b13fdaf-f9ac-4970-a13b-01ea417e8783/thumbnail.png",
      "trackFile": "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "environmentId": "5ta85f64-5717-4562-b3fc-2c963f66afa6",
      "metadata": {
        "key1": "value1"
      },
      "maxResolution": "1080p",
      "availableResolution": "1080p",
      "status": "preparing",
      "generateSubtitles": false,
      "playbackIds": [
        {
          "id": "6ta85f64-5717-4562-b3fc-2c963f66afa6",
          "accessPolicy": "public"
        }
      ],
      "tracks": [
        {
          "id": "9oa85f64-5717-4562-b3fc-2c963f66afa6",
          "type": "video",
          "width": 1920,
          "height": 1080,
          "frameRate": 29.97
        }
      ],
      "duration": 23,
      "frameRate": "29.97",
      "aspectRatio": "16:9",
      "createdAt": "2023-10-20T10:50:34.594302",
      "updatedAt": "2023-10-20T10:50:34.594302"
    }
  ],
  "pagination": {
    "totalRecords": 100,
    "currentOffset": 1,
    "offsetCount": 10
  }
}
Response examples (401)
{
  "success": false,
  "error": {
    "code": 401,
    "message": "Unauthorized"
  }
}
Response examples (422)
{
  "success": false,
  "error": {
    "code": 422,
    "message": "payload validation failed",
    "fields": [
      {
        "field": "fieldName",
        "message": "must not be null"
      }
    ]
  }
}
Response examples (400)
{
  "success": false,
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}