-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
202 lines (202 loc) · 4.99 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
openapi: 3.0.0
info:
title: HLS Utils
version: 1.0.0
paths:
/auth:
get:
summary: Authenticate a stream
parameters:
- in: path
name: call
schema:
type: string
enum:
- publish
required: true
- in: path
name: name
schema:
type: string
format: printascii
required: true
- in: path
name: auth
schema:
type: string
format: printascii
required: true
responses:
'200':
description: Successful authentication
'400':
description: Bad request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
summary: Authenticate a stream
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/AuthenticateRequest'
responses:
'200':
description: Successful authentication
'400':
description: Bad request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/{name}/index.m3u8:
get:
summary: Get playlist for a stream
parameters:
- in: path
name: name
required: true
schema:
type: string
format: printascii
responses:
'200':
description: Playlist returned successfully
content:
application/vnd.apple.mpegurl:
schema:
type: string
'400':
description: Bad request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such stream
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/{name}/{client_id}/{variant}/index.m3u8:
get:
summary: Get variant playlist for a stream
parameters:
- in: path
name: name
required: true
schema:
type: string
format: printascii
- in: path
name: client_id
required: true
schema:
type: string
format: uuid
- in: path
name: variant
required: true
schema:
type: string
format: printascii
responses:
'200':
description: Variant playlist returned successfully
content:
application/vnd.apple.mpegurl:
schema:
type: string
'400':
description: Bad request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such stream
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/{name}/statistics:
get:
summary: Get statistics for a stream
parameters:
- in: path
name: name
required: true
schema:
type: string
format: printascii
responses:
'200':
description: Statistics returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Statistics'
'400':
description: Bad request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such stream
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
components:
schemas:
AuthenticateRequest:
type: object
required:
- call
- name
- auth
properties:
call:
type: string
enum:
- publish
name:
type: string
format: printascii
auth:
type: string
format: printascii
Statistics:
type: object
properties:
subscribers:
type: integer
Problem:
type: object
properties:
type:
type: string
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string