-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathopenapi.yaml
139 lines (139 loc) · 3.83 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
openapi: 3.0.0
info:
title: Video Search API
description: This API allows users to search collection of videos and get details of individual videos.
version: 1.9.0
servers:
- url: <paste your server url>
description: Main API server
paths:
/videos:
get:
operationId: listVideos
summary: Get list of all videos in the library.
responses:
"200":
description: List details of all the videos
content:
application/json:
schema:
$ref: "#/components/schemas/ListVideosResponse"
"400":
description: Invalid request
"default":
description: Unexpected error
/video/{id}:
get:
operationId: getVideo
summary: Get data ( transcript,length etc.) of a video given its id.
parameters:
- name: id
in: path
required: true
description: The unique identifier of the video.
schema:
type: string
responses:
"200":
description: Video Data of the requested video
content:
application/json:
schema:
$ref: "#/components/schemas/GetVideoResponse"
"400":
description: Invalid request due to incorrect or missing video id.
"default":
description: Unexpected error
/search:
post:
operationId: searchVideos
summary: Search for videos.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/SearchRequest"
responses:
"200":
description: Search results
content:
application/json:
schema:
$ref: "#/components/schemas/SearchResponse"
"404":
description: No videos found
"400":
description: Invalid request
"default":
description: Unexpected error
components:
schemas:
SearchRequest:
type: object
properties:
query:
type: string
description: Search query for finding videos
SearchResponse:
type: object
properties:
compilationVideo:
type: string
format: uri
description: Playable URL of the video
chunks:
type: array
items:
type: object
properties:
text:
type: string
description: Text content of the video
video:
type: string
format: uri
description: Playable URL of the video segment
GetVideoResponse:
type: object
properties:
video:
type: object
properties:
id:
type: string
description: Unique id of the video
title:
type: string
description: Title of the video
url:
description: Playable URL of the video
format: uri
type: string
length:
description: Length of the video in seconds
type: number
transcript:
description: Transcript of the video
type: string
ListVideosResponse:
type: object
properties:
videos:
type: array
items:
type: object
properties:
title:
type: string
description: Title of the video
id:
type: string
description: Unique id of the video
url:
description: Playable URL of the video
format: uri
type: string
length:
description: Length of the video in seconds
type: number