Video
Video Smart Module endpoints for accessing stored video resources.
Endpoints
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 specified 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
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.
sortBy
string
You can specify the sort field and order for the video item list. It should be in form of sortField:sortOrder. For sortField,
searchKey
is the only available option currently. (Video items are sorted bysearchKey
in dictionary order.) For sortOrder you can choose eitherasc
ordesc
. You cannot assume any order for video items that have the samesearchKey
.Default value is
searchKey:asc
skip
integer
Number of videos to skip over.
limit
integer
If non-zero, maximum number of entries to return. limit should be the number between 1 to 100.
Default value is
20
Minimum value is
1
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
[
{
"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}"
}
]
Delete a video
Endpoint
delete /homes/{homeId}/smartModules/{moduleId}/videos
Description
Delete the video which has a specified searchKey. If multiple videos have the searchKey, all the videos will be deleted.
Path Parameters
homeId
integer
required
The unique id for a home.
moduleId
string
required
The unique id for a smart module.
Query Parameters
searchKey
string
required
A searchKey for the video to be deleted.
Request Headers What's this?
Authorization
required
Must contain a user or project API key.
Response
- 204The video has been successfully deleted. There is no response body.