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:

  • Ownership factories

This document describes the API for reading ownership factories.

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

Returns a list of all ownership factories.

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 a list of all ownership factories.
https://service_name.synctv.com/api/v2/ownership_policies/ownership_factories.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.
  • (String) sort_order — Defines the sort order of the response, supported arguments, "id", "timeline_duration" (e.g. &sort_order=id).
  • (Boolean) sort_descending — Reverse order of sort_order sorting, make it descending.
  • (String) type — Filters by ownership factory type, e.g. "OwnershipPolicy::Factories::TimelineFactory"
Example Response
XML JSON

<response>
  <ownership_factories>
    <ownership_factory>
      <id>1</id>
      <name>MyString</name>
      <type>OwnershipPolicy::OwnershipFactory</type>
      <key>HD</key>
      <options>
      </options>
      <status>0</status>
      <created_at>2014-05-01T21:34:39Z</created_at>
      <updated_at>2014-05-01T21:34:39Z</updated_at>
      <timeline_duration nil="true"/>
    </ownership_factory>
    <ownership_factory>
      <id>2</id>
      <name>MyString</name>
      <type>OwnershipPolicy::OwnershipFactory</type>
      <key>HD</key>
      <options>
      </options>
      <status>0</status>
      <created_at>2014-05-01T21:34:39Z</created_at>
      <updated_at>2014-05-01T21:34:39Z</updated_at>
      <timeline_duration nil="true"/>
    </ownership_factory>
  </ownership_factories>
</response>
Response Fields:
  • (Integer) ownership_factory[id]
    The ownership factory's unique identifier.
  • (String) ownership_factory[name]
    The ownership factory's name.
  • (Integer) ownership_factory[timeline_duration]
    In case the instance is of type "OwnershipPolicy::Factories::TimelineFactory", timeline_duration returns the rental period denominated in minutes.
  • (String) ownership_factory[type]
    The ownership factory's specific type.
  • (String) ownership_factory[key]
    The ownership factory's key; it is used as part of the associated ownership_policy's key generation.
  • (Hash) ownership_factory[options]
    Hash array of configurable options unique to each ownership factory.
  • (Integer) ownership_factory[status]
    The status of the ownership factory (0 - inactive, 1 - active).
  • (DateTime) ownership_factory[created_at]
    The date of the ownership factory's creation.
  • (DateTime) ownership_factory[updated_at]
    The date of the ownership factory's last update.

Url:

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

Returns details of the specified ownership factory.

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 a ownership policy ownership factory 100.
https://service_name.synctv.com/api/v2/ownership_policies/ownership_factories/100.xml?access_id=1234&signature=674aaff974348eb1a1bdd72dce75053d
Example Response
XML JSON

<response>
  <ownership_factory>
    <id>100</id>
    <name>MyString</name>
    <type>OwnershipPolicy::OwnershipFactory</type>
    <key>HD</key>
    <options>
    </options>
    <status>0</status>
    <created_at>2014-05-01T21:34:40Z</created_at>
    <updated_at>2014-05-01T21:34:40Z</updated_at>
    <timeline_duration nil="true"/>
  </ownership_factory>
</response>
Response Fields:
  • (Integer) ownership_factory[id]
    The ownership factory's unique identifier.
  • (String) ownership_factory[name]
    The ownership factory's name.
  • (Integer) ownership_factory[timeline_duration]
    In case the instance is of type "OwnershipPolicy::Factories::TimelineFactory", timeline_duration returns the rental period denominated in minutes.
  • (String) ownership_factory[type]
    The ownership factory's specific type.
  • (String) ownership_factory[key]
    The ownership factory's key; it is used as part of the associated ownership_policy's key generation.
  • (Hash) ownership_factory[options]
    Hash array of configurable options unique to each ownership factory.
  • (Integer) ownership_factory[status]
    The status of the ownership factory (0 - inactive, 1 - active).
  • (DateTime) ownership_factory[created_at]
    The date of the ownership factory's creation.
  • (DateTime) ownership_factory[updated_at]
    The date of the ownership factory's last update.