Video Smart Module endpoints for accessing stored video resources.

Endpoints

The Video Search Result object

  • itemsarray

    List of Video Item objects.

  • nextTokenstring

    The token string which is used for getting successive search results. This field will be omitted when there are no more items.

The Video Item object

  • homeIdinteger

    The ID of the home associated with the video resource.

  • searchKeystring

    The string attached to the resource for searching against.

  • videostring

    The URL for the actual video data

  • thumbnailstring

    The URL for the thumbnail image.

Get videos of a home

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/videos
Description

Retrieve stored videos in the specificed home and Video module.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

Query Parameters
  • searchKeyPrefix

    string

    When searchKeyPrefix is specified, all the videos whose searchKey is prefixed by this parameter will be returned. For example, if you specify searchKeyPrefix as "/foo/bar", videos with searchKey such as "/foo/bar/1" and "/foo/bar/bazz" will be returned. Note that you can specify either the searchKeyPrefix parameter or the searchKeys parameter.

  • searchKeys

    string

    required

    You can specify multiple searchKeys by using commas (",") as delimiters of the searchKeys. For example, if you specify the searchKeys parameter as "/foo/1,/bar/1", all the videos whose searchKey is either "/foo/1" or "/bar/1" will be returned. Note you can specify either the searchKeyPrefix parameter or the searchKeys parameter.

  • nextToken

    string

    The token representing the cursor for the video search result stream which is returned as a part of the search result of this API. For example, if there are 100 items that matches searchKeyPrefix=/foo and you retrieve it with the parameter limit=10, /videos API will return first 10 items and nextToken. Use the retuned nextToken to retrieve the items after first 10 items.

  • limit

    integer

    If non-zero, maximum number of entries to return. limit should be the number between 1 to 100.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200search result object that consists of nextToken and video array.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Response Body Sample

{
  "items": [
    {
      "homeId": 1234,
      "searchKey": "/foo/1",
      "video": "{url to mp4 file}",
      "thumbnail": "{url to image file}"
    },
    {
      "homeId": 1234,
      "searchKey": "/foo/2",
      "video": "{url to mp4 file}",
      "thumbnail": "{url to image file}"
    }
  ],
  "nextToken": "5f7fd2867a0b107eca40e784"
}