Client 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:

  • Programs

This document describes the API for creating, reading, updating and deleting programs.

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

Url:

  • [GET] /api/v2/programs.[xml|json]

Returns a list of all programs.

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 request returns a list of all programs.
[GET] https://service_name.synctv.com/api/v2/programs.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.
Example Response
XML JSON

<response>
  <programs>
    <program>
      <id>1</id>
      <name>Media-1</name>
      <description nil="true"/>
      <schedule_ids/>
      <properties>
      </properties>
    </program>
    <program>
      <id>2</id>
      <name>Media-2</name>
      <description nil="true"/>
      <schedule_ids/>
      <properties>
      </properties>
    </program>
    <program>
      <id>3</id>
      <name>Media-3</name>
      <description nil="true"/>
      <schedule_ids/>
      <properties>
      </properties>
    </program>
  </programs>
</response>
Response Fields:
  • (Integer) program[id]
    The unique identifier of the program.
  • (String) program[name]
    The name of the program.
  • (String) program[description]
    The description of the program.
  • (Hash) program[meta_data]
    The metadata for the program; represented by (key, value) pairs.
  • (Array) program[schedule_ids]
    The schedules associated with a given program.

Url:

  • [GET] /api/v2/programs/:id.[xml|json]

Returns the specified program.

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 the information for program 9.
[GET] https://service_name.synctv.com/api/v2/programs/9.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <program>
    <id>1</id>
    <name>Media-4</name>
    <description nil="true"/>
    <schedule_ids/>
    <properties>
    </properties>
  </program>
  <contributors>
    <contributor>
      <id>1</id>
      <media_id>1</media_id>
      <program_id nil="true"/>
      <person>person name 4</person>
      <role>role 4</role>
    </contributor>
    <contributor>
      <id>2</id>
      <media_id>2</media_id>
      <program_id nil="true"/>
      <person>person name 5</person>
      <role>role 5</role>
    </contributor>
    <contributor>
      <id>3</id>
      <media_id>3</media_id>
      <program_id nil="true"/>
      <person>person name 6</person>
      <role>role 6</role>
    </contributor>
  </contributors>
</response>
Response Fields:
  • (Integer) program[id]
    The unique identifier of the program.
  • (String) program[name]
    The name of the program.
  • (String) program[description]
    The description of the program.
  • (Hash) program[meta_data]
    The metadata for the program; represented by (key, value) pairs.
  • (Array) program[schedule_ids]
    The schedules associated with a given program.
  • (Element) program[contributors]
    Contains some fields listing the contributors associated with the program.