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:

  • Container groups

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

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

Returns a list of all container groups.

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

The following example will return a list of all container groups.
https://service_name.synctv.com/api/v2/container_groups.xml?access_id=4321&signature=b6d0c3f3b6e4416d48f9432264a75f2a
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>
  <container_group>
    <container_group>
      <id>1</id>
      <container_ids>
        <container_id>1</container_id>
        <container_id>2</container_id>
        <container_id>3</container_id>
        <container_id>4</container_id>
      </container_ids>
    </container_group>
    <container_group>
      <id>2</id>
      <container_ids>
        <container_id>5</container_id>
        <container_id>6</container_id>
        <container_id>7</container_id>
        <container_id>8</container_id>
      </container_ids>
    </container_group>
    <container_group>
      <id>3</id>
      <container_ids>
        <container_id>9</container_id>
        <container_id>10</container_id>
        <container_id>11</container_id>
        <container_id>12</container_id>
      </container_ids>
    </container_group>
  </container_group>
</response>
Response Fields:
  • (Integer) id
    The unique identifier of the container group itself.
  • (Integer) container_id
    The unique identifier of a container in the container group.

Url:

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

Returns the specified container group.

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

The following example retrieves the record for container group 100.
https://service_name.synctv.com/api/v2/container_groups/100.xml?access_id=4321&signature=b6d0c3f3b6e4416d48f9432264a75f2a
Example Response
XML JSON

<response>
  <container_group>
    <id>100</id>
    <container_ids>
      <container_id>1</container_id>
      <container_id>2</container_id>
      <container_id>3</container_id>
      <container_id>4</container_id>
    </container_ids>
  </container_group>
</response>
Response Fields:
  • (Integer) id
    The unique identifier of the container group itself.
  • (Integer) container_id
    The unique identifier of a container in the container group.

Url:

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

Creates a new container group.

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

The following example creates a new container group with the containers 1, 2, 3 and 4.
https://service_name.synctv.com/api/v2/container_groups.xml?access_id=4321&container_group[container_ids][]=1&container_group[container_ids][]=2&container_group[container_ids][]=3&container_group[container_ids][]=3&signature=b6d0c3f3b6e4416d48f9432264a75f2a
Request Field:
  • (String) container_group[container_ids][] — The unique identifier of each container to be placed into the container group.
Example Response
XML JSON

<response>
  <container_group>
    <id>1</id>
    <container_ids>
      <container_id>1</container_id>
      <container_id>2</container_id>
      <container_id>3</container_id>
      <container_id>4</container_id>
    </container_ids>
  </container_group>
</response>
Response Fields:
  • (Integer) id
    The unique identifier of the container group itself.
  • (Integer) container_id
    The unique identifier of a container in the container group.

Url:

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

Updates the specified container group.

Note:
This will only return success or failure, no content.
Required Arguments:
  • (Integer) access_id
    (required) Access id returned from Authorization (User) client_authorize.
  • (String) signature
    (required) MD5 hash encoded string of query parameters.
Example Request

The following example will update container group 23 by including container 23 and 24 in the group.
https://service_name.synctv.com/api/v2/container_groups/23.xml?access_id=4321&container_group[container_ids][]=23&container_group[container_ids][]=24&signature=b6d0c3f3b6e4416d48f9432264a75f2a
Request Field:
  • (String) container_group[container_ids][] — The unique identifier of each container to be placed into the container group.
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>

Url:

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

Deletes the specified container group.

Note:
This will only return success or failure, no content.
Required Arguments:
  • (Integer) access_id
    (required) Access id returned from Authorization (User) client_authorize.
  • (String) signature
    (required) MD5 hash encoded string of query parameters.
Example Request

The following URL deletes container_group 100
https://service_name.synctv.com/api/v2/container_groups/100.xml?access_id=4321&signature=b6d0c3f3b6e4416d48f9432264a75f2a
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>