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:

  • Image formats

This document describes the API for creating, reading, updating and deleteing Image Formats.

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/platforms/:platform_id/image_formats.[xml|json]

Returns a list of Image Formats for the specified platform.

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 all image formats for platform 100.
[GET] https://service_name.synctv.com/api/v2/platforms/100/image_formats.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.
  • (Integer) with_width — Filters response to include only formats created with a certain width.
  • (Integer) width_less_than — Filters response to include only formats created with a width less than one specified.
  • (Integer) width_greater_than — Filters response to include only formats created with a width greater than one specified.
  • (Integer) with_height — Filters response to include only formats created with a certain height.
  • (Integer) height_less_than — Filters response to include only formats created with a height less the one specified.
  • (Integer) height_greater_than — Filters response to include only formats created with a height greater the one specified.
  • (Float) with_aspect_ratio — Filters response to include only formats created with a certain height.
  • (Float) aspect_ratio_less_than — Filters response to include only formats created with an aspect_ratio less the one specified.
  • (Float) aspect_ratio_greater_than — Filters response to include only formats created with an aspect_ratio greater the one specified.
Example Response
XML JSON

<response>
  <image_formats>
    <image_format>
      <id>1</id>
      <format>jpg</format>
      <width>1024</width>
      <height>768</height>
      <is_source nil="true"/>
      <aspect_ratio>1.33</aspect_ratio>
    </image_format>
    <image_format>
      <id>2</id>
      <format>jpg</format>
      <width>1024</width>
      <height>768</height>
      <is_source nil="true"/>
      <aspect_ratio>1.33</aspect_ratio>
    </image_format>
  </image_formats>
</response>
Response Fields:
  • (List) image_formats
    A list of image formats. See below for description of image format fields.

Url:

  • [GET] /api/v2/platforms/:platform_id/image_formats/:id.[xml|json]

Returns the specified platform's specified Image Format.

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 information for platform 100's imageformat 335.
[GET] https://service_name.synctv.com/api/v2/platforms/100/image_formats/335.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <image_format>
    <id>335</id>
    <format>jpg</format>
    <width>1024</width>
    <height>768</height>
    <is_source nil="true"/>
    <aspect_ratio>1.33</aspect_ratio>
  </image_format>
</response>
Response Fields:
  • (Integer) id
    The image format's unique identifier.
  • (String) format
    The format of the image (e.g. 'jpg', 'png').
  • (Integer) width
    The width of the image.
  • (Integer) height
    The height of the image.
  • (Boolean) is_source
    Indicates whether or not this is a source image format.