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:

  • Media types

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

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/media_types.[xml|json]

Returns a list of all media types.

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 URL returns a listing of all media types.
[GET] https://service_name.synctv.com/api/v2/media_types.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>
  <media_types>
    <media_type>
      <id>1</id>
      <name>MediaType-29</name>
    </media_type>
    <media_type>
      <id>2</id>
      <name>MediaType-30</name>
    </media_type>
  </media_types>
</response>
Response Fields:
  • (Integer) media_type[id]
    The unique identifier of the media type.
  • (String) media_type[name]
    The name of the media type.

Url:

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

Returns information for the specified media_type.

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 URL returns the media type information for media_type 100. 
[GET] https://service_name.synctv.com/api/v2/media_types/100.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <media_types>
    <id>100</id>
    <name>MediaType-31</name>
  </media_types>
</response>
Response Fields:
  • (Integer) media_type[id]
    The unique identifier of the media type.
  • (String) media_type[name]
    The name of the media type.