Update an asset by ID

PATCH /assets/{assetId}

Updates the parameters of an asset that has already been created. Only a portion of variables are supported at this time. Give FastPix the updated parameters and the asset ID, and it will return the relevant asset data.

Path parameters

  • assetId string(uuid) Required

    UUID of Stream

application/json

Body

  • 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.

Responses

  • 200 application/json

    Asset details updated successfully

    Hide response attributes Show response attributes object
    • success boolean

      It demonstrates either the request is successfull or not.

    • data object
      Hide data attributes Show data attributes
      • 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).

  • 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.

  • 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.

  • 422 application/json

    Payload Validation Failed

    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.

  • 404 application/json

    Asset Not Found

    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 number

        It demonstrates either the request is successfull or not.

      • message string

        It demonstrates the cause of the error.

PATCH /assets/{assetId}
curl \
 -X PATCH https://api.fastpix.io/v1/video/assets/{"availableValue"=>"4fa85f64-5717-4562-b3fc-2c963f66afa6"} \
 --user "username:password" \
 -H "Content-Type: application/json" \
 -d '{"metadata":{"key1":"value1"}}'
Request example
{
  "metadata": {
    "key1": "value1"
  }
}
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"
  }
}
Response examples (401)
{
  "success": false,
  "error": {
    "code": 401,
    "message": "Unauthorized"
  }
}
Response examples (400)
{
  "success": false,
  "error": {
    "code": 400,
    "message": "Bad Request"
  }
}
Response examples (422)
{
  "success": false,
  "error": {
    "code": 422,
    "message": "payload validation failed",
    "fields": [
      {
        "field": "fieldName",
        "message": "must not be null"
      }
    ]
  }
}
Response examples (404)
{
  "success": false,
  "error": {
    "code": 404,
    "message": "Asset Not Found"
  }
}