openapi.yaml 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440
  1. openapi: 3.0.0
  2. info:
  3. title: PeerTube
  4. version: 2.1.1
  5. contact:
  6. name: PeerTube Community
  7. url: 'https://joinpeertube.org'
  8. license:
  9. name: AGPLv3.0
  10. url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'
  11. x-logo:
  12. url: 'https://joinpeertube.org/img/brand.png'
  13. altText: PeerTube Project Homepage
  14. description: |
  15. # Introduction
  16. The PeerTube API is built on HTTP(S) and is RESTful. You can use your favorite
  17. HTTP/REST library for your programming language to use PeerTube. No official
  18. SDK is currently provided, but the spec API is fully compatible with
  19. [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
  20. which generates a client SDK in the language of your choice.
  21. See the [Quick Start guide](https://docs.joinpeertube.org/#/api-rest-getting-started) so you can play with the PeerTube API.
  22. # Authentication
  23. When you sign up for an account, you are given the possibility to generate
  24. sessions, and authenticate using this session token. One session token can
  25. currently be used at a time.
  26. # Errors
  27. The API uses standard HTTP status codes to indicate the success or failure
  28. of the API call. The body of the response will be JSON in the following
  29. format.
  30. ```
  31. {
  32. "code": "unauthorized_request", // example inner error code
  33. "error": "Token is invalid." // example exposed error message
  34. }
  35. ```
  36. externalDocs:
  37. url: https://docs.joinpeertube.org/api-rest-reference.html
  38. tags:
  39. - name: Accounts
  40. description: >
  41. Using some features of PeerTube require authentication, for which Accounts
  42. provide different levels of permission as well as associated user
  43. information. Accounts also encompass remote accounts discovered across the federation.
  44. - name: Config
  45. description: >
  46. Each server exposes public information regarding supported videos and
  47. options.
  48. - name: Job
  49. description: >
  50. Jobs are long-running tasks enqueued and processed by the instance
  51. itself. No additional worker registration is currently available.
  52. - name: Instance Follows
  53. description: >
  54. Managing servers which the instance interacts with is crucial to the
  55. concept of federation in PeerTube and external video indexation. The PeerTube
  56. server then deals with inter-server ActivityPub operations and propagates
  57. information across its social graph by posting activities to actors' inbox
  58. endpoints.
  59. - name: Video Abuses
  60. description: |
  61. Video abuses deal with reports of local or remote videos alike.
  62. - name: Video
  63. description: |
  64. Operations dealing with listing, uploading, fetching or modifying videos.
  65. - name: Search
  66. description: |
  67. The search helps to find _videos_ from within the instance and beyond.
  68. Videos from other instances federated by the instance (that is, instances
  69. followed by the instance) can be found via keywords and other criteria of
  70. the advanced search.
  71. - name: Video Comments
  72. description: >
  73. Operations dealing with comments to a video. Comments are organized in
  74. threads.
  75. - name: Video Playlists
  76. description: >
  77. Operations dealing with playlists of videos. Playlists are bound to users
  78. and/or channels.
  79. - name: Video Channels
  80. description: >
  81. Operations dealing with creation, modification and video listing of a
  82. user's channels.
  83. - name: Video Blacklist
  84. description: >
  85. Operations dealing with blacklisting videos (removing them from view and
  86. preventing interactions).
  87. - name: Video Rates
  88. description: >
  89. Like/dislike a video.
  90. x-tagGroups:
  91. - name: Accounts
  92. tags:
  93. - Accounts
  94. - Users
  95. - My User
  96. - My Subscriptions
  97. - name: Videos
  98. tags:
  99. - Video
  100. - Video Caption
  101. - Video Channels
  102. - Video Comments
  103. - Video Following
  104. - Video Rates
  105. - Video Playlists
  106. - Video Ownership Change
  107. - name: Search
  108. tags:
  109. - Search
  110. - name: Moderation
  111. tags:
  112. - Video Abuses
  113. - Video Blacklist
  114. - name: Instance Configuration
  115. tags:
  116. - Config
  117. - Instance Follows
  118. - name: Jobs
  119. tags:
  120. - Job
  121. paths:
  122. '/accounts/{name}':
  123. get:
  124. tags:
  125. - Accounts
  126. summary: Get an account
  127. parameters:
  128. - $ref: '#/components/parameters/name'
  129. responses:
  130. '200':
  131. description: successful operation
  132. content:
  133. application/json:
  134. schema:
  135. $ref: '#/components/schemas/Account'
  136. '/accounts/{name}/videos':
  137. get:
  138. tags:
  139. - Accounts
  140. - Video
  141. summary: 'List videos of an account'
  142. parameters:
  143. - $ref: '#/components/parameters/name'
  144. - $ref: '#/components/parameters/categoryOneOf'
  145. - $ref: '#/components/parameters/tagsOneOf'
  146. - $ref: '#/components/parameters/tagsAllOf'
  147. - $ref: '#/components/parameters/licenceOneOf'
  148. - $ref: '#/components/parameters/languageOneOf'
  149. - $ref: '#/components/parameters/nsfw'
  150. - $ref: '#/components/parameters/filter'
  151. - $ref: '#/components/parameters/skipCount'
  152. - $ref: '#/components/parameters/start'
  153. - $ref: '#/components/parameters/count'
  154. - $ref: '#/components/parameters/videosSort'
  155. responses:
  156. '200':
  157. description: successful operation
  158. content:
  159. application/json:
  160. schema:
  161. $ref: '#/components/schemas/VideoListResponse'
  162. x-code-samples:
  163. - lang: JavaScript
  164. source: |
  165. fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
  166. .then(function(response) {
  167. return response.json()
  168. }).then(function(data) {
  169. console.log(data)
  170. })
  171. - lang: Shell
  172. source: |
  173. # pip install httpie
  174. http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
  175. - lang: Ruby
  176. source: |
  177. require 'net/http'
  178. require 'json'
  179. uri = URI.parse("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
  180. http = Net::HTTP.new(uri.host, uri.port)
  181. http.use_ssl = true
  182. response = http.get(uri.request_uri)
  183. puts JSON.parse(response.read_body)
  184. - lang: Python
  185. source: |
  186. import requests
  187. r = requests.get("https://peertube2.cpy.re/api/v1//accounts/{name}/videos")
  188. json = r.json()
  189. print(json)
  190. /accounts:
  191. get:
  192. tags:
  193. - Accounts
  194. summary: List accounts
  195. parameters:
  196. - $ref: '#/components/parameters/start'
  197. - $ref: '#/components/parameters/count'
  198. - $ref: '#/components/parameters/sort'
  199. responses:
  200. '200':
  201. description: successful operation
  202. content:
  203. 'application/json':
  204. schema:
  205. type: array
  206. items:
  207. $ref: '#/components/schemas/Account'
  208. /config:
  209. get:
  210. tags:
  211. - Config
  212. summary: Get instance public configuration
  213. responses:
  214. '200':
  215. description: successful operation
  216. content:
  217. application/json:
  218. schema:
  219. $ref: '#/components/schemas/ServerConfig'
  220. /config/about:
  221. get:
  222. summary: Get instance "About" information
  223. tags:
  224. - Config
  225. responses:
  226. '200':
  227. description: successful operation
  228. content:
  229. application/json:
  230. schema:
  231. $ref: '#/components/schemas/ServerConfigAbout'
  232. /config/custom:
  233. get:
  234. summary: Get instance runtime configuration
  235. tags:
  236. - Config
  237. security:
  238. - OAuth2:
  239. - admin
  240. responses:
  241. '200':
  242. description: successful operation
  243. content:
  244. application/json:
  245. schema:
  246. $ref: '#/components/schemas/ServerConfigCustom'
  247. put:
  248. summary: Set instance runtime configuration
  249. tags:
  250. - Config
  251. security:
  252. - OAuth2:
  253. - admin
  254. responses:
  255. '200':
  256. description: successful operation
  257. delete:
  258. summary: Delete instance runtime configuration
  259. tags:
  260. - Config
  261. security:
  262. - OAuth2:
  263. - admin
  264. responses:
  265. '200':
  266. description: successful operation
  267. /jobs/{state}:
  268. get:
  269. summary: List instance jobs
  270. security:
  271. - OAuth2:
  272. - admin
  273. tags:
  274. - Job
  275. parameters:
  276. - name: state
  277. in: path
  278. required: true
  279. description: The state of the job
  280. schema:
  281. type: string
  282. enum:
  283. - active
  284. - completed
  285. - failed
  286. - waiting
  287. - delayed
  288. - $ref: '#/components/parameters/start'
  289. - $ref: '#/components/parameters/count'
  290. - $ref: '#/components/parameters/sort'
  291. responses:
  292. '200':
  293. description: successful operation
  294. content:
  295. application/json:
  296. schema:
  297. type: array
  298. items:
  299. $ref: '#/components/schemas/Job'
  300. '/server/following/{host}':
  301. delete:
  302. security:
  303. - OAuth2:
  304. - admin
  305. tags:
  306. - Instance Follows
  307. summary: Unfollow a server
  308. parameters:
  309. - name: host
  310. in: path
  311. required: true
  312. description: 'The host to unfollow '
  313. schema:
  314. type: string
  315. responses:
  316. '201':
  317. description: successful operation
  318. /server/followers:
  319. get:
  320. tags:
  321. - Instance Follows
  322. summary: List instance followers
  323. parameters:
  324. - $ref: '#/components/parameters/start'
  325. - $ref: '#/components/parameters/count'
  326. - $ref: '#/components/parameters/sort'
  327. responses:
  328. '200':
  329. description: successful operation
  330. content:
  331. application/json:
  332. schema:
  333. type: array
  334. items:
  335. $ref: '#/components/schemas/Follow'
  336. /server/following:
  337. get:
  338. tags:
  339. - Instance Follows
  340. summary: List instance followings
  341. parameters:
  342. - $ref: '#/components/parameters/start'
  343. - $ref: '#/components/parameters/count'
  344. - $ref: '#/components/parameters/sort'
  345. responses:
  346. '200':
  347. description: successful operation
  348. content:
  349. application/json:
  350. schema:
  351. type: array
  352. items:
  353. $ref: '#/components/schemas/Follow'
  354. post:
  355. security:
  356. - OAuth2:
  357. - admin
  358. tags:
  359. - Instance Follows
  360. summary: Follow a server
  361. responses:
  362. '204':
  363. description: successful operation
  364. requestBody:
  365. content:
  366. application/json:
  367. schema:
  368. $ref: '#/components/schemas/Follow'
  369. /users:
  370. post:
  371. summary: Create a user
  372. security:
  373. - OAuth2:
  374. - admin
  375. tags:
  376. - Users
  377. responses:
  378. '200':
  379. description: successful operation
  380. content:
  381. application/json:
  382. schema:
  383. $ref: '#/components/schemas/AddUserResponse'
  384. requestBody:
  385. content:
  386. application/json:
  387. schema:
  388. $ref: '#/components/schemas/AddUser'
  389. description: User to create
  390. required: true
  391. get:
  392. summary: List users
  393. security:
  394. - OAuth2: []
  395. tags:
  396. - Users
  397. parameters:
  398. - $ref: '#/components/parameters/start'
  399. - $ref: '#/components/parameters/count'
  400. - $ref: '#/components/parameters/usersSort'
  401. responses:
  402. '200':
  403. description: successful operation
  404. content:
  405. application/json:
  406. schema:
  407. type: array
  408. items:
  409. $ref: '#/components/schemas/User'
  410. '/users/{id}':
  411. delete:
  412. summary: Delete a user
  413. security:
  414. - OAuth2:
  415. - admin
  416. tags:
  417. - Users
  418. parameters:
  419. - $ref: '#/components/parameters/id'
  420. responses:
  421. '204':
  422. description: successful operation
  423. get:
  424. summary: Get a user
  425. security:
  426. - OAuth2: []
  427. tags:
  428. - Users
  429. parameters:
  430. - $ref: '#/components/parameters/id'
  431. responses:
  432. '200':
  433. description: successful operation
  434. content:
  435. application/json:
  436. schema:
  437. $ref: '#/components/schemas/User'
  438. put:
  439. summary: Update a user
  440. security:
  441. - OAuth2: []
  442. tags:
  443. - Users
  444. parameters:
  445. - $ref: '#/components/parameters/id'
  446. responses:
  447. '204':
  448. description: successful operation
  449. requestBody:
  450. content:
  451. application/json:
  452. schema:
  453. $ref: '#/components/schemas/UpdateUser'
  454. required: true
  455. /users/register:
  456. post:
  457. summary: Register a user
  458. tags:
  459. - Users
  460. responses:
  461. '204':
  462. description: successful operation
  463. requestBody:
  464. content:
  465. application/json:
  466. schema:
  467. $ref: '#/components/schemas/RegisterUser'
  468. required: true
  469. /users/me:
  470. get:
  471. summary: Get my user information
  472. security:
  473. - OAuth2:
  474. - user
  475. tags:
  476. - My User
  477. responses:
  478. '200':
  479. description: successful operation
  480. content:
  481. application/json:
  482. schema:
  483. type: array
  484. items:
  485. $ref: '#/components/schemas/User'
  486. put:
  487. summary: Update my user information
  488. security:
  489. - OAuth2:
  490. - user
  491. tags:
  492. - My User
  493. responses:
  494. '204':
  495. description: successful operation
  496. requestBody:
  497. content:
  498. application/json:
  499. schema:
  500. $ref: '#/components/schemas/UpdateMe'
  501. required: true
  502. /users/me/videos/imports:
  503. get:
  504. summary: Get video imports of my user
  505. security:
  506. - OAuth2:
  507. - user
  508. tags:
  509. - Videos
  510. - My User
  511. parameters:
  512. - $ref: '#/components/parameters/start'
  513. - $ref: '#/components/parameters/count'
  514. - $ref: '#/components/parameters/sort'
  515. responses:
  516. '200':
  517. description: successful operation
  518. content:
  519. application/json:
  520. schema:
  521. $ref: '#/components/schemas/VideoImport'
  522. /users/me/video-quota-used:
  523. get:
  524. summary: Get my user used quota
  525. security:
  526. - OAuth2:
  527. - user
  528. tags:
  529. - My User
  530. responses:
  531. '200':
  532. description: successful operation
  533. content:
  534. application/json:
  535. schema:
  536. type: number
  537. '/users/me/videos/{videoId}/rating':
  538. get:
  539. summary: Get rate of my user for a video
  540. security:
  541. - OAuth2: []
  542. tags:
  543. - My User
  544. - Video Rates
  545. parameters:
  546. - name: videoId
  547. in: path
  548. required: true
  549. description: 'The video id '
  550. schema:
  551. type: string
  552. responses:
  553. '200':
  554. description: successful operation
  555. content:
  556. application/json:
  557. schema:
  558. $ref: '#/components/schemas/GetMeVideoRating'
  559. /users/me/videos:
  560. get:
  561. summary: Get videos of my user
  562. security:
  563. - OAuth2:
  564. - user
  565. tags:
  566. - My User
  567. - Videos
  568. parameters:
  569. - $ref: '#/components/parameters/start'
  570. - $ref: '#/components/parameters/count'
  571. - $ref: '#/components/parameters/sort'
  572. responses:
  573. '200':
  574. description: successful operation
  575. content:
  576. application/json:
  577. schema:
  578. $ref: '#/components/schemas/VideoListResponse'
  579. /users/me/subscriptions:
  580. get:
  581. summary: Get my user subscriptions
  582. security:
  583. - OAuth2:
  584. - user
  585. tags:
  586. - My Subscriptions
  587. parameters:
  588. - $ref: '#/components/parameters/start'
  589. - $ref: '#/components/parameters/count'
  590. - $ref: '#/components/parameters/sort'
  591. responses:
  592. '200':
  593. description: successful operation
  594. post:
  595. summary: Add subscription to my user
  596. security:
  597. - OAuth2:
  598. - user
  599. tags:
  600. - My Subscriptions
  601. responses:
  602. '200':
  603. description: successful operation
  604. /users/me/subscriptions/exist:
  605. get:
  606. summary: Get if subscriptions exist for my user
  607. security:
  608. - OAuth2:
  609. - user
  610. tags:
  611. - My Subscriptions
  612. parameters:
  613. - $ref: '#/components/parameters/subscriptionsUris'
  614. responses:
  615. '200':
  616. description: successful operation
  617. content:
  618. application/json:
  619. schema:
  620. type: object
  621. /users/me/subscriptions/videos:
  622. get:
  623. summary: List videos of subscriptions of my user
  624. security:
  625. - OAuth2:
  626. - user
  627. tags:
  628. - My Subscriptions
  629. - Videos
  630. parameters:
  631. - $ref: '#/components/parameters/categoryOneOf'
  632. - $ref: '#/components/parameters/tagsOneOf'
  633. - $ref: '#/components/parameters/tagsAllOf'
  634. - $ref: '#/components/parameters/licenceOneOf'
  635. - $ref: '#/components/parameters/languageOneOf'
  636. - $ref: '#/components/parameters/nsfw'
  637. - $ref: '#/components/parameters/filter'
  638. - $ref: '#/components/parameters/skipCount'
  639. - $ref: '#/components/parameters/start'
  640. - $ref: '#/components/parameters/count'
  641. - $ref: '#/components/parameters/videosSort'
  642. responses:
  643. '200':
  644. description: successful operation
  645. content:
  646. application/json:
  647. schema:
  648. $ref: '#/components/schemas/VideoListResponse'
  649. '/users/me/subscriptions/{subscriptionHandle}':
  650. get:
  651. summary: Get subscription of my user
  652. security:
  653. - OAuth2:
  654. - user
  655. tags:
  656. - My Subscriptions
  657. parameters:
  658. - $ref: '#/components/parameters/subscriptionHandle'
  659. responses:
  660. '200':
  661. description: successful operation
  662. content:
  663. application/json:
  664. schema:
  665. $ref: '#/components/schemas/VideoChannel'
  666. delete:
  667. summary: Delete subscription of my user
  668. security:
  669. - OAuth2:
  670. - user
  671. tags:
  672. - My Subscriptions
  673. parameters:
  674. - $ref: '#/components/parameters/subscriptionHandle'
  675. responses:
  676. '200':
  677. description: successful operation
  678. /users/me/avatar/pick:
  679. post:
  680. summary: Update my user avatar
  681. security:
  682. - OAuth2: []
  683. tags:
  684. - My User
  685. responses:
  686. '200':
  687. description: successful operation
  688. content:
  689. application/json:
  690. schema:
  691. $ref: '#/components/schemas/Avatar'
  692. requestBody:
  693. content:
  694. multipart/form-data:
  695. schema:
  696. type: object
  697. properties:
  698. avatarfile:
  699. description: The file to upload.
  700. type: string
  701. format: binary
  702. encoding:
  703. avatarfile:
  704. contentType: image/png, image/jpeg
  705. /videos/ownership:
  706. get:
  707. summary: List video ownership changes
  708. tags:
  709. - Video Ownership Change
  710. security:
  711. - OAuth2: []
  712. responses:
  713. '200':
  714. description: successful operation
  715. '/videos/ownership/{id}/accept':
  716. post:
  717. summary: Accept ownership change request
  718. tags:
  719. - Video Ownership Change
  720. security:
  721. - OAuth2: []
  722. parameters:
  723. - $ref: '#/components/parameters/idOrUUID'
  724. responses:
  725. '204':
  726. description: successful operation
  727. '/videos/ownership/{id}/refuse':
  728. post:
  729. summary: Refuse ownership change request
  730. tags:
  731. - Video Ownership Change
  732. security:
  733. - OAuth2: []
  734. parameters:
  735. - $ref: '#/components/parameters/idOrUUID'
  736. responses:
  737. '204':
  738. description: successful operation
  739. '/videos/{id}/give-ownership':
  740. post:
  741. summary: Request ownership change
  742. tags:
  743. - Video Ownership Change
  744. security:
  745. - OAuth2: []
  746. parameters:
  747. - $ref: '#/components/parameters/idOrUUID'
  748. requestBody:
  749. required: true
  750. content:
  751. application/x-www-form-urlencoded:
  752. schema:
  753. type: object
  754. properties:
  755. username:
  756. type: string
  757. required:
  758. - username
  759. responses:
  760. '204':
  761. description: successful operation
  762. '400':
  763. description: 'Changing video ownership to a remote account is not supported yet'
  764. /videos:
  765. get:
  766. summary: List videos
  767. tags:
  768. - Video
  769. parameters:
  770. - $ref: '#/components/parameters/categoryOneOf'
  771. - $ref: '#/components/parameters/tagsOneOf'
  772. - $ref: '#/components/parameters/tagsAllOf'
  773. - $ref: '#/components/parameters/licenceOneOf'
  774. - $ref: '#/components/parameters/languageOneOf'
  775. - $ref: '#/components/parameters/nsfw'
  776. - $ref: '#/components/parameters/filter'
  777. - $ref: '#/components/parameters/skipCount'
  778. - $ref: '#/components/parameters/start'
  779. - $ref: '#/components/parameters/count'
  780. - $ref: '#/components/parameters/videosSort'
  781. responses:
  782. '200':
  783. description: successful operation
  784. content:
  785. application/json:
  786. schema:
  787. $ref: '#/components/schemas/VideoListResponse'
  788. /videos/categories:
  789. get:
  790. summary: List available video categories
  791. tags:
  792. - Video
  793. responses:
  794. '200':
  795. description: successful operation
  796. content:
  797. application/json:
  798. schema:
  799. type: array
  800. items:
  801. type: string
  802. /videos/licences:
  803. get:
  804. summary: List available video licences
  805. tags:
  806. - Video
  807. responses:
  808. '200':
  809. description: successful operation
  810. content:
  811. application/json:
  812. schema:
  813. type: array
  814. items:
  815. type: string
  816. /videos/languages:
  817. get:
  818. summary: List available video languages
  819. tags:
  820. - Video
  821. responses:
  822. '200':
  823. description: successful operation
  824. content:
  825. application/json:
  826. schema:
  827. type: array
  828. items:
  829. type: string
  830. /videos/privacies:
  831. get:
  832. summary: List available video privacies
  833. tags:
  834. - Video
  835. responses:
  836. '200':
  837. description: successful operation
  838. content:
  839. application/json:
  840. schema:
  841. type: array
  842. items:
  843. type: string
  844. '/videos/{id}':
  845. put:
  846. summary: Update a video
  847. security:
  848. - OAuth2: []
  849. tags:
  850. - Video
  851. parameters:
  852. - $ref: '#/components/parameters/idOrUUID'
  853. responses:
  854. '204':
  855. description: successful operation
  856. requestBody:
  857. content:
  858. multipart/form-data:
  859. schema:
  860. type: object
  861. properties:
  862. thumbnailfile:
  863. description: Video thumbnail file
  864. type: string
  865. format: binary
  866. previewfile:
  867. description: Video preview file
  868. type: string
  869. format: binary
  870. category:
  871. description: Video category
  872. type: string
  873. licence:
  874. description: Video licence
  875. type: string
  876. language:
  877. description: Video language
  878. type: string
  879. privacy:
  880. $ref: '#/components/schemas/VideoPrivacySet'
  881. description:
  882. description: Video description
  883. type: string
  884. waitTranscoding:
  885. description: Whether or not we wait transcoding before publish the video
  886. type: string
  887. support:
  888. description: Text describing how to support the video uploader
  889. type: string
  890. nsfw:
  891. description: Whether or not this video contains sensitive content
  892. type: string
  893. name:
  894. description: Video name
  895. type: string
  896. tags:
  897. description: Video tags (maximum 5 tags each between 2 and 30 characters)
  898. type: array
  899. minItems: 1
  900. maxItems: 5
  901. items:
  902. type: string
  903. minLength: 2
  904. maxLength: 30
  905. commentsEnabled:
  906. description: Enable or disable comments for this video
  907. type: string
  908. originallyPublishedAt:
  909. description: Date when the content was originally published
  910. type: string
  911. format: date-time
  912. scheduleUpdate:
  913. $ref: '#/components/schemas/VideoScheduledUpdate'
  914. encoding:
  915. thumbnailfile:
  916. contentType: image/jpeg
  917. previewfile:
  918. contentType: image/jpeg
  919. get:
  920. summary: Get a video
  921. tags:
  922. - Video
  923. parameters:
  924. - $ref: '#/components/parameters/idOrUUID'
  925. responses:
  926. '200':
  927. description: successful operation
  928. content:
  929. application/json:
  930. schema:
  931. $ref: '#/components/schemas/VideoDetails'
  932. delete:
  933. summary: Delete a video
  934. security:
  935. - OAuth2: []
  936. tags:
  937. - Video
  938. parameters:
  939. - $ref: '#/components/parameters/idOrUUID'
  940. responses:
  941. '204':
  942. description: successful operation
  943. '/videos/{id}/description':
  944. get:
  945. summary: Get complete video description
  946. tags:
  947. - Video
  948. parameters:
  949. - $ref: '#/components/parameters/idOrUUID'
  950. responses:
  951. '200':
  952. description: successful operation
  953. content:
  954. application/json:
  955. schema:
  956. type: string
  957. '/videos/{id}/views':
  958. post:
  959. summary: Add a view to a video
  960. tags:
  961. - Video
  962. parameters:
  963. - $ref: '#/components/parameters/idOrUUID'
  964. responses:
  965. '204':
  966. description: successful operation
  967. '/videos/{id}/watching':
  968. put:
  969. summary: Set watching progress of a video
  970. tags:
  971. - Video
  972. security:
  973. - OAuth2: []
  974. parameters:
  975. - $ref: '#/components/parameters/idOrUUID'
  976. requestBody:
  977. content:
  978. application/json:
  979. schema:
  980. $ref: '#/components/schemas/UserWatchingVideo'
  981. required: true
  982. responses:
  983. '204':
  984. description: successful operation
  985. /videos/upload:
  986. post:
  987. summary: Upload a video
  988. security:
  989. - OAuth2: []
  990. tags:
  991. - Video
  992. responses:
  993. '200':
  994. description: successful operation
  995. content:
  996. application/json:
  997. schema:
  998. $ref: '#/components/schemas/VideoUploadResponse'
  999. '403':
  1000. description: 'The user video quota is exceeded with this video.'
  1001. '408':
  1002. description: 'Upload has timed out'
  1003. '422':
  1004. description: 'Invalid input file.'
  1005. requestBody:
  1006. content:
  1007. multipart/form-data:
  1008. schema:
  1009. type: object
  1010. properties:
  1011. videofile:
  1012. description: Video file
  1013. type: string
  1014. format: binary
  1015. channelId:
  1016. description: Channel id that will contain this video
  1017. type: number
  1018. thumbnailfile:
  1019. description: Video thumbnail file
  1020. type: string
  1021. format: binary
  1022. previewfile:
  1023. description: Video preview file
  1024. type: string
  1025. format: binary
  1026. privacy:
  1027. $ref: '#/components/schemas/VideoPrivacySet'
  1028. category:
  1029. description: Video category
  1030. type: string
  1031. licence:
  1032. description: Video licence
  1033. type: string
  1034. language:
  1035. description: Video language
  1036. type: string
  1037. description:
  1038. description: Video description
  1039. type: string
  1040. waitTranscoding:
  1041. description: Whether or not we wait transcoding before publish the video
  1042. type: string
  1043. support:
  1044. description: Text describing how to support the video uploader
  1045. type: string
  1046. nsfw:
  1047. description: Whether or not this video contains sensitive content
  1048. type: string
  1049. name:
  1050. description: Video name
  1051. type: string
  1052. tags:
  1053. description: Video tags (maximum 5 tags each between 2 and 30 characters)
  1054. type: array
  1055. minItems: 1
  1056. maxItems: 5
  1057. items:
  1058. type: string
  1059. minLength: 2
  1060. maxLength: 30
  1061. commentsEnabled:
  1062. description: Enable or disable comments for this video
  1063. type: string
  1064. originallyPublishedAt:
  1065. description: Date when the content was originally published
  1066. type: string
  1067. format: date-time
  1068. scheduleUpdate:
  1069. $ref: '#/components/schemas/VideoScheduledUpdate'
  1070. required:
  1071. - videofile
  1072. - channelId
  1073. - name
  1074. encoding:
  1075. videofile:
  1076. contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
  1077. thumbnailfile:
  1078. contentType: image/jpeg
  1079. previewfile:
  1080. contentType: image/jpeg
  1081. x-code-samples:
  1082. - lang: Shell
  1083. source: |
  1084. ## DEPENDENCIES: httpie, jq
  1085. # pip install httpie
  1086. USERNAME="<your_username>"
  1087. PASSWORD="<your_password>"
  1088. FILE_PATH="<your_file_path>"
  1089. CHANNEL_ID="<your_channel_id>"
  1090. NAME="<video_name>"
  1091. API_PATH="https://peertube2.cpy.re/api/v1"
  1092. ## AUTH
  1093. client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
  1094. client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
  1095. token=$(http -b --form POST "$API_PATH/users/token" \
  1096. client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
  1097. username=$USERNAME \
  1098. password=$PASSWORD \
  1099. | jq -r ".access_token")
  1100. ## VIDEO UPLOAD
  1101. http -b --form POST "$API_PATH/videos/upload" \
  1102. videofile@$FILE_PATH \
  1103. channelId=$CHANNEL_ID \
  1104. name=$NAME \
  1105. "Authorization:Bearer $token"
  1106. /videos/imports:
  1107. post:
  1108. summary: Import a video
  1109. description: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
  1110. security:
  1111. - OAuth2: []
  1112. tags:
  1113. - Video
  1114. responses:
  1115. '200':
  1116. description: successful operation
  1117. content:
  1118. application/json:
  1119. schema:
  1120. $ref: '#/components/schemas/VideoUploadResponse'
  1121. requestBody:
  1122. content:
  1123. multipart/form-data:
  1124. schema:
  1125. type: object
  1126. properties:
  1127. torrentfile:
  1128. description: Torrent File
  1129. type: string
  1130. format: binary
  1131. targetUrl:
  1132. description: HTTP target URL
  1133. type: string
  1134. magnetUri:
  1135. description: Magnet URI
  1136. type: string
  1137. channelId:
  1138. description: Channel id that will contain this video
  1139. type: number
  1140. thumbnailfile:
  1141. description: Video thumbnail file
  1142. type: string
  1143. format: binary
  1144. previewfile:
  1145. description: Video preview file
  1146. type: string
  1147. format: binary
  1148. privacy:
  1149. $ref: '#/components/schemas/VideoPrivacySet'
  1150. category:
  1151. description: Video category
  1152. type: string
  1153. licence:
  1154. description: Video licence
  1155. type: string
  1156. language:
  1157. description: Video language
  1158. type: string
  1159. description:
  1160. description: Video description
  1161. type: string
  1162. waitTranscoding:
  1163. description: Whether or not we wait transcoding before publish the video
  1164. type: string
  1165. support:
  1166. description: Text describing how to support the video uploader
  1167. type: string
  1168. nsfw:
  1169. description: Whether or not this video contains sensitive content
  1170. type: string
  1171. name:
  1172. description: Video name
  1173. type: string
  1174. tags:
  1175. description: Video tags (maximum 5 tags each between 2 and 30 characters)
  1176. type: array
  1177. minItems: 1
  1178. maxItems: 5
  1179. items:
  1180. type: string
  1181. minLength: 2
  1182. maxLength: 30
  1183. commentsEnabled:
  1184. description: Enable or disable comments for this video
  1185. type: string
  1186. scheduleUpdate:
  1187. $ref: '#/components/schemas/VideoScheduledUpdate'
  1188. required:
  1189. - channelId
  1190. - name
  1191. encoding:
  1192. torrentfile:
  1193. contentType: application/x-bittorrent
  1194. thumbnailfile:
  1195. contentType: image/jpeg
  1196. previewfile:
  1197. contentType: image/jpeg
  1198. /videos/abuse:
  1199. get:
  1200. summary: List video abuses
  1201. security:
  1202. - OAuth2:
  1203. - admin
  1204. - moderator
  1205. tags:
  1206. - Video Abuses
  1207. parameters:
  1208. - $ref: '#/components/parameters/start'
  1209. - $ref: '#/components/parameters/count'
  1210. - $ref: '#/components/parameters/abusesSort'
  1211. responses:
  1212. '200':
  1213. description: successful operation
  1214. content:
  1215. application/json:
  1216. schema:
  1217. type: array
  1218. items:
  1219. $ref: '#/components/schemas/VideoAbuse'
  1220. '/videos/{id}/abuse':
  1221. post:
  1222. summary: Report an abuse
  1223. security:
  1224. - OAuth2: []
  1225. tags:
  1226. - Video Abuses
  1227. - Videos
  1228. parameters:
  1229. - $ref: '#/components/parameters/idOrUUID'
  1230. requestBody:
  1231. content:
  1232. application/json:
  1233. schema:
  1234. type: object
  1235. properties:
  1236. reason:
  1237. description: Reason why the user reports this video
  1238. type: string
  1239. responses:
  1240. '204':
  1241. description: successful operation
  1242. '/videos/{id}/abuse/{abuseId}':
  1243. put:
  1244. summary: Update an abuse
  1245. security:
  1246. - OAuth2:
  1247. - admin
  1248. - moderator
  1249. tags:
  1250. - Video Abuses
  1251. responses:
  1252. '204':
  1253. description: successful operation
  1254. parameters:
  1255. - $ref: '#/components/parameters/idOrUUID'
  1256. - $ref: '#/components/parameters/abuseId'
  1257. requestBody:
  1258. content:
  1259. application/json:
  1260. schema:
  1261. type: object
  1262. properties:
  1263. state:
  1264. $ref: '#/components/schemas/VideoAbuseStateSet'
  1265. moderationComment:
  1266. type: string
  1267. description: 'Update the comment of the video abuse for other admin/moderators'
  1268. delete:
  1269. summary: Delete an abuse
  1270. security:
  1271. - OAuth2:
  1272. - admin
  1273. - moderator
  1274. tags:
  1275. - Video Abuses
  1276. responses:
  1277. '204':
  1278. description: successful operation
  1279. parameters:
  1280. - $ref: '#/components/parameters/idOrUUID'
  1281. - $ref: '#/components/parameters/abuseId'
  1282. '/videos/{id}/blacklist':
  1283. post:
  1284. summary: Blacklist a video
  1285. security:
  1286. - OAuth2:
  1287. - admin
  1288. - moderator
  1289. tags:
  1290. - Video Blacklist
  1291. parameters:
  1292. - $ref: '#/components/parameters/idOrUUID'
  1293. responses:
  1294. '204':
  1295. description: successful operation
  1296. delete:
  1297. summary: Delete an entry of the blacklist of a video by its id
  1298. security:
  1299. - OAuth2:
  1300. - admin
  1301. - moderator
  1302. tags:
  1303. - Video Blacklist
  1304. parameters:
  1305. - $ref: '#/components/parameters/idOrUUID'
  1306. responses:
  1307. '204':
  1308. description: successful operation
  1309. /videos/blacklist:
  1310. get:
  1311. summary: List blacklisted videos
  1312. security:
  1313. - OAuth2:
  1314. - admin
  1315. - moderator
  1316. tags:
  1317. - Video Blacklist
  1318. parameters:
  1319. - $ref: '#/components/parameters/start'
  1320. - $ref: '#/components/parameters/count'
  1321. - $ref: '#/components/parameters/blacklistsSort'
  1322. responses:
  1323. '200':
  1324. description: successful operation
  1325. content:
  1326. application/json:
  1327. schema:
  1328. type: array
  1329. items:
  1330. $ref: '#/components/schemas/VideoBlacklist'
  1331. /videos/{id}/captions:
  1332. get:
  1333. summary: List captions of a video
  1334. tags:
  1335. - Video Caption
  1336. parameters:
  1337. - $ref: '#/components/parameters/idOrUUID'
  1338. responses:
  1339. '200':
  1340. description: successful operation
  1341. content:
  1342. application/json:
  1343. schema:
  1344. type: object
  1345. properties:
  1346. total:
  1347. type: integer
  1348. data:
  1349. type: array
  1350. items:
  1351. $ref: '#/components/schemas/VideoCaption'
  1352. /videos/{id}/captions/{captionLanguage}:
  1353. put:
  1354. summary: Add or replace a video caption
  1355. tags:
  1356. - Video Caption
  1357. parameters:
  1358. - $ref: '#/components/parameters/idOrUUID'
  1359. - $ref: '#/components/parameters/captionLanguage'
  1360. requestBody:
  1361. content:
  1362. multipart/form-data:
  1363. schema:
  1364. type: object
  1365. properties:
  1366. captionfile:
  1367. description: The file to upload.
  1368. type: string
  1369. format: binary
  1370. encoding:
  1371. captionfile:
  1372. contentType: text/vtt, application/x-subrip, text/plain
  1373. responses:
  1374. '204':
  1375. description: successful operation
  1376. delete:
  1377. summary: Delete a video caption
  1378. tags:
  1379. - Video Caption
  1380. parameters:
  1381. - $ref: '#/components/parameters/idOrUUID'
  1382. - $ref: '#/components/parameters/captionLanguage'
  1383. responses:
  1384. '204':
  1385. description: successful operation
  1386. /video-channels:
  1387. get:
  1388. summary: List video channels
  1389. tags:
  1390. - Video Channels
  1391. parameters:
  1392. - $ref: '#/components/parameters/start'
  1393. - $ref: '#/components/parameters/count'
  1394. - $ref: '#/components/parameters/sort'
  1395. responses:
  1396. '200':
  1397. description: successful operation
  1398. content:
  1399. application/json:
  1400. schema:
  1401. type: array
  1402. items:
  1403. $ref: '#/components/schemas/VideoChannel'
  1404. post:
  1405. summary: Create a video channel
  1406. security:
  1407. - OAuth2: []
  1408. tags:
  1409. - Video Channels
  1410. responses:
  1411. '204':
  1412. description: successful operation
  1413. requestBody:
  1414. content:
  1415. application/json:
  1416. schema:
  1417. $ref: '#/components/schemas/VideoChannelCreate'
  1418. '/video-channels/{channelHandle}':
  1419. get:
  1420. summary: Get a video channel
  1421. tags:
  1422. - Video Channels
  1423. parameters:
  1424. - $ref: '#/components/parameters/channelHandle'
  1425. responses:
  1426. '200':
  1427. description: successful operation
  1428. content:
  1429. application/json:
  1430. schema:
  1431. $ref: '#/components/schemas/VideoChannel'
  1432. put:
  1433. summary: Update a video channel
  1434. security:
  1435. - OAuth2: []
  1436. tags:
  1437. - Video Channels
  1438. parameters:
  1439. - $ref: '#/components/parameters/channelHandle'
  1440. responses:
  1441. '204':
  1442. description: successful operation
  1443. requestBody:
  1444. content:
  1445. application/json:
  1446. schema:
  1447. $ref: '#/components/schemas/VideoChannelUpdate'
  1448. delete:
  1449. summary: Delete a video channel
  1450. security:
  1451. - OAuth2: []
  1452. tags:
  1453. - Video Channels
  1454. parameters:
  1455. - $ref: '#/components/parameters/channelHandle'
  1456. responses:
  1457. '204':
  1458. description: successful operation
  1459. '/video-channels/{channelHandle}/videos':
  1460. get:
  1461. summary: List videos of a video channel
  1462. tags:
  1463. - Video
  1464. - Video Channels
  1465. parameters:
  1466. - $ref: '#/components/parameters/channelHandle'
  1467. - $ref: '#/components/parameters/categoryOneOf'
  1468. - $ref: '#/components/parameters/tagsOneOf'
  1469. - $ref: '#/components/parameters/tagsAllOf'
  1470. - $ref: '#/components/parameters/licenceOneOf'
  1471. - $ref: '#/components/parameters/languageOneOf'
  1472. - $ref: '#/components/parameters/nsfw'
  1473. - $ref: '#/components/parameters/filter'
  1474. - $ref: '#/components/parameters/skipCount'
  1475. - $ref: '#/components/parameters/start'
  1476. - $ref: '#/components/parameters/count'
  1477. - $ref: '#/components/parameters/videosSort'
  1478. responses:
  1479. '200':
  1480. description: successful operation
  1481. content:
  1482. application/json:
  1483. schema:
  1484. $ref: '#/components/schemas/VideoListResponse'
  1485. /video-playlists/privacies:
  1486. get:
  1487. summary: List available playlist privacies
  1488. tags:
  1489. - Video Playlists
  1490. responses:
  1491. '200':
  1492. description: successful operation
  1493. content:
  1494. application/json:
  1495. schema:
  1496. type: array
  1497. items:
  1498. type: string
  1499. /video-playlists:
  1500. get:
  1501. summary: List video playlists
  1502. tags:
  1503. - Video Playlists
  1504. parameters:
  1505. - $ref: '#/components/parameters/start'
  1506. - $ref: '#/components/parameters/count'
  1507. - $ref: '#/components/parameters/sort'
  1508. responses:
  1509. '200':
  1510. description: successful operation
  1511. content:
  1512. application/json:
  1513. schema:
  1514. type: array
  1515. items:
  1516. $ref: '#/components/schemas/VideoPlaylist'
  1517. post:
  1518. summary: Create a video playlist
  1519. description: 'If the video playlist is set as public, the videoChannelId is mandatory.'
  1520. security:
  1521. - OAuth2: []
  1522. tags:
  1523. - Video Playlists
  1524. responses:
  1525. '200':
  1526. description: successful operation
  1527. content:
  1528. application/json:
  1529. schema:
  1530. type: object
  1531. properties:
  1532. videoPlaylist:
  1533. type: object
  1534. properties:
  1535. id:
  1536. type: number
  1537. uuid:
  1538. type: string
  1539. requestBody:
  1540. content:
  1541. multipart/form-data:
  1542. schema:
  1543. type: object
  1544. properties:
  1545. displayName:
  1546. description: Video playlist display name
  1547. type: string
  1548. thumbnailfile:
  1549. description: Video playlist thumbnail file
  1550. type: string
  1551. format: binary
  1552. privacy:
  1553. $ref: '#/components/schemas/VideoPlaylistPrivacySet'
  1554. description:
  1555. description: Video playlist description
  1556. type: string
  1557. videoChannelId:
  1558. description: Video channel in which the playlist will be published
  1559. type: number
  1560. required:
  1561. - displayName
  1562. /video-playlists/{id}:
  1563. get:
  1564. summary: Get a video playlist
  1565. tags:
  1566. - Video Playlists
  1567. parameters:
  1568. - $ref: '#/components/parameters/idOrUUID'
  1569. responses:
  1570. '200':
  1571. description: successful operation
  1572. content:
  1573. application/json:
  1574. schema:
  1575. $ref: '#/components/schemas/VideoPlaylist'
  1576. put:
  1577. summary: Update a video playlist
  1578. description: 'If the video playlist is set as public, the playlist must have a assigned channel.'
  1579. security:
  1580. - OAuth2: []
  1581. tags:
  1582. - Video Playlists
  1583. responses:
  1584. '204':
  1585. description: successful operation
  1586. parameters:
  1587. - $ref: '#/components/parameters/idOrUUID'
  1588. requestBody:
  1589. content:
  1590. multipart/form-data:
  1591. schema:
  1592. type: object
  1593. properties:
  1594. displayName:
  1595. description: Video playlist display name
  1596. type: string
  1597. thumbnailfile:
  1598. description: Video playlist thumbnail file
  1599. type: string
  1600. format: binary
  1601. privacy:
  1602. $ref: '#/components/schemas/VideoPlaylistPrivacySet'
  1603. description:
  1604. description: Video playlist description
  1605. type: string
  1606. videoChannelId:
  1607. description: Video channel in which the playlist will be published
  1608. type: number
  1609. delete:
  1610. summary: Delete a video playlist
  1611. security:
  1612. - OAuth2: []
  1613. tags:
  1614. - Video Playlists
  1615. parameters:
  1616. - $ref: '#/components/parameters/idOrUUID'
  1617. responses:
  1618. '204':
  1619. description: successful operation
  1620. /video-playlists/{id}/videos:
  1621. get:
  1622. summary: 'List videos of a playlist'
  1623. tags:
  1624. - Videos
  1625. - Video Playlists
  1626. parameters:
  1627. - $ref: '#/components/parameters/idOrUUID'
  1628. responses:
  1629. '200':
  1630. description: successful operation
  1631. content:
  1632. application/json:
  1633. schema:
  1634. $ref: '#/components/schemas/VideoListResponse'
  1635. post:
  1636. summary: 'Add a video in a playlist'
  1637. security:
  1638. - OAuth2: []
  1639. tags:
  1640. - Videos
  1641. - Video Playlists
  1642. parameters:
  1643. - $ref: '#/components/parameters/idOrUUID'
  1644. responses:
  1645. '200':
  1646. description: successful operation
  1647. content:
  1648. application/json:
  1649. schema:
  1650. type: object
  1651. properties:
  1652. videoPlaylistElement:
  1653. type: object
  1654. properties:
  1655. id:
  1656. type: number
  1657. requestBody:
  1658. content:
  1659. application/json:
  1660. schema:
  1661. type: object
  1662. properties:
  1663. videoId:
  1664. type: number
  1665. description: 'Video to add in the playlist'
  1666. startTimestamp:
  1667. type: number
  1668. description: 'Start the video at this specific timestamp (in seconds)'
  1669. stopTimestamp:
  1670. type: number
  1671. description: 'Stop the video at this specific timestamp (in seconds)'
  1672. required:
  1673. - videoId
  1674. /video-playlists/{id}/videos/reorder:
  1675. post:
  1676. summary: 'Reorder a playlist'
  1677. security:
  1678. - OAuth2: []
  1679. tags:
  1680. - Video Playlists
  1681. parameters:
  1682. - $ref: '#/components/parameters/idOrUUID'
  1683. responses:
  1684. '204':
  1685. description: successful operation
  1686. requestBody:
  1687. content:
  1688. application/json:
  1689. schema:
  1690. type: object
  1691. properties:
  1692. startPosition:
  1693. type: number
  1694. description: 'Start position of the element to reorder (starts from 1)'
  1695. insertAfterPosition:
  1696. type: number
  1697. description: 'New position for the block to reorder (starts from 0, to add the block before the first element)'
  1698. reorderLength:
  1699. type: number
  1700. description: 'How many element from startPosition to reorder (minimum length is 1)'
  1701. required:
  1702. - startPosition
  1703. - insertAfterPosition
  1704. /video-playlists/{id}/videos/{playlistElementId}:
  1705. put:
  1706. summary: 'Update a playlist element'
  1707. security:
  1708. - OAuth2: []
  1709. tags:
  1710. - Video Playlists
  1711. parameters:
  1712. - $ref: '#/components/parameters/idOrUUID'
  1713. - $ref: '#/components/parameters/playlistElementId'
  1714. responses:
  1715. '204':
  1716. description: successful operation
  1717. requestBody:
  1718. content:
  1719. application/json:
  1720. schema:
  1721. type: object
  1722. properties:
  1723. startTimestamp:
  1724. type: number
  1725. description: 'Start the video at this specific timestamp (in seconds)'
  1726. stopTimestamp:
  1727. type: number
  1728. description: 'Stop the video at this specific timestamp (in seconds)'
  1729. delete:
  1730. summary: 'Delete an element from a playlist'
  1731. security:
  1732. - OAuth2: []
  1733. tags:
  1734. - Video Playlists
  1735. parameters:
  1736. - $ref: '#/components/parameters/idOrUUID'
  1737. - $ref: '#/components/parameters/playlistElementId'
  1738. responses:
  1739. '204':
  1740. description: successful operation
  1741. '/users/me/video-playlists/videos-exist':
  1742. get:
  1743. summary: 'Check video exists in my playlists'
  1744. security:
  1745. - OAuth2: []
  1746. tags:
  1747. - Video Playlists
  1748. parameters:
  1749. - name: videoIds
  1750. in: query
  1751. required: true
  1752. description: The video ids to check
  1753. schema:
  1754. type: array
  1755. items:
  1756. type: number
  1757. responses:
  1758. '200':
  1759. description: successful operation
  1760. content:
  1761. application/json:
  1762. schema:
  1763. type: object
  1764. properties:
  1765. videoId:
  1766. type: array
  1767. items:
  1768. type: object
  1769. properties:
  1770. playlistElementId:
  1771. type: number
  1772. playlistId:
  1773. type: number
  1774. startTimestamp:
  1775. type: number
  1776. stopTimestamp:
  1777. type: number
  1778. '/accounts/{name}/video-channels':
  1779. get:
  1780. summary: List video channels of an account
  1781. tags:
  1782. - Video Channels
  1783. - Accounts
  1784. parameters:
  1785. - $ref: '#/components/parameters/name'
  1786. responses:
  1787. '200':
  1788. description: successful operation
  1789. content:
  1790. application/json:
  1791. schema:
  1792. type: array
  1793. items:
  1794. $ref: '#/components/schemas/VideoChannel'
  1795. '/accounts/{name}/ratings':
  1796. get:
  1797. summary: List ratings of an account
  1798. security:
  1799. - OAuth2: []
  1800. tags:
  1801. - Accounts
  1802. parameters:
  1803. - $ref: '#/components/parameters/name'
  1804. - $ref: '#/components/parameters/start'
  1805. - $ref: '#/components/parameters/count'
  1806. - $ref: '#/components/parameters/sort'
  1807. - name: rating
  1808. in: query
  1809. required: false
  1810. description: Optionally filter which ratings to retrieve
  1811. schema:
  1812. type: string
  1813. enum:
  1814. - like
  1815. - dislike
  1816. responses:
  1817. '200':
  1818. description: successful operation
  1819. content:
  1820. application/json:
  1821. schema:
  1822. type: array
  1823. items:
  1824. $ref: '#/components/schemas/VideoRating'
  1825. '/videos/{id}/comment-threads':
  1826. get:
  1827. summary: List threads of a video
  1828. tags:
  1829. - Video Comments
  1830. parameters:
  1831. - $ref: '#/components/parameters/idOrUUID'
  1832. - $ref: '#/components/parameters/start'
  1833. - $ref: '#/components/parameters/count'
  1834. - $ref: '#/components/parameters/commentsSort'
  1835. responses:
  1836. '200':
  1837. description: successful operation
  1838. content:
  1839. application/json:
  1840. schema:
  1841. $ref: '#/components/schemas/CommentThreadResponse'
  1842. post:
  1843. summary: Create a thread
  1844. security:
  1845. - OAuth2: []
  1846. tags:
  1847. - Video Comments
  1848. parameters:
  1849. - $ref: '#/components/parameters/idOrUUID'
  1850. responses:
  1851. '200':
  1852. description: successful operation
  1853. content:
  1854. application/json:
  1855. schema:
  1856. $ref: '#/components/schemas/CommentThreadPostResponse'
  1857. requestBody:
  1858. content:
  1859. application/json:
  1860. schema:
  1861. type: object
  1862. properties:
  1863. text:
  1864. type: string
  1865. description: 'Text comment'
  1866. required:
  1867. - text
  1868. '/videos/{id}/comment-threads/{threadId}':
  1869. get:
  1870. summary: Get a thread
  1871. tags:
  1872. - Video Comments
  1873. parameters:
  1874. - $ref: '#/components/parameters/idOrUUID'
  1875. - $ref: '#/components/parameters/threadId'
  1876. responses:
  1877. '200':
  1878. description: successful operation
  1879. content:
  1880. application/json:
  1881. schema:
  1882. $ref: '#/components/schemas/VideoCommentThreadTree'
  1883. '/videos/{id}/comments/{commentId}':
  1884. post:
  1885. summary: Reply to a thread of a video
  1886. security:
  1887. - OAuth2: []
  1888. tags:
  1889. - Video Comments
  1890. parameters:
  1891. - $ref: '#/components/parameters/idOrUUID'
  1892. - $ref: '#/components/parameters/commentId'
  1893. responses:
  1894. '200':
  1895. description: successful operation
  1896. content:
  1897. application/json:
  1898. schema:
  1899. $ref: '#/components/schemas/CommentThreadPostResponse'
  1900. requestBody:
  1901. content:
  1902. application/json:
  1903. schema:
  1904. type: object
  1905. properties:
  1906. text:
  1907. type: string
  1908. description: 'Text comment'
  1909. required:
  1910. - text
  1911. delete:
  1912. summary: Delete a comment or a reply
  1913. security:
  1914. - OAuth2: []
  1915. tags:
  1916. - Video Comments
  1917. parameters:
  1918. - $ref: '#/components/parameters/idOrUUID'
  1919. - $ref: '#/components/parameters/commentId'
  1920. responses:
  1921. '204':
  1922. description: successful operation
  1923. '/videos/{id}/rate':
  1924. put:
  1925. summary: Like/dislike a video
  1926. security:
  1927. - OAuth2: []
  1928. tags:
  1929. - Video Rates
  1930. parameters:
  1931. - $ref: '#/components/parameters/idOrUUID'
  1932. responses:
  1933. '204':
  1934. description: successful operation
  1935. /search/videos:
  1936. get:
  1937. tags:
  1938. - Search
  1939. summary: Search videos
  1940. parameters:
  1941. - $ref: '#/components/parameters/categoryOneOf'
  1942. - $ref: '#/components/parameters/tagsOneOf'
  1943. - $ref: '#/components/parameters/tagsAllOf'
  1944. - $ref: '#/components/parameters/licenceOneOf'
  1945. - $ref: '#/components/parameters/languageOneOf'
  1946. - $ref: '#/components/parameters/nsfw'
  1947. - $ref: '#/components/parameters/filter'
  1948. - $ref: '#/components/parameters/skipCount'
  1949. - $ref: '#/components/parameters/start'
  1950. - $ref: '#/components/parameters/count'
  1951. - $ref: '#/components/parameters/videosSearchSort'
  1952. - name: search
  1953. in: query
  1954. required: true
  1955. description: String to search
  1956. schema:
  1957. type: string
  1958. responses:
  1959. '200':
  1960. description: successful operation
  1961. content:
  1962. application/json:
  1963. schema:
  1964. $ref: '#/components/schemas/VideoListResponse'
  1965. servers:
  1966. - url: 'https://peertube.cpy.re/api/v1'
  1967. description: Live Test Server (live data - stable version)
  1968. - url: 'https://peertube2.cpy.re/api/v1'
  1969. description: Live Test Server (live data - latest nighlty version)
  1970. - url: 'https://peertube3.cpy.re/api/v1'
  1971. description: Live Test Server (live data - latest RC version)
  1972. components:
  1973. parameters:
  1974. start:
  1975. name: start
  1976. in: query
  1977. required: false
  1978. description: Offset
  1979. schema:
  1980. type: number
  1981. count:
  1982. name: count
  1983. in: query
  1984. required: false
  1985. description: "Number of items (max: 100)"
  1986. schema:
  1987. type: number
  1988. sort:
  1989. name: sort
  1990. in: query
  1991. required: false
  1992. description: Sort column (-createdAt for example)
  1993. schema:
  1994. type: string
  1995. videosSort:
  1996. name: sort
  1997. in: query
  1998. required: false
  1999. description: Sort videos by criteria
  2000. schema:
  2001. type: string
  2002. enum:
  2003. - -name
  2004. - -duration
  2005. - -createdAt
  2006. - -publishedAt
  2007. - -views
  2008. - -likes
  2009. - -trending
  2010. videosSearchSort:
  2011. name: sort
  2012. in: query
  2013. required: false
  2014. description: Sort videos by criteria
  2015. schema:
  2016. type: string
  2017. enum:
  2018. - -name
  2019. - -duration
  2020. - -createdAt
  2021. - -publishedAt
  2022. - -views
  2023. - -likes
  2024. - -match
  2025. commentsSort:
  2026. name: sort
  2027. in: query
  2028. required: false
  2029. description: Sort comments by criteria
  2030. schema:
  2031. type: string
  2032. enum:
  2033. - -createdAt
  2034. - -totalReplies
  2035. blacklistsSort:
  2036. name: sort
  2037. in: query
  2038. required: false
  2039. description: Sort blacklists by criteria
  2040. schema:
  2041. type: string
  2042. enum:
  2043. - -id
  2044. - -name
  2045. - -duration
  2046. - -views
  2047. - -likes
  2048. - -dislikes
  2049. - -uuid
  2050. - -createdAt
  2051. usersSort:
  2052. name: sort
  2053. in: query
  2054. required: false
  2055. description: Sort users by criteria
  2056. schema:
  2057. type: string
  2058. enum:
  2059. - -id
  2060. - -username
  2061. - -createdAt
  2062. abusesSort:
  2063. name: sort
  2064. in: query
  2065. required: false
  2066. description: Sort abuses by criteria
  2067. schema:
  2068. type: string
  2069. enum:
  2070. - -id
  2071. - -createdAt
  2072. - -state
  2073. name:
  2074. name: name
  2075. in: path
  2076. required: true
  2077. description: >-
  2078. The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
  2079. example)
  2080. schema:
  2081. type: string
  2082. id:
  2083. name: id
  2084. in: path
  2085. required: true
  2086. description: The user id
  2087. schema:
  2088. type: number
  2089. idOrUUID:
  2090. name: id
  2091. in: path
  2092. required: true
  2093. description: The object id or uuid
  2094. schema:
  2095. type: string
  2096. playlistElementId:
  2097. name: playlistElementId
  2098. in: path
  2099. required: true
  2100. description: Playlist element id
  2101. schema:
  2102. type: number
  2103. abuseId:
  2104. name: abuseId
  2105. in: path
  2106. required: true
  2107. description: Video abuse id
  2108. schema:
  2109. type: number
  2110. captionLanguage:
  2111. name: captionLanguage
  2112. in: path
  2113. required: true
  2114. description: The caption language
  2115. schema:
  2116. type: string
  2117. channelHandle:
  2118. name: channelHandle
  2119. in: path
  2120. required: true
  2121. description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
  2122. schema:
  2123. type: string
  2124. subscriptionHandle:
  2125. name: subscriptionHandle
  2126. in: path
  2127. required: true
  2128. description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
  2129. schema:
  2130. type: string
  2131. threadId:
  2132. name: threadId
  2133. in: path
  2134. required: true
  2135. description: The thread id (root comment id)
  2136. schema:
  2137. type: number
  2138. commentId:
  2139. name: commentId
  2140. in: path
  2141. required: true
  2142. description: The comment id
  2143. schema:
  2144. type: number
  2145. categoryOneOf:
  2146. name: categoryOneOf
  2147. in: query
  2148. required: false
  2149. description: category id of the video (see /videos/categories)
  2150. schema:
  2151. oneOf:
  2152. - type: number
  2153. - type: array
  2154. items:
  2155. type: number
  2156. style: form
  2157. explode: false
  2158. tagsOneOf:
  2159. name: tagsOneOf
  2160. in: query
  2161. required: false
  2162. description: tag(s) of the video
  2163. schema:
  2164. oneOf:
  2165. - type: string
  2166. - type: array
  2167. items:
  2168. type: string
  2169. style: form
  2170. explode: false
  2171. tagsAllOf:
  2172. name: tagsAllOf
  2173. in: query
  2174. required: false
  2175. description: tag(s) of the video, where all should be present in the video
  2176. schema:
  2177. oneOf:
  2178. - type: string
  2179. - type: array
  2180. items:
  2181. type: string
  2182. style: form
  2183. explode: false
  2184. languageOneOf:
  2185. name: languageOneOf
  2186. in: query
  2187. required: false
  2188. description: language id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language
  2189. schema:
  2190. oneOf:
  2191. - type: string
  2192. - type: array
  2193. items:
  2194. type: string
  2195. style: form
  2196. explode: false
  2197. licenceOneOf:
  2198. name: licenceOneOf
  2199. in: query
  2200. required: false
  2201. description: licence id of the video (see /videos/licences)
  2202. schema:
  2203. oneOf:
  2204. - type: number
  2205. - type: array
  2206. items:
  2207. type: number
  2208. style: form
  2209. explode: false
  2210. skipCount:
  2211. name: skipCount
  2212. in: query
  2213. required: false
  2214. description: if you don't need the `total` in the response
  2215. schema:
  2216. type: string
  2217. enum:
  2218. - 'true'
  2219. - 'false'
  2220. nsfw:
  2221. name: nsfw
  2222. in: query
  2223. required: false
  2224. description: whether to include nsfw videos, if any
  2225. schema:
  2226. type: string
  2227. enum:
  2228. - 'true'
  2229. - 'false'
  2230. filter:
  2231. name: filter
  2232. in: query
  2233. required: false
  2234. description: >
  2235. Special filters (local for instance) which might require special rights:
  2236. * `local` - only videos local to the instance
  2237. * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
  2238. schema:
  2239. type: string
  2240. enum:
  2241. - local
  2242. - all-local
  2243. subscriptionsUris:
  2244. name: uris
  2245. in: query
  2246. required: true
  2247. description: list of uris to check if each is part of the user subscriptions
  2248. schema:
  2249. type: array
  2250. items:
  2251. type: string
  2252. securitySchemes:
  2253. OAuth2:
  2254. description: >
  2255. In the header: *Authorization: Bearer <token\>*
  2256. Authenticating via OAuth requires the following steps:
  2257. - Have an account with sufficient authorization levels
  2258. - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
  2259. Bearer Token
  2260. - Make Authenticated Requests
  2261. type: oauth2
  2262. flows:
  2263. password:
  2264. tokenUrl: 'https://peertube.example.com/api/v1/users/token'
  2265. scopes:
  2266. admin: Admin scope
  2267. moderator: Moderator scope
  2268. user: User scope
  2269. schemas:
  2270. VideoConstantNumber:
  2271. properties:
  2272. id:
  2273. type: number
  2274. label:
  2275. type: string
  2276. VideoConstantString:
  2277. properties:
  2278. id:
  2279. type: string
  2280. label:
  2281. type: string
  2282. VideoPlaylistPrivacySet:
  2283. type: integer
  2284. enum:
  2285. - 1
  2286. - 2
  2287. - 3
  2288. description: 'The video playlist privacy (Public = 1, Unlisted = 2, Private = 3)'
  2289. VideoPlaylistPrivacyConstant:
  2290. properties:
  2291. id:
  2292. $ref: '#/components/schemas/VideoPlaylistPrivacySet'
  2293. label:
  2294. type: string
  2295. VideoPlaylistTypeSet:
  2296. type: integer
  2297. enum:
  2298. - 1
  2299. - 2
  2300. description: 'The video playlist type (Regular = 1, Watch Later = 2)'
  2301. VideoPlaylistTypeConstant:
  2302. properties:
  2303. id:
  2304. $ref: '#/components/schemas/VideoPlaylistTypeSet'
  2305. label:
  2306. type: string
  2307. VideoPrivacySet:
  2308. type: integer
  2309. enum:
  2310. - 1
  2311. - 2
  2312. - 3
  2313. - 4
  2314. description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3, Internal = 4)'
  2315. VideoPrivacyConstant:
  2316. properties:
  2317. id:
  2318. $ref: '#/components/schemas/VideoPrivacySet'
  2319. label:
  2320. type: string
  2321. NSFWPolicy:
  2322. type: string
  2323. enum:
  2324. - display
  2325. - blur
  2326. - do_not_list
  2327. UserRole:
  2328. type: number
  2329. enum:
  2330. - 0
  2331. - 1
  2332. - 2
  2333. description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
  2334. VideoStateConstant:
  2335. properties:
  2336. id:
  2337. type: integer
  2338. enum:
  2339. - 1
  2340. - 2
  2341. - 3
  2342. description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
  2343. label:
  2344. type: string
  2345. VideoAbuseStateSet:
  2346. type: integer
  2347. enum:
  2348. - 1
  2349. - 2
  2350. - 3
  2351. description: 'The video playlist privacy (Pending = 1, Rejected = 2, Accepted = 3)'
  2352. VideoAbuseStateConstant:
  2353. properties:
  2354. id:
  2355. $ref: '#/components/schemas/VideoAbuseStateSet'
  2356. label:
  2357. type: string
  2358. VideoResolutionConstant:
  2359. properties:
  2360. id:
  2361. type: integer
  2362. description: 'Video resolution (240, 360, 720 ...)'
  2363. label:
  2364. type: string
  2365. VideoScheduledUpdate:
  2366. properties:
  2367. privacy:
  2368. $ref: '#/components/schemas/VideoPrivacySet'
  2369. updateAt:
  2370. type: string
  2371. format: date
  2372. description: When to update the video
  2373. required:
  2374. - updateAt
  2375. AccountSummary:
  2376. properties:
  2377. id:
  2378. type: number
  2379. name:
  2380. type: string
  2381. displayName:
  2382. type: string
  2383. url:
  2384. type: string
  2385. host:
  2386. type: string
  2387. avatar:
  2388. nullable: true
  2389. allOf:
  2390. - $ref: '#/components/schemas/Avatar'
  2391. VideoChannelSummary:
  2392. properties:
  2393. id:
  2394. type: number
  2395. name:
  2396. type: string
  2397. displayName:
  2398. type: string
  2399. url:
  2400. type: string
  2401. host:
  2402. type: string
  2403. avatar:
  2404. nullable: true
  2405. allOf:
  2406. - $ref: '#/components/schemas/Avatar'
  2407. PlaylistElement:
  2408. properties:
  2409. position:
  2410. type: number
  2411. startTimestamp:
  2412. type: number
  2413. stopTimestamp:
  2414. type: number
  2415. video:
  2416. nullable: true
  2417. allOf:
  2418. - $ref: '#/components/schemas/Video'
  2419. VideoFile:
  2420. properties:
  2421. magnetUri:
  2422. type: string
  2423. resolution:
  2424. $ref: '#/components/schemas/VideoResolutionConstant'
  2425. size:
  2426. type: number
  2427. description: 'Video file size in bytes'
  2428. torrentUrl:
  2429. type: string
  2430. torrentDownloadUrl:
  2431. type: string
  2432. fileUrl:
  2433. type: string
  2434. fileDownloadUrl:
  2435. type: string
  2436. fps:
  2437. type: number
  2438. VideoStreamingPlaylists:
  2439. properties:
  2440. id:
  2441. type: number
  2442. type:
  2443. type: number
  2444. enum:
  2445. - 1
  2446. description: 'Playlist type (HLS = 1)'
  2447. playlistUrl:
  2448. type: string
  2449. segmentsSha256Url:
  2450. type: string
  2451. redundancies:
  2452. type: array
  2453. items:
  2454. type: object
  2455. properties:
  2456. baseUrl:
  2457. type: string
  2458. Video:
  2459. properties:
  2460. id:
  2461. type: number
  2462. uuid:
  2463. type: string
  2464. createdAt:
  2465. type: string
  2466. publishedAt:
  2467. type: string
  2468. updatedAt:
  2469. type: string
  2470. originallyPublishedAt:
  2471. type: string
  2472. category:
  2473. $ref: '#/components/schemas/VideoConstantNumber'
  2474. licence:
  2475. $ref: '#/components/schemas/VideoConstantNumber'
  2476. language:
  2477. $ref: '#/components/schemas/VideoConstantString'
  2478. privacy:
  2479. $ref: '#/components/schemas/VideoPrivacyConstant'
  2480. description:
  2481. type: string
  2482. duration:
  2483. type: number
  2484. isLocal:
  2485. type: boolean
  2486. name:
  2487. type: string
  2488. thumbnailPath:
  2489. type: string
  2490. previewPath:
  2491. type: string
  2492. embedPath:
  2493. type: string
  2494. views:
  2495. type: number
  2496. likes:
  2497. type: number
  2498. dislikes:
  2499. type: number
  2500. nsfw:
  2501. type: boolean
  2502. waitTranscoding:
  2503. type: boolean
  2504. nullable: true
  2505. state:
  2506. $ref: '#/components/schemas/VideoStateConstant'
  2507. scheduledUpdate:
  2508. nullable: true
  2509. allOf:
  2510. - $ref: '#/components/schemas/VideoScheduledUpdate'
  2511. blacklisted:
  2512. nullable: true
  2513. type: boolean
  2514. blacklistedReason:
  2515. nullable: true
  2516. type: string
  2517. account:
  2518. $ref: '#/components/schemas/AccountSummary'
  2519. channel:
  2520. $ref: '#/components/schemas/VideoChannelSummary'
  2521. userHistory:
  2522. nullable: true
  2523. type: object
  2524. properties:
  2525. currentTime:
  2526. type: number
  2527. VideoDetails:
  2528. allOf:
  2529. - $ref: '#/components/schemas/Video'
  2530. - type: object
  2531. properties:
  2532. descriptionPath:
  2533. type: string
  2534. support:
  2535. type: string
  2536. channel:
  2537. $ref: '#/components/schemas/VideoChannel'
  2538. account:
  2539. $ref: '#/components/schemas/Account'
  2540. tags:
  2541. type: array
  2542. items:
  2543. type: string
  2544. files:
  2545. type: array
  2546. items:
  2547. $ref: '#/components/schemas/VideoFile'
  2548. commentsEnabled:
  2549. type: boolean
  2550. downloadEnabled:
  2551. type: boolean
  2552. trackerUrls:
  2553. type: array
  2554. items:
  2555. type: string
  2556. streamingPlaylists:
  2557. type: array
  2558. items:
  2559. $ref: '#/components/schemas/VideoStreamingPlaylists'
  2560. VideoImportStateConstant:
  2561. properties:
  2562. id:
  2563. type: integer
  2564. enum:
  2565. - 1
  2566. - 2
  2567. - 3
  2568. description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
  2569. label:
  2570. type: string
  2571. VideoImport:
  2572. properties:
  2573. id:
  2574. type: number
  2575. targetUrl:
  2576. type: string
  2577. magnetUri:
  2578. type: string
  2579. torrentName:
  2580. type: string
  2581. state:
  2582. type: object
  2583. properties:
  2584. id:
  2585. $ref: '#/components/schemas/VideoImportStateConstant'
  2586. label:
  2587. type: string
  2588. error:
  2589. type: string
  2590. createdAt:
  2591. type: string
  2592. updatedAt:
  2593. type: string
  2594. video:
  2595. $ref: '#/components/schemas/Video'
  2596. VideoAbuse:
  2597. properties:
  2598. id:
  2599. type: number
  2600. reason:
  2601. type: string
  2602. reporterAccount:
  2603. $ref: '#/components/schemas/Account'
  2604. state:
  2605. $ref: '#/components/schemas/VideoAbuseStateConstant'
  2606. moderationComment:
  2607. type: string
  2608. video:
  2609. type: object
  2610. properties:
  2611. id:
  2612. type: number
  2613. name:
  2614. type: string
  2615. uuid:
  2616. type: string
  2617. createdAt:
  2618. type: string
  2619. VideoBlacklist:
  2620. properties:
  2621. id:
  2622. type: number
  2623. videoId:
  2624. type: number
  2625. createdAt:
  2626. type: string
  2627. updatedAt:
  2628. type: string
  2629. name:
  2630. type: string
  2631. uuid:
  2632. type: string
  2633. description:
  2634. type: string
  2635. duration:
  2636. type: number
  2637. views:
  2638. type: number
  2639. likes:
  2640. type: number
  2641. dislikes:
  2642. type: number
  2643. nsfw:
  2644. type: boolean
  2645. VideoChannel:
  2646. properties:
  2647. displayName:
  2648. type: string
  2649. description:
  2650. type: string
  2651. isLocal:
  2652. type: boolean
  2653. ownerAccount:
  2654. type: object
  2655. properties:
  2656. id:
  2657. type: number
  2658. uuid:
  2659. type: string
  2660. VideoPlaylist:
  2661. properties:
  2662. id:
  2663. type: number
  2664. createdAt:
  2665. type: string
  2666. updatedAt:
  2667. type: string
  2668. description:
  2669. type: string
  2670. uuid:
  2671. type: string
  2672. displayName:
  2673. type: string
  2674. isLocal:
  2675. type: boolean
  2676. videoLength:
  2677. type: number
  2678. thumbnailPath:
  2679. type: string
  2680. privacy:
  2681. $ref: '#/components/schemas/VideoPlaylistPrivacyConstant'
  2682. type:
  2683. $ref: '#/components/schemas/VideoPlaylistTypeConstant'
  2684. ownerAccount:
  2685. $ref: '#/components/schemas/AccountSummary'
  2686. videoChannel:
  2687. $ref: '#/components/schemas/VideoChannelSummary'
  2688. VideoComment:
  2689. properties:
  2690. id:
  2691. type: number
  2692. url:
  2693. type: string
  2694. text:
  2695. type: string
  2696. threadId:
  2697. type: number
  2698. inReplyToCommentId:
  2699. type: number
  2700. videoId:
  2701. type: number
  2702. createdAt:
  2703. type: string
  2704. updatedAt:
  2705. type: string
  2706. totalRepliesFromVideoAuthor:
  2707. type: number
  2708. totalReplies:
  2709. type: number
  2710. account:
  2711. $ref: '#/components/schemas/Account'
  2712. VideoCommentThreadTree:
  2713. properties:
  2714. comment:
  2715. $ref: '#/components/schemas/VideoComment'
  2716. children:
  2717. type: array
  2718. items:
  2719. $ref: '#/components/schemas/VideoCommentThreadTree'
  2720. VideoCaption:
  2721. properties:
  2722. language:
  2723. $ref: '#/components/schemas/VideoConstantString'
  2724. captionPath:
  2725. type: string
  2726. Avatar:
  2727. properties:
  2728. path:
  2729. type: string
  2730. createdAt:
  2731. type: string
  2732. updatedAt:
  2733. type: string
  2734. Actor:
  2735. properties:
  2736. id:
  2737. type: number
  2738. url:
  2739. type: string
  2740. name:
  2741. type: string
  2742. host:
  2743. type: string
  2744. followingCount:
  2745. type: number
  2746. followersCount:
  2747. type: number
  2748. createdAt:
  2749. type: string
  2750. updatedAt:
  2751. type: string
  2752. avatar:
  2753. $ref: '#/components/schemas/Avatar'
  2754. Account:
  2755. allOf:
  2756. - $ref: '#/components/schemas/Actor'
  2757. - properties:
  2758. userId:
  2759. type: string
  2760. displayName:
  2761. type: string
  2762. description:
  2763. type: string
  2764. User:
  2765. properties:
  2766. id:
  2767. type: number
  2768. username:
  2769. type: string
  2770. email:
  2771. type: string
  2772. theme:
  2773. type: string
  2774. description: 'Theme enabled by this user'
  2775. emailVerified:
  2776. type: boolean
  2777. description: 'Is email verified?'
  2778. nsfwPolicy:
  2779. $ref: '#/components/schemas/NSFWPolicy'
  2780. webtorrentEnabled:
  2781. type: boolean
  2782. autoPlayVideo:
  2783. type: boolean
  2784. role:
  2785. $ref: '#/components/schemas/UserRole'
  2786. roleLabel:
  2787. type: string
  2788. enum:
  2789. - User
  2790. - Moderator
  2791. - Administrator
  2792. videoQuota:
  2793. type: number
  2794. videoQuotaDaily:
  2795. type: number
  2796. videosCount:
  2797. type: number
  2798. videoAbusesCount:
  2799. type: number
  2800. videoAbusesAcceptedCount:
  2801. type: number
  2802. videoAbusesCreatedCount:
  2803. type: number
  2804. videoCommentsCount:
  2805. type: number
  2806. noInstanceConfigWarningModal:
  2807. type: boolean
  2808. noWelcomeModal:
  2809. type: boolean
  2810. blocked:
  2811. type: boolean
  2812. blockedReason:
  2813. type: string
  2814. createdAt:
  2815. type: string
  2816. account:
  2817. $ref: '#/components/schemas/Account'
  2818. videoChannels:
  2819. type: array
  2820. items:
  2821. $ref: '#/components/schemas/VideoChannel'
  2822. UserWatchingVideo:
  2823. properties:
  2824. currentTime:
  2825. type: number
  2826. ServerConfig:
  2827. properties:
  2828. instance:
  2829. type: object
  2830. properties:
  2831. name:
  2832. type: string
  2833. shortDescription:
  2834. type: string
  2835. defaultClientRoute:
  2836. type: string
  2837. isNSFW:
  2838. type: boolean
  2839. defaultNSFWPolicy:
  2840. type: string
  2841. customizations:
  2842. type: object
  2843. properties:
  2844. javascript:
  2845. type: string
  2846. css:
  2847. type: string
  2848. search:
  2849. type: object
  2850. properties:
  2851. remoteUri:
  2852. type: object
  2853. properties:
  2854. users:
  2855. type: boolean
  2856. anonymous:
  2857. type: boolean
  2858. plugin:
  2859. type: object
  2860. properties:
  2861. registered:
  2862. type: array
  2863. items:
  2864. type: string
  2865. theme:
  2866. type: object
  2867. properties:
  2868. registered:
  2869. type: array
  2870. items:
  2871. type: string
  2872. email:
  2873. type: object
  2874. properties:
  2875. enabled:
  2876. type: boolean
  2877. contactForm:
  2878. type: object
  2879. properties:
  2880. enabled:
  2881. type: boolean
  2882. serverVersion:
  2883. type: string
  2884. serverCommit:
  2885. type: string
  2886. signup:
  2887. type: object
  2888. properties:
  2889. allowed:
  2890. type: boolean
  2891. allowedForCurrentIP:
  2892. type: boolean
  2893. requiresEmailVerification:
  2894. type: boolean
  2895. transcoding:
  2896. type: object
  2897. properties:
  2898. hls:
  2899. type: object
  2900. properties:
  2901. enabled:
  2902. type: boolean
  2903. webtorrent:
  2904. type: object
  2905. properties:
  2906. enabled:
  2907. type: boolean
  2908. enabledResolutions:
  2909. type: array
  2910. items:
  2911. type: number
  2912. import:
  2913. type: object
  2914. properties:
  2915. videos:
  2916. type: object
  2917. properties:
  2918. http:
  2919. type: object
  2920. properties:
  2921. enabled:
  2922. type: boolean
  2923. torrent:
  2924. type: object
  2925. properties:
  2926. enabled:
  2927. type: boolean
  2928. autoBlacklist:
  2929. type: object
  2930. properties:
  2931. videos:
  2932. type: object
  2933. properties:
  2934. ofUsers:
  2935. type: object
  2936. properties:
  2937. enabled:
  2938. type: boolean
  2939. avatar:
  2940. type: object
  2941. properties:
  2942. file:
  2943. type: object
  2944. properties:
  2945. size:
  2946. type: object
  2947. properties:
  2948. max:
  2949. type: number
  2950. extensions:
  2951. type: array
  2952. items:
  2953. type: string
  2954. video:
  2955. type: object
  2956. properties:
  2957. image:
  2958. type: object
  2959. properties:
  2960. extensions:
  2961. type: array
  2962. items:
  2963. type: string
  2964. size:
  2965. type: object
  2966. properties:
  2967. max:
  2968. type: number
  2969. file:
  2970. type: object
  2971. properties:
  2972. extensions:
  2973. type: array
  2974. items:
  2975. type: string
  2976. videoCaption:
  2977. type: object
  2978. properties:
  2979. file:
  2980. type: object
  2981. properties:
  2982. size:
  2983. type: object
  2984. properties:
  2985. max:
  2986. type: number
  2987. extensions:
  2988. type: array
  2989. items:
  2990. type: string
  2991. user:
  2992. type: object
  2993. properties:
  2994. videoQuota:
  2995. type: number
  2996. videoQuotaDaily:
  2997. type: number
  2998. trending:
  2999. type: object
  3000. properties:
  3001. videos:
  3002. type: object
  3003. properties:
  3004. intervalDays:
  3005. type: number
  3006. tracker:
  3007. type: object
  3008. properties:
  3009. enabled:
  3010. type: boolean
  3011. followings:
  3012. type: object
  3013. properties:
  3014. instance:
  3015. type: object
  3016. properties:
  3017. autoFollowIndex:
  3018. type: object
  3019. properties:
  3020. indexUrl:
  3021. type: string
  3022. ServerConfigAbout:
  3023. properties:
  3024. instance:
  3025. type: object
  3026. properties:
  3027. name:
  3028. type: string
  3029. shortDescription:
  3030. type: string
  3031. description:
  3032. type: string
  3033. terms:
  3034. type: string
  3035. ServerConfigCustom:
  3036. properties:
  3037. instance:
  3038. type: object
  3039. properties:
  3040. name:
  3041. type: string
  3042. shortDescription:
  3043. type: string
  3044. description:
  3045. type: string
  3046. terms:
  3047. type: string
  3048. defaultClientRoute:
  3049. type: string
  3050. isNSFW:
  3051. type: boolean
  3052. defaultNSFWPolicy:
  3053. type: string
  3054. customizations:
  3055. type: object
  3056. properties:
  3057. javascript:
  3058. type: string
  3059. css:
  3060. type: string
  3061. theme:
  3062. type: object
  3063. properties:
  3064. default:
  3065. type: string
  3066. services:
  3067. type: object
  3068. properties:
  3069. twitter:
  3070. type: object
  3071. properties:
  3072. username:
  3073. type: string
  3074. whitelisted:
  3075. type: boolean
  3076. cache:
  3077. type: object
  3078. properties:
  3079. previews:
  3080. type: object
  3081. properties:
  3082. size:
  3083. type: number
  3084. captions:
  3085. type: object
  3086. properties:
  3087. size:
  3088. type: number
  3089. signup:
  3090. type: object
  3091. properties:
  3092. enabled:
  3093. type: boolean
  3094. limit:
  3095. type: number
  3096. requiresEmailVerification:
  3097. type: boolean
  3098. admin:
  3099. type: object
  3100. properties:
  3101. email:
  3102. type: string
  3103. contactForm:
  3104. type: object
  3105. properties:
  3106. enabled:
  3107. type: boolean
  3108. user:
  3109. type: object
  3110. properties:
  3111. videoQuota:
  3112. type: number
  3113. videoQuotaDaily:
  3114. type: number
  3115. transcoding:
  3116. type: object
  3117. properties:
  3118. enabled:
  3119. type: boolean
  3120. allowAdditionalExtensions:
  3121. type: boolean
  3122. allowAudioFiles:
  3123. type: boolean
  3124. threads:
  3125. type: number
  3126. resolutions:
  3127. type: object
  3128. properties:
  3129. 240p:
  3130. type: boolean
  3131. 360p:
  3132. type: boolean
  3133. 480p:
  3134. type: boolean
  3135. 720p:
  3136. type: boolean
  3137. 1080p:
  3138. type: boolean
  3139. 2160p:
  3140. type: boolean
  3141. hls:
  3142. type: object
  3143. properties:
  3144. enabled:
  3145. type: boolean
  3146. import:
  3147. type: object
  3148. properties:
  3149. videos:
  3150. type: object
  3151. properties:
  3152. http:
  3153. type: object
  3154. properties:
  3155. enabled:
  3156. type: boolean
  3157. torrent:
  3158. type: object
  3159. properties:
  3160. enabled:
  3161. type: boolean
  3162. autoBlacklist:
  3163. type: object
  3164. properties:
  3165. videos:
  3166. type: object
  3167. properties:
  3168. ofUsers:
  3169. type: object
  3170. properties:
  3171. enabled:
  3172. type: boolean
  3173. followers:
  3174. type: object
  3175. properties:
  3176. instance:
  3177. type: object
  3178. properties:
  3179. enabled:
  3180. type: boolean
  3181. manualApproval:
  3182. type: boolean
  3183. Follow:
  3184. properties:
  3185. id:
  3186. type: number
  3187. follower:
  3188. $ref: '#/components/schemas/Actor'
  3189. following:
  3190. $ref: '#/components/schemas/Actor'
  3191. score:
  3192. type: number
  3193. state:
  3194. type: string
  3195. enum:
  3196. - pending
  3197. - accepted
  3198. createdAt:
  3199. type: string
  3200. updatedAt:
  3201. type: string
  3202. Job:
  3203. properties:
  3204. id:
  3205. type: number
  3206. state:
  3207. type: string
  3208. enum:
  3209. - pending
  3210. - processing
  3211. - error
  3212. - success
  3213. category:
  3214. type: string
  3215. enum:
  3216. - transcoding
  3217. - activitypub-http
  3218. handlerName:
  3219. type: string
  3220. handlerInputData:
  3221. type: string
  3222. createdAt:
  3223. type: string
  3224. updatedAt:
  3225. type: string
  3226. AddUserResponse:
  3227. properties:
  3228. id:
  3229. type: number
  3230. uuid:
  3231. type: string
  3232. VideoUploadResponse:
  3233. properties:
  3234. video:
  3235. type: object
  3236. properties:
  3237. id:
  3238. type: number
  3239. uuid:
  3240. type: string
  3241. CommentThreadResponse:
  3242. properties:
  3243. total:
  3244. type: number
  3245. data:
  3246. type: array
  3247. items:
  3248. $ref: '#/components/schemas/VideoComment'
  3249. CommentThreadPostResponse:
  3250. properties:
  3251. comment:
  3252. $ref: '#/components/schemas/VideoComment'
  3253. VideoListResponse:
  3254. properties:
  3255. total:
  3256. type: number
  3257. data:
  3258. type: array
  3259. items:
  3260. $ref: '#/components/schemas/Video'
  3261. AddUser:
  3262. properties:
  3263. username:
  3264. type: string
  3265. description: 'The user username '
  3266. password:
  3267. type: string
  3268. description: 'The user password. If the smtp server is configured, you can leave empty and an email will be sent '
  3269. email:
  3270. type: string
  3271. description: 'The user email '
  3272. videoQuota:
  3273. type: string
  3274. description: 'The user videoQuota '
  3275. videoQuotaDaily:
  3276. type: string
  3277. description: 'The user daily video quota '
  3278. role:
  3279. $ref: '#/components/schemas/UserRole'
  3280. required:
  3281. - username
  3282. - password
  3283. - email
  3284. - videoQuota
  3285. - videoQuotaDaily
  3286. - role
  3287. UpdateUser:
  3288. properties:
  3289. id:
  3290. type: string
  3291. description: 'The user id '
  3292. email:
  3293. type: string
  3294. description: 'The updated email of the user '
  3295. videoQuota:
  3296. type: string
  3297. description: 'The updated videoQuota of the user '
  3298. videoQuotaDaily:
  3299. type: string
  3300. description: 'The updated daily video quota of the user '
  3301. role:
  3302. $ref: '#/components/schemas/UserRole'
  3303. required:
  3304. - id
  3305. - email
  3306. - videoQuota
  3307. - videoQuotaDaily
  3308. - role
  3309. UpdateMe:
  3310. properties:
  3311. password:
  3312. type: string
  3313. description: 'Your new password '
  3314. email:
  3315. type: string
  3316. description: 'Your new email '
  3317. displayNSFW:
  3318. type: string
  3319. description: 'Your new displayNSFW '
  3320. autoPlayVideo:
  3321. type: string
  3322. description: 'Your new autoPlayVideo '
  3323. required:
  3324. - password
  3325. - email
  3326. - displayNSFW
  3327. - autoPlayVideo
  3328. GetMeVideoRating:
  3329. properties:
  3330. id:
  3331. type: string
  3332. description: 'Id of the video '
  3333. rating:
  3334. type: number
  3335. description: 'Rating of the video '
  3336. required:
  3337. - id
  3338. - rating
  3339. VideoRating:
  3340. properties:
  3341. video:
  3342. $ref: '#/components/schemas/Video'
  3343. rating:
  3344. type: number
  3345. description: 'Rating of the video'
  3346. required:
  3347. - video
  3348. - rating
  3349. RegisterUser:
  3350. properties:
  3351. username:
  3352. type: string
  3353. description: 'The username of the user '
  3354. password:
  3355. type: string
  3356. description: 'The password of the user '
  3357. email:
  3358. type: string
  3359. description: 'The email of the user '
  3360. displayName:
  3361. type: string
  3362. description: 'The user display name'
  3363. channel:
  3364. type: object
  3365. properties:
  3366. name:
  3367. type: string
  3368. description: 'The default channel name'
  3369. displayName:
  3370. type: string
  3371. description: 'The default channel display name'
  3372. required:
  3373. - username
  3374. - password
  3375. - email
  3376. VideoChannelCreate:
  3377. properties:
  3378. name:
  3379. type: string
  3380. displayName:
  3381. type: string
  3382. description:
  3383. type: string
  3384. support:
  3385. type: string
  3386. required:
  3387. - name
  3388. - displayName
  3389. VideoChannelUpdate:
  3390. properties:
  3391. displayName:
  3392. type: string
  3393. description:
  3394. type: string
  3395. support:
  3396. type: string
  3397. bulkVideosSupportUpdate:
  3398. type: boolean
  3399. description: 'Update all videos support field of this channel'