Resource: Movies

Topics:

Actions

  • - (Object) index(method = GET, url = '/rest/v1/movies')

Url:

  • [GET] /rest/v1/movies
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Note:

By default this request will only return movies with a active value of true. You need to explicitly request inactive movies in the url to receive them.

Returns all movies on the service

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (Boolean) active

    (optional) value of "true" will only return active movies, value of "false" will only return inactive movies, if not provided then only active movies will be returned

  • (Date) available

    (optional) displays content which will be playable on a particular date, date should be in ISO8601 format

  • (String) order

    (optional) specify order in which content is asc/desc

  • (Number) limit

    (optional) limit number of results to return

  • (String) sort

    (optional, required when using begin_date or end_date) can be promotion/popularity/available/expires or views, when sorting by available or expires this will result in only records with a value in the requested field being returned, eg, sort=available will only return records with a date in the available field, all other records will not be returned

  • (Date) begin_date

    (optional) is used to allow filtering content on either available or expires fields therefore you must use the sort param with this with a value of available or expires, date should be in ISO8601 format

  • (Date) end_date

    (optional) is used to allow filtering content on either available or expires fields therefore you must use the sort param with this with a value of available or expires, date should be in ISO8601 format

  • (String) sku

    (optional) filter results based on matching sku

Example Request:

Requesting all active movies on the service
https://service_name.synctv.com/rest/v1/movies?device=urn:synctv:devices:web:11223344

Requesting all inactive movies on the service
https://service_name.synctv.com/rest/v1/movies?device=urn:synctv:devices:web:11223344&active=false

Example Response:

<scbp>
  <movies>
    <movie>
      <id>10</id>
      <name>Alfie</name>
      <active>true</active>
      <description>Jude Law stars as Alfie Elkins</description>
      <copyright></copyright>
      <category>Drama</category>
      <sku></sku>
      <advisory>bbfc:15</advisory>
      <duration>6076</duration>
      <available>2011-10-14T00:00:00Z</available>
      <expires>2011-11-11T00:00:00Z</expires>
      <target_age_min></target_age_min>
      <target_age_max></target_age_max>
      <target_gender></target_gender>
      <audio_langs>eng</audio_langs>
      <resume></resume>
      <last_viewed></last_viewed>
      <tags>
        <tag>one</tag>
        <tag>three</tag>
        <tag>five</tag>
      </tags>
      <previews>
        <preview>
          <audio_langs>eng</audio_langs>
        </preview>
      </previews>
      <contributors>
        <contributor>
          <name>Jude Law</name>
          <role>Actor</role>
        </contributor>
        <contributor>
          <name>Julienne Davis</name>
          <role>Actor</role>
        </contributor>
      </contributors>
      <images>
        <image>
          <format>show_icon_lg</format>
          <url></url>
        </image>
        <image>
          <format>show_icon_poster</format>
          <url></url>
        </image>
        <image>
          <format>show_icon_poster_sm</format>
          <url></url>
        </image>
      </images>
      <links>
        <category>/rest/v1/categories/68/movies</category>
        <metadata>/rest/v1/movies/817</metadata>
        <formats>/rest/v1/movies/817/formats</formats>
        <media>/rest/v1/movies/817/media</media>
        <manifest>/rest/v1/movies/817/manifest.m3u8</manifest>
        <smooth_manifest></smooth_manifest>
        <preview_formats>/rest/v1/previews/188/formats</preview_formats>
        <preview_media>/rest/v1/previews/188/media</preview_media>
        <preview_manifest>/rest/v1/previews/188/manifest.m3u8</preview_manifest>
        <purchases>/rest/v1/movies/817/purchases</purchases>
        <rentals>/rest/v1/movies/817/rentals</rentals>
      </links>
    </movie>
  </movies>
</scbp>
  • - (Object) show(method = GET, url = '/rest/v1/movies/:id')

Url:

  • [GET] /rest/v1/movies/:id
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Returns details of a specific movie

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (Any) include_inactive

    (optional) the value of this can be anything, the presence of this param will signal to return a movie in active or inactive state

Example Request:

https://service_name.synctv.com/rest/v1/movies/100?device=urn:synctv:devices:web:11223344

Example Response:

<scbp>
  <movie>
    <id>10</id>
    <name>Alfie</name>
    <active>true</active>
    <description>Jude Law stars as Alfie Elkins</description>
    <copyright></copyright>
    <category>Drama</category>
    <sku></sku>
    <advisory>bbfc:15</advisory>
    <duration>6076</duration>
    <available>2011-10-14T00:00:00Z</available>
    <expires>2011-11-11T00:00:00Z</expires>
    <target_age_min></target_age_min>
    <target_age_max></target_age_max>
    <target_gender></target_gender>
    <audio_langs>eng</audio_langs>
    <resume></resume>
    <last_viewed></last_viewed>
    <tags>
      <tag>one</tag>
      <tag>three</tag>
      <tag>five</tag>
    </tags>
    <previews>
      <preview>
        <audio_langs>eng</audio_langs>
      </preview>
    </previews>
    <contributors>
      <contributor>
        <name>Jude Law</name>
        <role>Actor</role>
      </contributor>
      <contributor>
        <name>Julienne Davis</name>
        <role>Actor</role>
      </contributor>
    </contributors>
    <images>
      <image>
        <format>show_icon_lg</format>
        <url></url>
      </image>
      <image>
        <format>show_icon_poster</format>
        <url></url>
      </image>
      <image>
        <format>show_icon_poster_sm</format>
        <url></url>
      </image>
    </images>
    <links>
      <category>/rest/v1/categories/68/movies</category>
      <metadata>/rest/v1/movies/817</metadata>
      <formats>/rest/v1/movies/817/formats</formats>
      <media>/rest/v1/movies/817/media</media>
      <manifest>/rest/v1/movies/817/manifest.m3u8</manifest>
      <smooth_manifest></smooth_manifest>
      <preview_formats>/rest/v1/previews/188/formats</preview_formats>
      <preview_media>/rest/v1/previews/188/media</preview_media>
      <preview_manifest>/rest/v1/previews/188/manifest.m3u8</preview_manifest>
      <purchases>/rest/v1/movies/817/purchases</purchases>
      <rentals>/rest/v1/movies/817/rentals</rentals>
    </links>
  </movie>
</scbp>
  • - (Object) update(method = PUT, url = '/rest/v1/movies/:id')

Url:

  • [PUT] /rest/v1/movies/:id
Note:

This request requires admin access.

Updates a movie’s metadata

Arguments:

  • (Boolean) movie[active]

    (optional) sets the movie to active or inactive, accepts only "true" or "false"

  • (String) movie[name]

    (optional) sets the movie name

  • (String) movie[description]

    (optional) sets the movie description

  • (String) movie[copyright]

    (optional) sets the movie copyright

  • (String) movie[sku]

    (optional) sets the movie stock keeping unit, accepts any string

  • (String) movie[advisory]

    (optional) sets the movie advisory rating, accepts any string, max of 10 characters

  • (Integer) movie[duration]

    (optional) sets the move length in seconds

  • (Date) movie[available]

    (optional) sets the date which you wish the film to be playable from, if set the backend will prevent media playback until this date is reached, date should be in ISO8601 format or a blank string if you wish to remove the date

  • (Date) movie[expires]

    (optional) sets the date which you wish the film to not be playable after, if set the backend will prevent media playback after this date is reached, date should be in ISO8601 format or a blank string if you wish to remove the date

  • (Integer) movie[target_age_min]

    (optional) sets the minimum target age for the movie

  • (Integer) movie[target_age_max]

    (optional) sets the maximum target age for the movie

  • (String) movie[target_gender]

    (optional sets the target gender for the movie, any string, max of 10 characters

Example Request:

Request changing a movies name
https://service_name.synctv.com/rest/v1/movies/100?movie[name]=new_name

Example Response:

<scbp>
  <response>
    <message>Successfully completed.</message>
    <count>1</count>
    <code>1</code>
  </response>
  <movie>
    <sku nil="true"></sku>
    <description nil="true"></description>
    <available nil="true"></available>
    <active type="boolean">true</active>
    <expires nil="true"></expires>
    <target_gender nil="true"></target_gender>
    <target_age_min nil="true"></target_age_min>
    <advisory nil="true"></advisory>
    <target_age_max nil="true"></target_age_max>
    <category nil="true"></category>
    <copyright nil="true"></copyright>
    <name>My Movie</name>
    <id type="integer">902</id>
    <duration nil="true"></duration>
  </movie>
  <version>0.5</version>
</scbp>
  • - (Object) search(method = GET, url = '/rest/v1/search/movies')

Url:

  • [GET] /rest/v1/search/movies
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Returns all active movies on the service which match the search criteria provided

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (Boolean) active

    (optional) value of "true" will only return active movies, value of "false" will only return inactive movies, if not provided then only active movies will be returned

  • (String) name

    (optional) the search term used to find all movies with a name which partially or fully matches this parameter

  • (Date) available

    (optional) displays content which will be playable on a particular date, date should be in ISO8601 format

  • (String) order

    (optional) specify order in which content is asc/desc

  • (Number) limit

    (optional) limit number of results to return

  • (String) sort

    (optional, required when using begin_date or end_date) can be promotion/popularity/available/expires or views, when sorting by available or expires this will result in only records with a value in the requested field being returned, eg, sort=available will only return records with a date in the available field, all other records will not be returned

  • (Date) begin_date

    (optional) is used to allow filtering content on either available or expires fields therefore you must use the sort param with this with a value of available or expires, date should be in ISO8601 format

  • (Date) end_date

    (optional) is used to allow filtering content on either available or expires fields therefore you must use the sort param with this with a value of available or expires, date should be in ISO8601 format

Example Request:

Requesting all active movies on the service who have a name partially or fully matching "Alfie"
https://service_name.synctv.com/rest/v1/search/movies?name=Alfie&device=urn:synctv:devices:web:11223344

Example Response:

<scbp>
  <movies>
    <movie>
      <id>10</id>
      <name>Alfie</name>
      <active>true</active>
      <description>Jude Law stars as Alfie Elkins</description>
      <copyright></copyright>
      <category>Drama</category>
      <sku></sku>
      <advisory>bbfc:15</advisory>
      <duration>6076</duration>
      <available>2011-10-14T00:00:00Z</available>
      <expires>2011-11-11T00:00:00Z</expires>
      <target_age_min></target_age_min>
      <target_age_max></target_age_max>
      <target_gender></target_gender>
      <audio_langs>eng</audio_langs>
      <resume></resume>
      <last_viewed></last_viewed>
      <tags>
        <tag>one</tag>
        <tag>three</tag>
        <tag>five</tag>
      </tags>
      <previews>
        <preview>
          <audio_langs>eng</audio_langs>
        </preview>
      </previews>
      <contributors>
        <contributor>
          <name>Jude Law</name>
          <role>Actor</role>
        </contributor>
        <contributor>
          <name>Julienne Davis</name>
          <role>Actor</role>
        </contributor>
      </contributors>
      <images>
        <image>
          <format>show_icon_lg</format>
          <url></url>
        </image>
        <image>
          <format>show_icon_poster</format>
          <url></url>
        </image>
        <image>
          <format>show_icon_poster_sm</format>
          <url></url>
        </image>
      </images>
      <links>
        <category>/rest/v1/categories/68/movies</category>
        <metadata>/rest/v1/movies/817</metadata>
        <formats>/rest/v1/movies/817/formats</formats>
        <media>/rest/v1/movies/817/media</media>
        <manifest>/rest/v1/movies/817/manifest.m3u8</manifest>
        <smooth_manifest></smooth_manifest>
        <preview_formats>/rest/v1/previews/188/formats</preview_formats>
        <preview_media>/rest/v1/previews/188/media</preview_media>
        <preview_manifest>/rest/v1/previews/188/manifest.m3u8</preview_manifest>
        <purchases>/rest/v1/movies/817/purchases</purchases>
        <rentals>/rest/v1/movies/817/rentals</rentals>
      </links>
    </movie>
  </movies>
</scbp>