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:

  • Contributors

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

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/contributors.[xml|json]
  • [GET] /api/v2/media/:medium_id/contributors.[xml|json]

Returns a list of all contributors.

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 contributors.
[GET] https://service_name.synctv.com/api/v2/contributors.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>
  <contributors>
    <contributor>
      <id>1</id>
      <media_id>1</media_id>
      <program_id nil="true"/>
      <person>person name 7</person>
      <role>role 7</role>
    </contributor>
    <contributor>
      <id>2</id>
      <media_id>2</media_id>
      <program_id nil="true"/>
      <person>person name 8</person>
      <role>role 8</role>
    </contributor>
    <contributor>
      <id>3</id>
      <media_id>3</media_id>
      <program_id nil="true"/>
      <person>person name 9</person>
      <role>role 9</role>
    </contributor>
  </contributors>
</response>
Response Fields:
  • (Integer) contributor[id]
    The unique identifier of the contributor.
  • (String) contributor[media_id]
    The media_id associated with this contributor.
  • (String) contributor[person]
    The name of the contributor.
  • (String) contributor[role]
    The role of the contributor.

Url:

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

Returns the specified contributor.

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

<response>
  <contributor>
    <id>1</id>
    <media_id>1</media_id>
    <program_id nil="true"/>
    <person>person name 10</person>
    <role>role 10</role>
  </contributor>
</response>
Response Fields:
  • (Integer) contributor[id]
    The unique identifier of the contributor.
  • (String) contributor[media_id]
    The media_id associated with this contributor.
  • (String) contributor[person]
    The name of the contributor.
  • (String) contributor[role]
    The role of the contributor.

Url:

  • [POST] /api/v2/contributors.[xml|json]

Create a new contributor.

Note:
The associated media_id, role_id, and person_id must already exist.
Required Arguments:
  • (Integer) access_id
    Access id returned from Authorization (User) client_authorize.
  • (String) signature
    MD5 hash encoded string of query parameters.
  • (String) contributor[media_id]
    The media_id associated with the contributor.
  • (String) contributor[role_id]
    The role_id associated with the contributor.
  • (String) contributor[person_id]
    The person_id associated with the contributor.
Example Request

The following request creates a contributor associated to media id 100, contributor role id 1, and contributor person id 1.
[POST] https://service_name.synctv.com/api/v2/contributors.xml?contributor[media_id]=100&contributor[role_id]=1&contributor[person_id]=1&access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <contributor>
    <id>1</id>
    <media_id>1</media_id>
    <program_id nil="true"/>
    <person>person name 11</person>
    <role>role 11</role>
  </contributor>
</response>
Response Fields:
  • (Integer) contributor[id]
    The unique id of the contributor.
  • (String) contributor[media_id]
    The media_id associated with this contributor.
  • (String) contributor[person]
    The contributor's name.
  • (String) contributor[role]
    The contributor's role.

Url:

  • [PUT] /api/v2/contributors/:id.[xml|json]

Update the specified contributor.

Note:
This will return only success or failure, no content.
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 modifies contributor with id 5 to be associated with media_id 65, contributor role_id 1, and contributor person_id 3.
[PUT] https://service_name.synctv.com/api/v2/contributors/5.xml?contributor[media_id]=65&contributor[role_id]=1&contributor[person_id]=3&access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Request Field:
  • (String) contributor[media_id] — The media_id associated with the contributor.
  • (String) contributor[role_id] — The role_id associated with the contributor.
  • (String) contributor[person_id] — The person_id associated with the contributor.
Example Response
XML JSON

On success: HTTP 200
On error:   HTTP 400 with array of errors in message tags
<response>
  <code>-4</code>
  <messages>
    <message>Record not found</message>
    <message>Person record not found</message>
  </messages>
</response>

Url:

  • [DELETE] /api/v2/contributors/:id.[xml|json]

Delete the specified contributor.

Note:
This will return only success or failure, no content.
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 deletes contributor 100.
[DELETE] https://service_name.synctv.com/api/v2/contributors/100.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

On success: HTTP 200
On error:   HTTP 400 with array of errors in message tags
<response>
  <code>-4</code>
  <messages>
    <message>Record not found</message>
  </messages>
</response>