{"openapi":"3.1.0","info":{"title":"Gate Video Stream API","version":"1.0.0","description":"Use this REST API to turn hive entrance camera recordings into playable HLS playlists. It serves M3U8 playlist data that points video players to stored stream segments; upload and stream discovery remain available through GraphQL."},"servers":[{"url":"https://video.gratheon.com","description":"Production"},{"url":"http://localhost:8950","description":"Local development"}],"tags":[{"name":"Video playback"}],"components":{"schemas":{"HLSPlaylist":{"type":"string","contentMediaType":"application/vnd.apple.mpegurl","description":"M3U8 playlist containing the available 10-second MP4 segments for the requested stream.","examples":["#EXTM3U\n#EXT-X-VERSION:3\n#EXT-X-TARGETDURATION:10\n#EXTINF:10.0,\nhttps://files.gratheon.com/1/gate_videos/2/3/1.mp4\n"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","example":"Stream not found"}},"required":["error"]}}},"paths":{"/hls/{uid}/{boxId}/{streamId}/playlist.m3u8":{"get":{"tags":["Video playback"],"summary":"Get a playable HLS playlist for a hive entrance video stream","description":"Returns a playlist assembled from stored stream segments. The playlist URL is normally obtained from the GraphQL `videoStreams` query and consumed by a video player.","operationId":"getHlsPlaylist","parameters":[{"name":"uid","in":"path","required":true,"description":"Owner user ID.","schema":{"type":"integer","format":"int64","minimum":1},"example":42},{"name":"boxId","in":"path","required":true,"description":"Hive box ID associated with the entrance camera.","schema":{"type":"integer","format":"int64","minimum":1},"example":7},{"name":"streamId","in":"path","required":true,"description":"Video stream/session ID.","schema":{"type":"integer","format":"int64","minimum":1},"example":123}],"responses":{"200":{"description":"Generated HLS playlist.","content":{"application/vnd.apple.mpegurl":{"schema":{"$ref":"#/components/schemas/HLSPlaylist"},"example":"#EXTM3U\n#EXT-X-VERSION:3\n#EXT-X-TARGETDURATION:10\n#EXTINF:10.0,\nhttps://files.gratheon.com/42/gate_videos/7/123/1.mp4\n"}}},"404":{"description":"Stream was not found or has no segments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}