media

Reupload a media

Changed on

Initiates a reupload of a media, replacing its file or URL and optionally changing its hosting_type (limit of 10,000 reuploads per media). Reuploads might affect audio and text tracks associated with a media. Learn more here

put/v2/sites/{site_id}/media/{media_id}/reupload/

Request

  • Base URL
    https://api.jwplayer.com
  • URL
    https://api.jwplayer.com/v2/sites/{site_id}/media/{media_id}/reupload/
  • Auth
    API key in header Authorization

Path parameters

site_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the site

media_idstring required

Unique identifier for a resource

Example:Ny05CEfj

Unique alphanumeric ID of the media

Request body

hosting_type'external' | 'hosted' | 'renditions' | 'ott_data'

Converts the media to a different hosting type. Uses the same upload requirements as creating a media. If omitted, the media keeps its current hosting type.

transcoding_config_idstring

For reuploads to a hosting_type of renditions, the ID of the transcoding config used to create renditions from the new source file. If omitted, the site's default transcoding config is used. Not supported for other hosting types.

Example request

{
  "upload": {
    "trim_in_point": "00:00:01",
    "trim_out_point": "00:01:00.123"
  },
  "transcoding_config_id": "aBcD1234"
}

Response

Media reupload successfully initiated

schemastring
idstring

Unique identifier for a resource

createdstring

Date and time at which the resource was created

last_modifiedstring

Date and time at which the resource was most recently modified

typestring

Name of the type of resource.

status'created' | 'processing' | 'ready' | 'updating' | 'failed'

Media upload status

media_type'audio' | 'video'
hosting_type'external' | 'hosted' | 'renditions'

Indicates whether JW Platform hosts and transcodes the media or not. Possible values: - external: The media is transcoded and hosted by a third-party - hosted: The media is transcoded and hosted by JW Platform - renditions: The media is transcoded by a third party but hosted on JW Platform

mime_type'video/mp4' | 'video/webm' | 'video/flv' | 'audio/aac' | 'audio/mpeg' | 'audio/ogg' | 'application/vnd.apple.mpegurl' | 'application/smil+xml' | 'application/dash+xml' | 'video/flash'
error_messagestring

Message describing an issue uploading or processing the media

external_idstring

Non-JWX ID for the media A maximum of 64 characters is permitted.

durationnumber

Length of the media in seconds

trim_in_pointstring

Starting point to trim the video

trim_out_pointstring

Ending point to trim the video

source_urlstring nullable

URL of the source asset for externally hosted media Read-only. Set only for media with a hosting_type of external; null for all other hosting types.

md5string nullable

MD5 hash of the media asset, as a 32-character hexadecimal string Read-only. null until JW Platform has processed the source asset, and for media whose source asset JW Platform does not process.

Example response

{
  "schema": "https://schema.jwplayer.com/types/thumbnail.json",
  "id": "Ny05CEfj",
  "created": "2019-09-25T15:29:11.042095+00:00",
  "last_modified": "2019-09-25T15:29:11.042095+00:00",
  "relationships": {
    "protection_rule": {
      "id": "Ny05CEfj"
    }
  },
  "metadata": {
    "title": "My Media Title",
    "description": "My media description",
    "author": "Jane Doe",
    "permalink": "http://www.mysite.com",
    "category": "Automotive",
    "publish_start_date": "2018-10-03T21:19:36.602019+00:00",
    "publish_end_date": "2018-10-03T21:19:36.602019+00:00",
    "tags": [
      "test1",
      "happy1",
      "one",
      "two",
      "four"
    ],
    "custom_params": {
      "param1": "value1"
    },
    "external_id": "myvideo123"
  },
  "status": "ready",
  "media_type": "video",
  "hosting_type": "hosted",
  "error_message": "Something went wrong!",
  "external_id": "myvideo123",
  "duration": 437,
  "trim_in_point": "00:00:01",
  "trim_out_point": "00:01:00.123",
  "source_url": "https://www.example.com/video.mp4",
  "md5": "7f1d1d1c0e5b6a5f4c3b2a1908070605"
}

Changes

    • breaking

      the / response's property type changed from object to no type for status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added subschema #2 to the / response property allOf list for the response status