Admin APIs
At its core, SyncTV is an API driven service. The APIs themselves are easy enough for developers to understand, but understanding the ecosystem is a little trickier. We've created the following tutorials to help you get your head around it.

Topics:

  • Subtitles

This document describes the API for creating, reading, updating and deleting specified ingest_video's subtitle.

Note:
Each call to the SyncTV V2 API described in this section requires a MD5 hash signature.
See the Authorization (User) API for details on generating the MD5 hash signature.
Actions

Url:

  • [GET] /api/v2/ingest_videos/:ingest_video_id/subtitles.[xml|json]
  • [GET] /api/v2/media/:medium_id/subtitle.[xml|json]

Returns a list of subtitles belonging to the specified ingest_video or medium.

Required Arguments:
  • (Integer) access_id
    Access id returned from Authorization (User) client_authorize.
  • (String) signature
    MD5 hash encoded string of query parameters.
Example Request

The following example returns all subtitles for the specified ingest_video.
[GET] https://service_name.synctv.com/api/v2/ingest_videos/100/subtitles.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d

The following example returns all subtitles for the specified media.
[GET] https://service_name.synctv.com/api/v2/media/100/subtitles.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Request Field:
  • (Integer) offset — Used for pagination of response data (default: 25 items per response). Specifies the offset of the next block of data to receive.
  • (String) by_language — Filters response based on language.
  • (String) by_format — Filters response based on format.
Example Response
XML JSON

<response>
  <subtitles>
    <subtitle>
      <id>1</id>
      <file_path>path-1</file_path>
      <file_size>1001</file_size>
      <language nil="true"/>
      <format nil="true"/>
      <remove_on nil="true"/>
      <iteration>0</iteration>
      <marked_for_deletion>false</marked_for_deletion>
      <file_url>http://static.mytf1vod.fr/synctv/path-1</file_url>
      <ingest_id>1</ingest_id>
    </subtitle>
    <subtitle>
      <id>2</id>
      <file_path>path-2</file_path>
      <file_size>1002</file_size>
      <language nil="true"/>
      <format nil="true"/>
      <remove_on nil="true"/>
      <iteration>0</iteration>
      <marked_for_deletion>false</marked_for_deletion>
      <file_url>http://static.mytf1vod.fr/synctv/path-2</file_url>
      <ingest_id>2</ingest_id>
    </subtitle>
  </subtitles>
</response>
Response Fields:
  • (Integer) subtitle[id]
    The subtitle's unique identifier.
  • (Integer) subtitle[ingest_id]
    The id of the associated ingest videos.
  • (Integer) subtitle[file_size]
    The subtitle file's size (in bytes).
  • (String) subtitle[file_path]
    Internal relative path to the subtitle file.
  • (String) subtitle[file_url]
    Url to the subtitle file.
  • (String) subtitle[lanugage]
    Language of the subtitle file.
  • (String) subtitle[format]
    Format of the subtitle file.
  • (Integer) subtitle[iteration]
    The count of ingest passing through the workflow.
  • (DateTime) subtitle[remove_on]
    Date to remove the subtitle.

Url:

  • [GET] /api/v2/ingest_videos/:ingest_video_id/subtitles/:id.[xml|json]
  • [GET] /api/v2/media/:medium_id/subtitle/:id.[xml|json]

Returns the specified ingest_video or medium's specified subtitle.

Required Arguments:
  • (Integer) access_id
    Access id returned from Authorization (User) client_authorize.
  • (String) signature
    MD5 hash encoded string of query parameters.
Example Request

The following example returns information for ingest_video 100's subtitle 40.
[GET] https://service_name.synctv.com/api/v2/ingest_videos/100/subtitles/40.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d

The following example returns information for media 100's subtitle 40.
[GET] https://service_name.synctv.com/api/v2/media/100/subtitles/40.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <subtitle>
    <id>40</id>
    <file_path>path-3</file_path>
    <file_size>1003</file_size>
    <language nil="true"/>
    <format nil="true"/>
    <remove_on nil="true"/>
    <iteration>0</iteration>
    <marked_for_deletion>false</marked_for_deletion>
    <file_url>http://static.mytf1vod.fr/synctv/path-3</file_url>
    <ingest_id>1</ingest_id>
  </subtitle>
</response>
Response Fields:
  • (Integer) subtitle[id]
    The subtitle's unique identifier.
  • (Integer) subtitle[ingest_id]
    The id of the associated ingest videos.
  • (Integer) subtitle[file_size]
    The subtitle file's size (in bytes).
  • (String) subtitle[file_path]
    Internal relative path to the subtitle file.
  • (String) subtitle[file_url]
    Url to the subtitle file.
  • (String) subtitle[language]
    Language of the subtitle file.
  • (String) subtitle[format]
    Format of the subtitle file.
  • (Integer) subtitle[iteration]
    The count of ingest passing through the workflow.
  • (DateTime) subtitle[remove_on]
    Date to remove the subtitle.