Skip to main content

VOD Thumbnail API (1.0.0)

Download OpenAPI specification:Download

Generates a list of thumbnail URLs for a given user, device, time range, resolution, and interval. The URL host is provided by service configuration (e.g., env var VOD_THUMBNAIL_HOST) and cannot be overridden by the client.

Thumbnails

Operations for generating and listing thumbnail URLs

Generate a list of thumbnail URLs for a time range

Returns an array of thumbnail URLs and their timestamps (offset in ms from start_timestamp). The URL host is determined by service configuration and is not client-configurable. The time range may not exceed 24 hours. Pagination is supported via page and page_size. Offsets start at 0, and the thumbnail at end_timestamp is included when (end - start) is an exact multiple of interval and a recording exists at that moment. Thumbnails are generated only for periods covered by recording events from an upstream recording service; gaps without recordings are skipped.

Authorizations:
BearerAuth
query Parameters
user_id
required
string (MongoId) ^[a-fA-F0-9]{24}$
Example: user_id=627d8ca8297a3d00019e2abb

MongoDB ObjectId of the user

device_id
required
string (MongoId) ^[a-fA-F0-9]{24}$
Example: device_id=627d911f7f58e4f344ca726c

MongoDB ObjectId of the device

start_timestamp
required
integer <int64> >= 0
Example: start_timestamp=1757371980000

Start of range in milliseconds since epoch (UTC)

end_timestamp
required
integer <int64> >= 0
Example: end_timestamp=1757375580000

End of range in milliseconds since epoch (UTC), inclusive. Must be >= start_timestamp and within 24h of start. A thumbnail at exactly end_timestamp is included when (end - start) % interval == 0 and a recording exists at that moment.

resolution
required
string^(?:(?:[1-9])|(?:[1-9][0-9])|(?:[1-5][0-9]{2}...
Example: resolution=320x240

Thumbnail resolution in "x" format. Output URLs use "w{width}-h{height}". Maximum allowed size is 640x480. Requests exceeding this size are rejected with 422.

interval
required
integer <int64> >= 1000
Example: interval=480000

Interval between thumbnails in milliseconds. Must be at least 1000ms (1 second) and must not exceed the total range duration (end_timestamp - start_timestamp). Requests violating these constraints are rejected with 422.

page
integer >= 1
Default: 1

1-based page index

page_size
integer [ 1 .. 1000 ]
Default: 1000

Number of items per page (max 1000)

Responses

Request samples

curl -G \
  -H "Authorization: Bearer ${API_TOKEN}" \
  --data-urlencode "user_id=627d8ca8297a3d00019e2abb" \
  --data-urlencode "device_id=627d911f7f58e4f344ca726c" \
  --data-urlencode "start_timestamp=1757371980000" \
  --data-urlencode "end_timestamp=1757375580000" \
  --data-urlencode "resolution=320x240" \
  --data-urlencode "interval=480000" \
  --data-urlencode "page=1" \
  --data-urlencode "page_size=1000" \
  "http://localhost:8080/v1/thumbnails/search"

Response samples

Content type
application/json

Fetch a single thumbnail image

Served by the API gateway (NGINX) via proxy to the thumbnail origin. This endpoint is documented here because it is part of the public API surface, but is not implemented by this Node service. The path encodes the playback rate, transcode flag, and a filename in the form: thumb-{offset}-w{width}-h{height}.jpg

Authorizations:
BearerAuth
path Parameters
user_id
required
string (MongoId) ^[a-fA-F0-9]{24}$

MongoDB ObjectId of the user

device_id
required
string (MongoId) ^[a-fA-F0-9]{24}$

MongoDB ObjectId of the device

start_timestamp
required
integer <int64> >= 0

Start of range in milliseconds since epoch (UTC)

end_timestamp
required
integer <int64> >= 0

End of range in milliseconds since epoch (UTC), inclusive

playback_rate
required
string
Value: "1"

Fixed playback rate. Present for compatibility with upstream path format.

transcode_flag
required
string
Value: "false"

Fixed transcode flag. Present for compatibility with upstream path format.

filename
required
string^thumb-(\d+)-w(\d+)-h(\d+)\.jpg$
Example: thumb-480000-w320-h240.jpg

Filename embedding offset and resolution. Pattern thumb-{offset}-w{width}-h{height}.jpg

Responses

Response samples

Content type
application/problem+json
{
  • "type": "../dictionary",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "../dictionary"
}