{
"id": "place.stream.media.getVideo",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "VideoNotFound",
"description": "No record indexed at the supplied AT-URI."
}
],
"output": {
"schema": {
"ref": "#videoView",
"type": "ref"
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"uri"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the place.stream.video record."
}
}
},
"description": "Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away."
},
"videoView": {
"type": "object",
"required": [
"uri",
"cid",
"author",
"record",
"viewCounts",
"likeCount"
],
"properties": {
"cid": {
"type": "string",
"format": "cid"
},
"uri": {
"type": "string",
"format": "at-uri"
},
"author": {
"ref": "app.bsky.actor.defs#profileViewBasic",
"type": "ref"
},
"record": {
"type": "unknown"
},
"tracks": {
"type": "array",
"items": {
"ref": "place.stream.media.track#trackView",
"type": "ref"
}
},
"likeCount": {
"type": "integer",
"minimum": 0,
"description": "Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally."
},
"viewCounts": {
"ref": "#viewCountSummary",
"type": "ref",
"description": "Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally."
}
}
},
"viewCountSummary": {
"type": "object",
"required": [
"count",
"bytes",
"durationMs",
"reporters"
],
"properties": {
"bytes": {
"type": "integer",
"minimum": 0,
"description": "Sum of bytes transferred across every track row in every indexed report."
},
"count": {
"type": "integer",
"minimum": 0,
"description": "Sum of `count` across every indexed report."
},
"reporters": {
"type": "integer",
"minimum": 0,
"description": "Number of distinct streamplace nodes that have contributed at least one viewCount record for this video."
},
"durationMs": {
"type": "integer",
"minimum": 0,
"description": "Sum of playback duration (ms) across every track row in every indexed report."
}
},
"description": "Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}