openapi.yaml 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550
  1. openapi: 3.0.0
  2. info:
  3. title: PeerTube
  4. version: 1.3.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). Our API is RESTful. It has predictable
  17. resource URLs. It returns HTTP response codes to indicate errors. It also
  18. accepts and returns JSON in the HTTP body. You can use your favorite
  19. HTTP/REST library for your programming language to use PeerTube. No official
  20. SDK is currently provided, but the spec API is fully compatible with
  21. [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)
  22. which generates a client SDK in the language of your choice.
  23. # Authentication
  24. When you sign up for an account, you are given the possibility to generate
  25. sessions, and authenticate using this session token. One session token can
  26. currently be used at a time.
  27. # Errors
  28. The API uses standard HTTP status codes to indicate the success or failure
  29. of the API call. The body of the response will be JSON in the following
  30. format.
  31. ```
  32. {
  33. "code": "unauthorized_request", // example inner error code
  34. "error": "Token is invalid." // example exposed error message
  35. }
  36. ```
  37. externalDocs:
  38. url: https://docs.joinpeertube.org/api-rest-reference.html
  39. tags:
  40. - name: Accounts
  41. description: >
  42. Using some features of PeerTube require authentication, for which Accounts
  43. provide different levels of permission as well as associated user
  44. information. Accounts also encompass remote accounts discovered across the federation.
  45. - name: Config
  46. description: >
  47. Each server exposes public information regarding supported videos and
  48. options.
  49. - name: Feeds
  50. description: |
  51. Feeds of videos and feeds of comments allow to see updates and get them in
  52. an aggregator or script of your choice.
  53. - name: Job
  54. description: >
  55. Jobs are long-running tasks enqueued and processed by the instance
  56. itself. No additional worker registration is currently available.
  57. - name: Server Following
  58. description: >
  59. Managing servers which the instance interacts with is crucial to the
  60. concept of federation in PeerTube and external video indexation. The PeerTube
  61. server then deals with inter-server ActivityPub operations and propagates
  62. information across its social graph by posting activities to actors' inbox
  63. endpoints.
  64. - name: Video Abuse
  65. description: |
  66. Video abuses deal with reports of local or remote videos alike.
  67. - name: Video
  68. description: |
  69. Operations dealing with listing, uploading, fetching or modifying videos.
  70. - name: Search
  71. description: |
  72. The search helps to find _videos_ from within the instance and beyond.
  73. Videos from other instances federated by the instance (that is, instances
  74. followed by the instance) can be found via keywords and other criteria of
  75. the advanced search.
  76. - name: Video Comment
  77. description: >
  78. Operations dealing with comments to a video. Comments are organized in
  79. threads.
  80. - name: Video Channel
  81. description: >
  82. Operations dealing with creation, modification and video listing of a
  83. user's channels.
  84. - name: Video Blacklist
  85. description: >
  86. Operations dealing with blacklisting videos (removing them from view and
  87. preventing interactions).
  88. - name: Video Rate
  89. description: >
  90. Voting for a video.
  91. x-tagGroups:
  92. - name: Accounts
  93. tags:
  94. - Accounts
  95. - User
  96. - My User
  97. - name: Videos
  98. tags:
  99. - Video
  100. - Video Caption
  101. - Video Channel
  102. - Video Comment
  103. - Video Following
  104. - Video Rate
  105. - name: Moderation
  106. tags:
  107. - Video Abuse
  108. - Video Blacklist
  109. - name: Instance Configuration
  110. tags:
  111. - Config
  112. - Server Following
  113. - name: Notifications
  114. tags:
  115. - Feeds
  116. - name: Jobs
  117. tags:
  118. - Job
  119. - name: Search
  120. tags:
  121. - Search
  122. paths:
  123. '/accounts/{name}':
  124. get:
  125. tags:
  126. - Accounts
  127. summary: Get the account by name
  128. parameters:
  129. - $ref: '#/components/parameters/name'
  130. - $ref: '#/components/parameters/start'
  131. - $ref: '#/components/parameters/count'
  132. - $ref: '#/components/parameters/sort'
  133. responses:
  134. '200':
  135. description: successful operation
  136. content:
  137. application/json:
  138. schema:
  139. $ref: '#/components/schemas/Account'
  140. '/accounts/{name}/videos':
  141. get:
  142. tags:
  143. - Accounts
  144. - Video
  145. summary: 'Get videos for an account, provided the name of that account'
  146. parameters:
  147. - $ref: '#/components/parameters/name'
  148. responses:
  149. '200':
  150. description: successful operation
  151. content:
  152. application/json:
  153. schema:
  154. $ref: '#/components/schemas/VideoListResponse'
  155. x-code-samples:
  156. - lang: JavaScript
  157. source: |
  158. fetch('https://peertube2.cpy.re/api/v1/accounts/{name}/videos')
  159. .then(function(response) {
  160. return response.json()
  161. }).then(function(data) {
  162. console.log(data)
  163. })
  164. - lang: Shell
  165. source: |
  166. # pip install httpie
  167. http -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos
  168. - lang: Ruby
  169. source: |
  170. require 'uri'
  171. require 'net/http'
  172. url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")
  173. http = Net::HTTP.new(url.host, url.port)
  174. http.use_ssl = true
  175. http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  176. request = Net::HTTP::Post.new(url)
  177. request["content-type"] = 'application/json'
  178. response = http.request(request)
  179. puts response.read_body
  180. - lang: Python
  181. source: |
  182. import http.client
  183. conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1")
  184. headers = {
  185. 'content-type': "application/json"
  186. }
  187. conn.request("POST", "/accounts/{name}/videos", None, headers)
  188. res = conn.getresponse()
  189. data = res.read()
  190. print(data.decode("utf-8"))
  191. /accounts:
  192. get:
  193. tags:
  194. - Accounts
  195. summary: Get all accounts
  196. responses:
  197. '200':
  198. description: successful operation
  199. content:
  200. 'application/json':
  201. schema:
  202. type: array
  203. items:
  204. $ref: '#/components/schemas/Account'
  205. /config:
  206. get:
  207. tags:
  208. - Config
  209. summary: Get the public configuration of the server
  210. responses:
  211. '200':
  212. description: successful operation
  213. content:
  214. application/json:
  215. schema:
  216. $ref: '#/components/schemas/ServerConfig'
  217. /config/about:
  218. get:
  219. summary: Get the instance about page content
  220. tags:
  221. - Config
  222. responses:
  223. '200':
  224. description: successful operation
  225. /config/custom:
  226. get:
  227. summary: Get the runtime configuration of the server
  228. tags:
  229. - Config
  230. security:
  231. - OAuth2:
  232. - admin
  233. responses:
  234. '200':
  235. description: successful operation
  236. put:
  237. summary: Set the runtime configuration of the server
  238. tags:
  239. - Config
  240. security:
  241. - OAuth2:
  242. - admin
  243. responses:
  244. '200':
  245. description: successful operation
  246. delete:
  247. summary: Delete the runtime configuration of the server
  248. tags:
  249. - Config
  250. security:
  251. - OAuth2:
  252. - admin
  253. responses:
  254. '200':
  255. description: successful operation
  256. '/feeds/videos.{format}':
  257. get:
  258. summary: >-
  259. Get the feed of videos for the server, with optional filter by account
  260. name or id
  261. tags:
  262. - Feeds
  263. parameters:
  264. - name: format
  265. in: path
  266. required: true
  267. description: >-
  268. The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and
  269. json to JSON FEED 1.0
  270. schema:
  271. type: string
  272. enum:
  273. - xml
  274. - atom
  275. - json
  276. default: xml
  277. - name: accountId
  278. in: query
  279. required: false
  280. description: >-
  281. The id of the local account to filter to (beware, users IDs and not
  282. actors IDs which will return empty feeds
  283. schema:
  284. type: number
  285. - name: accountName
  286. in: query
  287. required: false
  288. description: The name of the local account to filter to
  289. schema:
  290. type: string
  291. responses:
  292. '200':
  293. description: successful operation
  294. /jobs/{state}:
  295. get:
  296. summary: Get list of jobs
  297. security:
  298. - OAuth2:
  299. - admin
  300. tags:
  301. - Job
  302. parameters:
  303. - name: state
  304. in: path
  305. required: true
  306. description: The state of the job
  307. schema:
  308. type: string
  309. enum:
  310. - active
  311. - completed
  312. - failed
  313. - waiting
  314. - delayed
  315. - $ref: '#/components/parameters/start'
  316. - $ref: '#/components/parameters/count'
  317. - $ref: '#/components/parameters/sort'
  318. responses:
  319. '200':
  320. description: successful operation
  321. content:
  322. application/json:
  323. schema:
  324. type: array
  325. items:
  326. $ref: '#/components/schemas/Job'
  327. '/server/following/{host}':
  328. delete:
  329. security:
  330. - OAuth2:
  331. - admin
  332. tags:
  333. - Server Following
  334. summary: Unfollow a server by hostname
  335. parameters:
  336. - name: host
  337. in: path
  338. required: true
  339. description: 'The host to unfollow '
  340. schema:
  341. type: string
  342. responses:
  343. '201':
  344. description: successful operation
  345. /server/followers:
  346. get:
  347. tags:
  348. - Server Following
  349. summary: Get followers of the server
  350. parameters:
  351. - $ref: '#/components/parameters/start'
  352. - $ref: '#/components/parameters/count'
  353. - $ref: '#/components/parameters/sort'
  354. responses:
  355. '200':
  356. description: successful operation
  357. content:
  358. application/json:
  359. schema:
  360. type: array
  361. items:
  362. $ref: '#/components/schemas/Follow'
  363. /server/following:
  364. get:
  365. tags:
  366. - Server Following
  367. summary: Get servers followed by the server
  368. parameters:
  369. - $ref: '#/components/parameters/start'
  370. - $ref: '#/components/parameters/count'
  371. - $ref: '#/components/parameters/sort'
  372. responses:
  373. '200':
  374. description: successful operation
  375. content:
  376. application/json:
  377. schema:
  378. type: array
  379. items:
  380. $ref: '#/components/schemas/Follow'
  381. post:
  382. security:
  383. - OAuth2:
  384. - admin
  385. tags:
  386. - Server Following
  387. summary: Follow a server
  388. responses:
  389. '204':
  390. $ref: '#/paths/~1users~1me/put/responses/204'
  391. requestBody:
  392. content:
  393. application/json:
  394. schema:
  395. $ref: '#/components/schemas/Follow'
  396. /users:
  397. post:
  398. summary: Creates user
  399. security:
  400. - OAuth2:
  401. - admin
  402. tags:
  403. - User
  404. responses:
  405. '200':
  406. description: successful operation
  407. content:
  408. application/json:
  409. schema:
  410. $ref: '#/components/schemas/AddUserResponse'
  411. requestBody:
  412. content:
  413. application/json:
  414. schema:
  415. $ref: '#/components/schemas/AddUser'
  416. description: User to create
  417. required: true
  418. get:
  419. summary: Get a list of users
  420. security:
  421. - OAuth2: []
  422. tags:
  423. - User
  424. parameters:
  425. - $ref: '#/components/parameters/start'
  426. - $ref: '#/components/parameters/count'
  427. - $ref: '#/components/parameters/usersSort'
  428. responses:
  429. '200':
  430. description: successful operation
  431. content:
  432. application/json:
  433. schema:
  434. type: array
  435. items:
  436. $ref: '#/components/schemas/User'
  437. '/users/{id}':
  438. delete:
  439. summary: Delete a user by its id
  440. security:
  441. - OAuth2:
  442. - admin
  443. tags:
  444. - User
  445. parameters:
  446. - $ref: '#/components/parameters/id'
  447. responses:
  448. '204':
  449. $ref: '#/paths/~1users~1me/put/responses/204'
  450. get:
  451. summary: Get user by its id
  452. security:
  453. - OAuth2: []
  454. tags:
  455. - User
  456. parameters:
  457. - $ref: '#/components/parameters/id'
  458. responses:
  459. '200':
  460. description: successful operation
  461. content:
  462. application/json:
  463. schema:
  464. $ref: '#/components/schemas/User'
  465. put:
  466. summary: Update user profile by its id
  467. security:
  468. - OAuth2: []
  469. tags:
  470. - User
  471. parameters:
  472. - $ref: '#/components/parameters/id'
  473. responses:
  474. '204':
  475. $ref: '#/paths/~1users~1me/put/responses/204'
  476. requestBody:
  477. content:
  478. application/json:
  479. schema:
  480. $ref: '#/components/schemas/UpdateUser'
  481. required: true
  482. /users/register:
  483. post:
  484. summary: Register a user
  485. tags:
  486. - User
  487. responses:
  488. '204':
  489. $ref: '#/paths/~1users~1me/put/responses/204'
  490. requestBody:
  491. content:
  492. application/json:
  493. schema:
  494. $ref: '#/components/schemas/RegisterUser'
  495. required: true
  496. /users/me:
  497. get:
  498. summary: Get current user information
  499. security:
  500. - OAuth2:
  501. - user
  502. tags:
  503. - My User
  504. responses:
  505. '200':
  506. description: successful operation
  507. content:
  508. application/json:
  509. schema:
  510. type: array
  511. items:
  512. $ref: '#/components/schemas/User'
  513. put:
  514. summary: Update current user information
  515. security:
  516. - OAuth2:
  517. - user
  518. tags:
  519. - My User
  520. responses:
  521. '204':
  522. description: Successful operation
  523. requestBody:
  524. content:
  525. application/json:
  526. schema:
  527. $ref: '#/components/schemas/UpdateMe'
  528. required: true
  529. /users/me/videos/imports:
  530. get:
  531. summary: Get video imports of current user
  532. security:
  533. - OAuth2:
  534. - user
  535. tags:
  536. - My User
  537. parameters:
  538. - $ref: '#/components/parameters/start'
  539. - $ref: '#/components/parameters/count'
  540. - $ref: '#/components/parameters/sort'
  541. responses:
  542. '200':
  543. description: successful operation
  544. content:
  545. application/json:
  546. schema:
  547. $ref: '#/components/schemas/VideoImport'
  548. /users/me/video-quota-used:
  549. get:
  550. summary: Get current user used quota
  551. security:
  552. - OAuth2:
  553. - user
  554. tags:
  555. - My User
  556. responses:
  557. '200':
  558. description: successful operation
  559. content:
  560. application/json:
  561. schema:
  562. type: number
  563. '/users/me/videos/{videoId}/rating':
  564. get:
  565. summary: 'Get rating of video by its id, among those of the current user'
  566. security:
  567. - OAuth2: []
  568. tags:
  569. - My User
  570. parameters:
  571. - name: videoId
  572. in: path
  573. required: true
  574. description: 'The video id '
  575. schema:
  576. type: string
  577. responses:
  578. '200':
  579. description: successful operation
  580. content:
  581. application/json:
  582. schema:
  583. $ref: '#/components/schemas/GetMeVideoRating'
  584. /users/me/videos:
  585. get:
  586. summary: Get videos of the current user
  587. security:
  588. - OAuth2:
  589. - user
  590. tags:
  591. - My User
  592. parameters:
  593. - $ref: '#/components/parameters/start'
  594. - $ref: '#/components/parameters/count'
  595. - $ref: '#/components/parameters/sort'
  596. responses:
  597. '200':
  598. description: successful operation
  599. content:
  600. application/json:
  601. schema:
  602. $ref: '#/components/schemas/VideoListResponse'
  603. /users/me/subscriptions:
  604. get:
  605. summary: Get subscriptions of the current user
  606. security:
  607. - OAuth2:
  608. - user
  609. tags:
  610. - My User
  611. parameters:
  612. - $ref: '#/components/parameters/start'
  613. - $ref: '#/components/parameters/count'
  614. - $ref: '#/components/parameters/sort'
  615. responses:
  616. '200':
  617. description: successful operation
  618. post:
  619. summary: Add subscription to the current user
  620. security:
  621. - OAuth2:
  622. - user
  623. tags:
  624. - My User
  625. responses:
  626. '200':
  627. description: successful operation
  628. /users/me/subscriptions/exist:
  629. get:
  630. summary: Get if subscriptions exist for the current user
  631. security:
  632. - OAuth2:
  633. - user
  634. tags:
  635. - My User
  636. parameters:
  637. - $ref: '#/components/parameters/subscriptionsUris'
  638. responses:
  639. '200':
  640. description: successful operation
  641. content:
  642. application/json:
  643. schema:
  644. type: object
  645. /users/me/subscriptions/videos:
  646. get:
  647. summary: Get videos of subscriptions of the current user
  648. security:
  649. - OAuth2:
  650. - user
  651. tags:
  652. - My User
  653. parameters:
  654. - $ref: '#/components/parameters/start'
  655. - $ref: '#/components/parameters/count'
  656. - $ref: '#/components/parameters/sort'
  657. responses:
  658. '200':
  659. description: successful operation
  660. content:
  661. application/json:
  662. schema:
  663. $ref: '#/components/schemas/VideoListResponse'
  664. '/users/me/subscriptions/{subscriptionHandle}':
  665. get:
  666. summary: Get subscription of the current user for a given uri
  667. security:
  668. - OAuth2:
  669. - user
  670. tags:
  671. - My User
  672. parameters:
  673. - $ref: '#/components/parameters/subscriptionHandle'
  674. responses:
  675. '200':
  676. description: successful operation
  677. content:
  678. application/json:
  679. schema:
  680. $ref: '#/components/schemas/VideoChannel'
  681. delete:
  682. summary: Delete subscription of the current user for a given uri
  683. security:
  684. - OAuth2:
  685. - user
  686. tags:
  687. - My User
  688. parameters:
  689. - $ref: '#/components/parameters/subscriptionHandle'
  690. responses:
  691. '200':
  692. description: successful operation
  693. /users/me/avatar/pick:
  694. post:
  695. summary: Update current user avatar
  696. security:
  697. - OAuth2: []
  698. tags:
  699. - My User
  700. responses:
  701. '200':
  702. description: successful operation
  703. content:
  704. application/json:
  705. schema:
  706. $ref: '#/components/schemas/Avatar'
  707. requestBody:
  708. content:
  709. multipart/form-data:
  710. schema:
  711. type: object
  712. properties:
  713. avatarfile:
  714. description: The file to upload.
  715. type: string
  716. format: binary
  717. encoding:
  718. profileImage:
  719. # only accept png/jpeg
  720. contentType: image/png, image/jpeg
  721. /videos:
  722. get:
  723. summary: Get list of videos
  724. tags:
  725. - Video
  726. parameters:
  727. - $ref: '#/components/parameters/categoryOneOf'
  728. - $ref: '#/components/parameters/tagsOneOf'
  729. - $ref: '#/components/parameters/tagsAllOf'
  730. - $ref: '#/components/parameters/licenceOneOf'
  731. - $ref: '#/components/parameters/languageOneOf'
  732. - $ref: '#/components/parameters/nsfw'
  733. - $ref: '#/components/parameters/filter'
  734. - $ref: '#/components/parameters/start'
  735. - $ref: '#/components/parameters/count'
  736. - $ref: '#/components/parameters/videosSort'
  737. responses:
  738. '200':
  739. description: successful operation
  740. content:
  741. application/json:
  742. schema:
  743. $ref: '#/components/schemas/VideoListResponse'
  744. /videos/categories:
  745. get:
  746. summary: Get list of video categories known by the server
  747. tags:
  748. - Video
  749. responses:
  750. '200':
  751. description: successful operation
  752. content:
  753. application/json:
  754. schema:
  755. type: array
  756. items:
  757. type: string
  758. /videos/licences:
  759. get:
  760. summary: Get list of video licences known by the server
  761. tags:
  762. - Video
  763. responses:
  764. '200':
  765. description: successful operation
  766. content:
  767. application/json:
  768. schema:
  769. type: array
  770. items:
  771. type: string
  772. /videos/languages:
  773. get:
  774. summary: Get list of languages known by the server
  775. tags:
  776. - Video
  777. responses:
  778. '200':
  779. description: successful operation
  780. content:
  781. application/json:
  782. schema:
  783. type: array
  784. items:
  785. type: string
  786. /videos/privacies:
  787. get:
  788. summary: Get list of privacy policies supported by the server
  789. tags:
  790. - Video
  791. responses:
  792. '200':
  793. description: successful operation
  794. content:
  795. application/json:
  796. schema:
  797. type: array
  798. items:
  799. type: string
  800. '/videos/{id}':
  801. put:
  802. summary: Update metadata for a video by its id
  803. security:
  804. - OAuth2: []
  805. tags:
  806. - Video
  807. parameters:
  808. - $ref: '#/components/parameters/idOrUUID'
  809. responses:
  810. '200':
  811. description: successful operation
  812. content:
  813. application/json:
  814. schema:
  815. $ref: '#/components/schemas/Video'
  816. requestBody:
  817. content:
  818. multipart/form-data:
  819. schema:
  820. type: object
  821. properties:
  822. thumbnailfile:
  823. description: Video thumbnail file
  824. type: string
  825. previewfile:
  826. description: Video preview file
  827. type: string
  828. category:
  829. description: Video category
  830. type: string
  831. licence:
  832. description: Video licence
  833. type: string
  834. language:
  835. description: Video language
  836. type: string
  837. description:
  838. description: Video description
  839. type: string
  840. waitTranscoding:
  841. description: Whether or not we wait transcoding before publish the video
  842. type: string
  843. support:
  844. description: Text describing how to support the video uploader
  845. type: string
  846. nsfw:
  847. description: Whether or not this video contains sensitive content
  848. type: string
  849. name:
  850. description: Video name
  851. type: string
  852. tags:
  853. description: Video tags (maximum 5 tags each between 2 and 30 characters)
  854. type: array
  855. items:
  856. type: string
  857. commentsEnabled:
  858. description: Enable or disable comments for this video
  859. type: string
  860. scheduleUpdate:
  861. $ref: '#/components/schemas/VideoScheduledUpdate'
  862. get:
  863. summary: Get a video by its id
  864. tags:
  865. - Video
  866. parameters:
  867. - $ref: '#/components/parameters/idOrUUID'
  868. responses:
  869. '200':
  870. description: successful operation
  871. content:
  872. application/json:
  873. schema:
  874. $ref: '#/components/schemas/VideoDetails'
  875. delete:
  876. summary: Delete a video by its id
  877. security:
  878. - OAuth2: []
  879. tags:
  880. - Video
  881. parameters:
  882. - $ref: '#/components/parameters/idOrUUID'
  883. responses:
  884. '204':
  885. $ref: '#/paths/~1users~1me/put/responses/204'
  886. '/videos/{id}/description':
  887. get:
  888. summary: Get a video description by its id
  889. tags:
  890. - Video
  891. parameters:
  892. - $ref: '#/components/parameters/idOrUUID'
  893. responses:
  894. '200':
  895. description: successful operation
  896. content:
  897. application/json:
  898. schema:
  899. type: string
  900. '/videos/{id}/views':
  901. post:
  902. summary: Add a view to the video by its id
  903. tags:
  904. - Video
  905. parameters:
  906. - $ref: '#/components/parameters/idOrUUID'
  907. responses:
  908. '204':
  909. $ref: '#/paths/~1users~1me/put/responses/204'
  910. '/videos/{id}/watching':
  911. put:
  912. summary: Set watching progress of a video by its id for a user
  913. tags:
  914. - Video
  915. security:
  916. - OAuth2: []
  917. parameters:
  918. - $ref: '#/components/parameters/idOrUUID'
  919. requestBody:
  920. content:
  921. application/json:
  922. schema:
  923. $ref: '#/components/schemas/UserWatchingVideo'
  924. required: true
  925. responses:
  926. '204':
  927. $ref: '#/paths/~1users~1me/put/responses/204'
  928. /videos/ownership:
  929. get:
  930. summary: Get list of video ownership changes requests
  931. tags:
  932. - Video
  933. security:
  934. - OAuth2: []
  935. responses:
  936. '200':
  937. description: successful operation
  938. '/videos/ownership/{id}/accept':
  939. post:
  940. summary: Refuse ownership change request for video by its id
  941. tags:
  942. - Video
  943. security:
  944. - OAuth2: []
  945. parameters:
  946. - $ref: '#/components/parameters/idOrUUID'
  947. responses:
  948. '204':
  949. $ref: '#/paths/~1users~1me/put/responses/204'
  950. '/videos/ownership/{id}/refuse':
  951. post:
  952. summary: Accept ownership change request for video by its id
  953. tags:
  954. - Video
  955. security:
  956. - OAuth2: []
  957. parameters:
  958. - $ref: '#/components/parameters/idOrUUID'
  959. responses:
  960. '204':
  961. $ref: '#/paths/~1users~1me/put/responses/204'
  962. '/videos/{id}/give-ownership':
  963. post:
  964. summary: Request change of ownership for a video you own, by its id
  965. tags:
  966. - Video
  967. security:
  968. - OAuth2: []
  969. parameters:
  970. - $ref: '#/components/parameters/idOrUUID'
  971. requestBody:
  972. required: true
  973. content:
  974. application/x-www-form-urlencoded:
  975. schema:
  976. type: object
  977. properties:
  978. username:
  979. type: string
  980. required:
  981. - username
  982. responses:
  983. '204':
  984. $ref: '#/paths/~1users~1me/put/responses/204'
  985. '400':
  986. description: 'Changing video ownership to a remote account is not supported yet'
  987. /videos/upload:
  988. post:
  989. summary: Upload a video file with its metadata
  990. security:
  991. - OAuth2: []
  992. tags:
  993. - Video
  994. responses:
  995. '200':
  996. description: successful operation
  997. content:
  998. application/json:
  999. schema:
  1000. $ref: '#/components/schemas/VideoUploadResponse'
  1001. requestBody:
  1002. content:
  1003. multipart/form-data:
  1004. schema:
  1005. type: object
  1006. properties:
  1007. videofile:
  1008. description: Video file
  1009. type: string
  1010. format: binary
  1011. channelId:
  1012. description: Channel id that will contain this video
  1013. type: number
  1014. thumbnailfile:
  1015. description: Video thumbnail file
  1016. type: string
  1017. previewfile:
  1018. description: Video preview file
  1019. type: string
  1020. privacy:
  1021. $ref: '#/components/schemas/VideoPrivacySet'
  1022. category:
  1023. description: Video category
  1024. type: string
  1025. licence:
  1026. description: Video licence
  1027. type: string
  1028. language:
  1029. description: Video language
  1030. type: string
  1031. description:
  1032. description: Video description
  1033. type: string
  1034. waitTranscoding:
  1035. description: Whether or not we wait transcoding before publish the video
  1036. type: string
  1037. support:
  1038. description: Text describing how to support the video uploader
  1039. type: string
  1040. nsfw:
  1041. description: Whether or not this video contains sensitive content
  1042. type: string
  1043. name:
  1044. description: Video name
  1045. type: string
  1046. tags:
  1047. description: Video tags
  1048. type: array
  1049. items:
  1050. type: string
  1051. commentsEnabled:
  1052. description: Enable or disable comments for this video
  1053. type: string
  1054. originallyPublishedAt:
  1055. description: Date when the content was originally published
  1056. type: string
  1057. format: date-time
  1058. scheduleUpdate:
  1059. $ref: '#/components/schemas/VideoScheduledUpdate'
  1060. required:
  1061. - videofile
  1062. - channelId
  1063. - name
  1064. x-code-samples:
  1065. - lang: Shell
  1066. source: |
  1067. ## DEPENDENCIES: httpie, jq
  1068. # pip install httpie
  1069. USERNAME="<your_username>"
  1070. PASSWORD="<your_password>"
  1071. FILE_PATH="<your_file_path>"
  1072. CHANNEL_ID="<your_channel_id>"
  1073. NAME="<video_name>"
  1074. API_PATH="https://peertube2.cpy.re/api/v1"
  1075. ## AUTH
  1076. client_id=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_id")
  1077. client_secret=$(http -b GET "$API_PATH/oauth-clients/local" | jq -r ".client_secret")
  1078. token=$(http -b --form POST "$API_PATH/users/token" \
  1079. client_id="$client_id" client_secret="$client_secret" grant_type=password response_type=code \
  1080. username=$USERNAME \
  1081. password=$PASSWORD \
  1082. | jq -r ".access_token")
  1083. ## VIDEO UPLOAD
  1084. http -b --form POST "$API_PATH/videos/upload" \
  1085. videofile@$FILE_PATH \
  1086. channelId=$CHANNEL_ID \
  1087. name=$NAME \
  1088. "Authorization:Bearer $token"
  1089. /videos/imports:
  1090. post:
  1091. summary: Import a torrent or magnetURI or HTTP resource (if enabled by the instance administrator)
  1092. security:
  1093. - OAuth2: []
  1094. tags:
  1095. - Video
  1096. responses:
  1097. '200':
  1098. description: successful operation
  1099. content:
  1100. application/json:
  1101. schema:
  1102. $ref: '#/components/schemas/VideoUploadResponse'
  1103. requestBody:
  1104. content:
  1105. multipart/form-data:
  1106. schema:
  1107. type: object
  1108. properties:
  1109. torrentfile:
  1110. description: Torrent File
  1111. type: string
  1112. format: binary
  1113. targetUrl:
  1114. description: HTTP target URL
  1115. type: string
  1116. magnetUri:
  1117. description: Magnet URI
  1118. type: string
  1119. channelId:
  1120. description: Channel id that will contain this video
  1121. type: number
  1122. thumbnailfile:
  1123. description: Video thumbnail file
  1124. type: string
  1125. previewfile:
  1126. description: Video preview file
  1127. type: string
  1128. privacy:
  1129. $ref: '#/components/schemas/VideoPrivacySet'
  1130. category:
  1131. description: Video category
  1132. type: string
  1133. licence:
  1134. description: Video licence
  1135. type: string
  1136. language:
  1137. description: Video language
  1138. type: string
  1139. description:
  1140. description: Video description
  1141. type: string
  1142. waitTranscoding:
  1143. description: Whether or not we wait transcoding before publish the video
  1144. type: string
  1145. support:
  1146. description: Text describing how to support the video uploader
  1147. type: string
  1148. nsfw:
  1149. description: Whether or not this video contains sensitive content
  1150. type: string
  1151. name:
  1152. description: Video name
  1153. type: string
  1154. tags:
  1155. description: Video tags
  1156. type: array
  1157. items:
  1158. type: string
  1159. commentsEnabled:
  1160. description: Enable or disable comments for this video
  1161. type: string
  1162. scheduleUpdate:
  1163. $ref: '#/components/schemas/VideoScheduledUpdate'
  1164. required:
  1165. - channelId
  1166. - name
  1167. /videos/abuse:
  1168. get:
  1169. summary: Get list of reported video abuses
  1170. security:
  1171. - OAuth2: []
  1172. tags:
  1173. - Video Abuse
  1174. parameters:
  1175. - $ref: '#/components/parameters/start'
  1176. - $ref: '#/components/parameters/count'
  1177. - $ref: '#/components/parameters/abusesSort'
  1178. responses:
  1179. '200':
  1180. description: successful operation
  1181. content:
  1182. application/json:
  1183. schema:
  1184. type: array
  1185. items:
  1186. $ref: '#/components/schemas/VideoAbuse'
  1187. '/videos/{id}/abuse':
  1188. post:
  1189. summary: 'Report an abuse, on a video by its id'
  1190. security:
  1191. - OAuth2: []
  1192. tags:
  1193. - Video Abuse
  1194. parameters:
  1195. - $ref: '#/components/parameters/idOrUUID'
  1196. responses:
  1197. '204':
  1198. $ref: '#/paths/~1users~1me/put/responses/204'
  1199. '/videos/{id}/blacklist':
  1200. post:
  1201. summary: Put on blacklist a video by its id
  1202. security:
  1203. - OAuth2:
  1204. - admin
  1205. - moderator
  1206. tags:
  1207. - Video Blacklist
  1208. parameters:
  1209. - $ref: '#/components/parameters/idOrUUID'
  1210. responses:
  1211. '204':
  1212. $ref: '#/paths/~1users~1me/put/responses/204'
  1213. delete:
  1214. summary: Delete an entry of the blacklist of a video by its id
  1215. security:
  1216. - OAuth2:
  1217. - admin
  1218. - moderator
  1219. tags:
  1220. - Video Blacklist
  1221. parameters:
  1222. - $ref: '#/components/parameters/idOrUUID'
  1223. responses:
  1224. '204':
  1225. $ref: '#/paths/~1users~1me/put/responses/204'
  1226. /videos/blacklist:
  1227. get:
  1228. summary: Get list of videos on blacklist
  1229. security:
  1230. - OAuth2:
  1231. - admin
  1232. - moderator
  1233. tags:
  1234. - Video Blacklist
  1235. parameters:
  1236. - $ref: '#/components/parameters/start'
  1237. - $ref: '#/components/parameters/count'
  1238. - $ref: '#/components/parameters/blacklistsSort'
  1239. responses:
  1240. '200':
  1241. description: successful operation
  1242. content:
  1243. application/json:
  1244. schema:
  1245. type: array
  1246. items:
  1247. $ref: '#/components/schemas/VideoBlacklist'
  1248. /videos/{id}/captions:
  1249. get:
  1250. summary: Get list of video's captions
  1251. tags:
  1252. - Video Caption
  1253. parameters:
  1254. - $ref: '#/components/parameters/idOrUUID'
  1255. responses:
  1256. '200':
  1257. description: successful operation
  1258. content:
  1259. application/json:
  1260. schema:
  1261. type: object
  1262. properties:
  1263. total:
  1264. type: integer
  1265. data:
  1266. type: array
  1267. items:
  1268. $ref: '#/components/schemas/VideoCaption'
  1269. /videos/{id}/captions/{captionLanguage}:
  1270. put:
  1271. summary: Add or replace a video caption
  1272. tags:
  1273. - Video Caption
  1274. parameters:
  1275. - $ref: '#/components/parameters/idOrUUID'
  1276. - $ref: '#/components/parameters/captionLanguage'
  1277. requestBody:
  1278. content:
  1279. multipart/form-data:
  1280. schema:
  1281. type: object
  1282. properties:
  1283. captionfile:
  1284. description: The file to upload.
  1285. type: string
  1286. format: binary
  1287. responses:
  1288. '204':
  1289. $ref: '#/paths/~1users~1me/put/responses/204'
  1290. delete:
  1291. summary: Delete a video caption
  1292. tags:
  1293. - Video Caption
  1294. parameters:
  1295. - $ref: '#/components/parameters/idOrUUID'
  1296. - $ref: '#/components/parameters/captionLanguage'
  1297. responses:
  1298. '204':
  1299. $ref: '#/paths/~1users~1me/put/responses/204'
  1300. /video-channels:
  1301. get:
  1302. summary: Get list of video channels
  1303. tags:
  1304. - Video Channel
  1305. parameters:
  1306. - $ref: '#/components/parameters/start'
  1307. - $ref: '#/components/parameters/count'
  1308. - $ref: '#/components/parameters/sort'
  1309. responses:
  1310. '200':
  1311. description: successful operation
  1312. content:
  1313. application/json:
  1314. schema:
  1315. type: array
  1316. items:
  1317. $ref: '#/components/schemas/VideoChannel'
  1318. post:
  1319. summary: Creates a video channel for the current user
  1320. security:
  1321. - OAuth2: []
  1322. tags:
  1323. - Video Channel
  1324. responses:
  1325. '204':
  1326. $ref: '#/paths/~1users~1me/put/responses/204'
  1327. requestBody:
  1328. content:
  1329. application/json:
  1330. schema:
  1331. $ref: '#/components/schemas/VideoChannelCreate'
  1332. '/video-channels/{channelHandle}':
  1333. get:
  1334. summary: Get a video channel by its id
  1335. tags:
  1336. - Video Channel
  1337. parameters:
  1338. - $ref: '#/components/parameters/channelHandle'
  1339. responses:
  1340. '200':
  1341. description: successful operation
  1342. content:
  1343. application/json:
  1344. schema:
  1345. $ref: '#/components/schemas/VideoChannel'
  1346. put:
  1347. summary: Update a video channel by its id
  1348. security:
  1349. - OAuth2: []
  1350. tags:
  1351. - Video Channel
  1352. parameters:
  1353. - $ref: '#/components/parameters/channelHandle'
  1354. responses:
  1355. '204':
  1356. $ref: '#/paths/~1users~1me/put/responses/204'
  1357. requestBody:
  1358. content:
  1359. application/json:
  1360. schema:
  1361. $ref: '#/components/schemas/VideoChannelUpdate'
  1362. delete:
  1363. summary: Delete a video channel by its id
  1364. security:
  1365. - OAuth2: []
  1366. tags:
  1367. - Video Channel
  1368. parameters:
  1369. - $ref: '#/components/parameters/channelHandle'
  1370. responses:
  1371. '204':
  1372. $ref: '#/paths/~1users~1me/put/responses/204'
  1373. '/video-channels/{channelHandle}/videos':
  1374. get:
  1375. summary: Get videos of a video channel by its id
  1376. tags:
  1377. - Video
  1378. - Video Channel
  1379. parameters:
  1380. - $ref: '#/components/parameters/channelHandle'
  1381. responses:
  1382. '200':
  1383. description: successful operation
  1384. content:
  1385. application/json:
  1386. schema:
  1387. $ref: '#/components/schemas/VideoListResponse'
  1388. '/accounts/{name}/video-channels':
  1389. get:
  1390. summary: Get video channels of an account by its name
  1391. tags:
  1392. - Video Channel
  1393. parameters:
  1394. - $ref: '#/components/parameters/name'
  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. '/accounts/{name}/ratings':
  1405. get:
  1406. summary: Get ratings of an account by its name
  1407. security:
  1408. - OAuth2: []
  1409. tags:
  1410. - User
  1411. parameters:
  1412. - $ref: '#/components/parameters/name'
  1413. - $ref: '#/components/parameters/start'
  1414. - $ref: '#/components/parameters/count'
  1415. - $ref: '#/components/parameters/sort'
  1416. - name: rating
  1417. in: query
  1418. required: false
  1419. description: Optionally filter which ratings to retrieve
  1420. schema:
  1421. type: string
  1422. enum:
  1423. - like
  1424. - dislike
  1425. responses:
  1426. '200':
  1427. description: successful operation
  1428. content:
  1429. application/json:
  1430. schema:
  1431. type: array
  1432. items:
  1433. $ref: '#/components/schemas/VideoRating'
  1434. '/videos/{id}/comment-threads':
  1435. get:
  1436. summary: Get the comment threads of a video by its id
  1437. tags:
  1438. - Video Comment
  1439. parameters:
  1440. - $ref: '#/components/parameters/idOrUUID'
  1441. - $ref: '#/components/parameters/start'
  1442. - $ref: '#/components/parameters/count'
  1443. - $ref: '#/components/parameters/sort'
  1444. responses:
  1445. '200':
  1446. description: successful operation
  1447. content:
  1448. application/json:
  1449. schema:
  1450. $ref: '#/components/schemas/CommentThreadResponse'
  1451. post:
  1452. summary: 'Creates a comment thread, on a video by its id'
  1453. security:
  1454. - OAuth2: []
  1455. tags:
  1456. - Video Comment
  1457. parameters:
  1458. - $ref: '#/components/parameters/idOrUUID'
  1459. responses:
  1460. '200':
  1461. description: successful operation
  1462. content:
  1463. application/json:
  1464. schema:
  1465. $ref: '#/components/schemas/CommentThreadPostResponse'
  1466. '/videos/{id}/comment-threads/{threadId}':
  1467. get:
  1468. summary: 'Get the comment thread by its id, of a video by its id'
  1469. tags:
  1470. - Video Comment
  1471. parameters:
  1472. - $ref: '#/components/parameters/idOrUUID'
  1473. - $ref: '#/components/parameters/threadId'
  1474. responses:
  1475. '200':
  1476. description: successful operation
  1477. content:
  1478. application/json:
  1479. schema:
  1480. $ref: '#/components/schemas/VideoCommentThreadTree'
  1481. '/videos/{id}/comments/{commentId}':
  1482. post:
  1483. summary: 'Creates a comment in a comment thread by its id, of a video by its id'
  1484. security:
  1485. - OAuth2: []
  1486. tags:
  1487. - Video Comment
  1488. parameters:
  1489. - $ref: '#/components/parameters/idOrUUID'
  1490. - $ref: '#/components/parameters/commentId'
  1491. responses:
  1492. '200':
  1493. description: successful operation
  1494. content:
  1495. application/json:
  1496. schema:
  1497. $ref: '#/components/schemas/CommentThreadPostResponse'
  1498. delete:
  1499. summary: 'Delete a comment in a comment thread by its id, of a video by its id'
  1500. security:
  1501. - OAuth2: []
  1502. tags:
  1503. - Video Comment
  1504. parameters:
  1505. - $ref: '#/components/parameters/idOrUUID'
  1506. - $ref: '#/components/parameters/commentId'
  1507. responses:
  1508. '204':
  1509. $ref: '#/paths/~1users~1me/put/responses/204'
  1510. '/videos/{id}/rate':
  1511. put:
  1512. summary: Vote for a video by its id
  1513. security:
  1514. - OAuth2: []
  1515. tags:
  1516. - Video Rate
  1517. parameters:
  1518. - $ref: '#/components/parameters/idOrUUID'
  1519. responses:
  1520. '204':
  1521. $ref: '#/paths/~1users~1me/put/responses/204'
  1522. /search/videos:
  1523. get:
  1524. tags:
  1525. - Search
  1526. summary: Get the videos corresponding to a given query
  1527. parameters:
  1528. - $ref: '#/components/parameters/start'
  1529. - $ref: '#/components/parameters/count'
  1530. - $ref: '#/components/parameters/videosSearchSort'
  1531. - name: search
  1532. in: query
  1533. required: true
  1534. description: String to search
  1535. schema:
  1536. type: string
  1537. responses:
  1538. '200':
  1539. description: successful operation
  1540. content:
  1541. application/json:
  1542. schema:
  1543. $ref: '#/components/schemas/VideoListResponse'
  1544. servers:
  1545. - url: 'https://peertube.cpy.re/api/v1'
  1546. description: Live Test Server (live data - stable version)
  1547. - url: 'https://peertube2.cpy.re/api/v1'
  1548. description: Live Test Server (live data - bleeding edge version)
  1549. - url: 'https://peertube3.cpy.re/api/v1'
  1550. description: Live Test Server (live data - bleeding edge version)
  1551. components:
  1552. parameters:
  1553. start:
  1554. name: start
  1555. in: query
  1556. required: false
  1557. description: Offset
  1558. schema:
  1559. type: number
  1560. count:
  1561. name: count
  1562. in: query
  1563. required: false
  1564. description: Number of items
  1565. schema:
  1566. type: number
  1567. sort:
  1568. name: sort
  1569. in: query
  1570. required: false
  1571. description: Sort column (-createdAt for example)
  1572. schema:
  1573. type: string
  1574. videosSort:
  1575. name: sort
  1576. in: query
  1577. required: false
  1578. description: Sort videos by criteria
  1579. schema:
  1580. type: string
  1581. enum:
  1582. - -name
  1583. - -duration
  1584. - -createdAt
  1585. - -publishedAt
  1586. - -views
  1587. - -likes
  1588. - -trending
  1589. videosSearchSort:
  1590. name: sort
  1591. in: query
  1592. required: false
  1593. description: Sort videos by criteria
  1594. schema:
  1595. type: string
  1596. enum:
  1597. - -name
  1598. - -duration
  1599. - -createdAt
  1600. - -publishedAt
  1601. - -views
  1602. - -likes
  1603. - -match
  1604. blacklistsSort:
  1605. name: sort
  1606. in: query
  1607. required: false
  1608. description: Sort blacklists by criteria
  1609. schema:
  1610. type: string
  1611. enum:
  1612. - -id
  1613. - -name
  1614. - -duration
  1615. - -views
  1616. - -likes
  1617. - -dislikes
  1618. - -uuid
  1619. - -createdAt
  1620. usersSort:
  1621. name: sort
  1622. in: query
  1623. required: false
  1624. description: Sort users by criteria
  1625. schema:
  1626. type: string
  1627. enum:
  1628. - -id
  1629. - -username
  1630. - -createdAt
  1631. abusesSort:
  1632. name: sort
  1633. in: query
  1634. required: false
  1635. description: Sort abuses by criteria
  1636. schema:
  1637. type: string
  1638. enum:
  1639. - -id
  1640. - -createdAt
  1641. - -state
  1642. name:
  1643. name: name
  1644. in: path
  1645. required: true
  1646. description: >-
  1647. The name of the account (chocobozzz or chocobozzz@peertube.cpy.re for
  1648. example)
  1649. schema:
  1650. type: string
  1651. id:
  1652. name: id
  1653. in: path
  1654. required: true
  1655. description: The user id
  1656. schema:
  1657. type: number
  1658. idOrUUID:
  1659. name: id
  1660. in: path
  1661. required: true
  1662. description: The video id or uuid
  1663. schema:
  1664. type: string
  1665. captionLanguage:
  1666. name: captionLanguage
  1667. in: path
  1668. required: true
  1669. description: The caption language
  1670. schema:
  1671. type: string
  1672. channelHandle:
  1673. name: channelHandle
  1674. in: path
  1675. required: true
  1676. description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
  1677. schema:
  1678. type: string
  1679. subscriptionHandle:
  1680. name: subscriptionHandle
  1681. in: path
  1682. required: true
  1683. description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
  1684. schema:
  1685. type: string
  1686. threadId:
  1687. name: threadId
  1688. in: path
  1689. required: true
  1690. description: The thread id (root comment id)
  1691. schema:
  1692. type: number
  1693. commentId:
  1694. name: commentId
  1695. in: path
  1696. required: true
  1697. description: The comment id
  1698. schema:
  1699. type: number
  1700. categoryOneOf:
  1701. name: categoryOneOf
  1702. in: query
  1703. required: false
  1704. description: category id of the video
  1705. schema:
  1706. oneOf:
  1707. - type: number
  1708. - type: array
  1709. items:
  1710. type: number
  1711. style: form
  1712. explode: false
  1713. tagsOneOf:
  1714. name: tagsOneOf
  1715. in: query
  1716. required: false
  1717. description: tag(s) of the video
  1718. schema:
  1719. oneOf:
  1720. - type: string
  1721. - type: array
  1722. items:
  1723. type: string
  1724. style: form
  1725. explode: false
  1726. tagsAllOf:
  1727. name: tagsAllOf
  1728. in: query
  1729. required: false
  1730. description: tag(s) of the video, where all should be present in the video
  1731. schema:
  1732. oneOf:
  1733. - type: string
  1734. - type: array
  1735. items:
  1736. type: string
  1737. style: form
  1738. explode: false
  1739. languageOneOf:
  1740. name: languageOneOf
  1741. in: query
  1742. required: false
  1743. description: language id of the video
  1744. schema:
  1745. oneOf:
  1746. - type: string
  1747. - type: array
  1748. items:
  1749. type: string
  1750. style: form
  1751. explode: false
  1752. licenceOneOf:
  1753. name: licenceOneOf
  1754. in: query
  1755. required: false
  1756. description: licence id of the video
  1757. schema:
  1758. oneOf:
  1759. - type: number
  1760. - type: array
  1761. items:
  1762. type: number
  1763. style: form
  1764. explode: false
  1765. nsfw:
  1766. name: nsfw
  1767. in: query
  1768. required: false
  1769. description: whether to include nsfw videos, if any
  1770. schema:
  1771. type: string
  1772. enum:
  1773. - 'true'
  1774. - 'false'
  1775. filter:
  1776. name: filter
  1777. in: query
  1778. required: false
  1779. description: >
  1780. Special filters (local for instance) which might require special rights:
  1781. * `local` - only videos local to the instance
  1782. * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges)
  1783. schema:
  1784. type: string
  1785. enum:
  1786. - local
  1787. - all-local
  1788. subscriptionsUris:
  1789. name: uris
  1790. in: query
  1791. required: true
  1792. description: list of uris to check if each is part of the user subscriptions
  1793. schema:
  1794. type: array
  1795. items:
  1796. type: string
  1797. securitySchemes:
  1798. OAuth2:
  1799. description: >
  1800. In the header: *Authorization: Bearer <token\>*
  1801. Authenticating via OAuth requires the following steps:
  1802. - Have an account with sufficient authorization levels
  1803. - [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
  1804. Bearer Token
  1805. - Make Authenticated Requests
  1806. type: oauth2
  1807. flows:
  1808. password:
  1809. tokenUrl: 'https://peertube.example.com/api/v1/users/token'
  1810. scopes:
  1811. admin: Admin scope
  1812. moderator: Moderator scope
  1813. user: User scope
  1814. schemas:
  1815. VideoConstantNumber:
  1816. properties:
  1817. id:
  1818. type: number
  1819. label:
  1820. type: string
  1821. VideoConstantString:
  1822. properties:
  1823. id:
  1824. type: string
  1825. label:
  1826. type: string
  1827. VideoPrivacySet:
  1828. type: integer
  1829. enum:
  1830. - 1
  1831. - 2
  1832. - 3
  1833. description: 'The video privacy (Public = 1, Unlisted = 2, Private = 3)'
  1834. VideoPrivacyConstant:
  1835. properties:
  1836. id:
  1837. type: integer
  1838. enum:
  1839. - 1
  1840. - 2
  1841. - 3
  1842. label:
  1843. type: string
  1844. VideoStateConstant:
  1845. properties:
  1846. id:
  1847. type: integer
  1848. enum:
  1849. - 1
  1850. - 2
  1851. - 3
  1852. description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
  1853. label:
  1854. type: string
  1855. VideoResolutionConstant:
  1856. properties:
  1857. id:
  1858. type: integer
  1859. description: 'Video resolution (240, 360, 720 ...)'
  1860. label:
  1861. type: string
  1862. VideoScheduledUpdate:
  1863. properties:
  1864. privacy:
  1865. $ref: '#/components/schemas/VideoPrivacySet'
  1866. description: Video privacy target
  1867. updateAt:
  1868. type: string
  1869. format: date
  1870. description: When to update the video
  1871. required:
  1872. - updateAt
  1873. VideoAccountSummary:
  1874. properties:
  1875. id:
  1876. type: number
  1877. name:
  1878. type: string
  1879. displayName:
  1880. type: string
  1881. url:
  1882. type: string
  1883. host:
  1884. type: string
  1885. avatar:
  1886. nullable: true
  1887. $ref: '#/components/schemas/Avatar'
  1888. VideoChannelSummary:
  1889. properties:
  1890. id:
  1891. type: number
  1892. name:
  1893. type: string
  1894. displayName:
  1895. type: string
  1896. url:
  1897. type: string
  1898. host:
  1899. type: string
  1900. avatar:
  1901. nullable: true
  1902. $ref: '#/components/schemas/Avatar'
  1903. PlaylistElement:
  1904. properties:
  1905. position:
  1906. type: number
  1907. startTimestamp:
  1908. type: number
  1909. stopTimestamp:
  1910. type: number
  1911. video:
  1912. nullable: true
  1913. $ref: '#/components/schemas/Video'
  1914. VideoFile:
  1915. properties:
  1916. magnetUri:
  1917. type: string
  1918. resolution:
  1919. $ref: '#/components/schemas/VideoResolutionConstant'
  1920. size:
  1921. type: number
  1922. description: 'Video file size in bytes'
  1923. torrentUrl:
  1924. type: string
  1925. torrentDownaloadUrl:
  1926. type: string
  1927. fileUrl:
  1928. type: string
  1929. fileDownloadUrl:
  1930. type: string
  1931. fps:
  1932. type: number
  1933. VideoStreamingPlaylists:
  1934. properties:
  1935. id:
  1936. type: number
  1937. type:
  1938. type: number
  1939. enum:
  1940. - 1
  1941. description: 'Playlist type (HLS = 1)'
  1942. playlistUrl:
  1943. type: string
  1944. segmentsSha256Url:
  1945. type: string
  1946. redundancies:
  1947. type: array
  1948. items:
  1949. type: object
  1950. properties:
  1951. baseUrl:
  1952. type: string
  1953. Video:
  1954. properties:
  1955. id:
  1956. type: number
  1957. uuid:
  1958. type: string
  1959. createdAt:
  1960. type: string
  1961. publishedAt:
  1962. type: string
  1963. updatedAt:
  1964. type: string
  1965. originallyPublishedAt:
  1966. type: string
  1967. category:
  1968. $ref: '#/components/schemas/VideoConstantNumber'
  1969. licence:
  1970. $ref: '#/components/schemas/VideoConstantNumber'
  1971. language:
  1972. $ref: '#/components/schemas/VideoConstantString'
  1973. privacy:
  1974. $ref: '#/components/schemas/VideoPrivacyConstant'
  1975. description:
  1976. type: string
  1977. duration:
  1978. type: number
  1979. isLocal:
  1980. type: boolean
  1981. name:
  1982. type: string
  1983. thumbnailPath:
  1984. type: string
  1985. previewPath:
  1986. type: string
  1987. embedPath:
  1988. type: string
  1989. views:
  1990. type: number
  1991. likes:
  1992. type: number
  1993. dislikes:
  1994. type: number
  1995. nsfw:
  1996. type: boolean
  1997. waitTranscoding:
  1998. type: boolean
  1999. nullable: true
  2000. state:
  2001. $ref: '#/components/schemas/VideoStateConstant'
  2002. scheduledUpdate:
  2003. nullable: true
  2004. $ref: '#/components/schemas/VideoScheduledUpdate'
  2005. blacklisted:
  2006. nullable: true
  2007. type: boolean
  2008. blacklistedReason:
  2009. nullable: true
  2010. type: string
  2011. account:
  2012. $ref: '#/components/schemas/VideoAccountSummary'
  2013. channel:
  2014. $ref: '#/components/schemas/VideoChannelSummary'
  2015. userHistory:
  2016. nullable: true
  2017. type: object
  2018. properties:
  2019. currentTime:
  2020. type: number
  2021. VideoDetails:
  2022. allOf:
  2023. - $ref: '#/components/schemas/Video'
  2024. - type: object
  2025. properties:
  2026. descriptionPath:
  2027. type: string
  2028. support:
  2029. type: string
  2030. channel:
  2031. $ref: '#/components/schemas/VideoChannel'
  2032. account:
  2033. $ref: '#/components/schemas/Account'
  2034. tags:
  2035. type: array
  2036. items:
  2037. type: string
  2038. files:
  2039. type: array
  2040. items:
  2041. $ref: '#/components/schemas/VideoFile'
  2042. commentsEnabled:
  2043. type: boolean
  2044. downloadEnabled:
  2045. type: boolean
  2046. trackerUrls:
  2047. type: array
  2048. items:
  2049. type: string
  2050. streamingPlaylists:
  2051. type: array
  2052. items:
  2053. $ref: '#/components/schemas/VideoStreamingPlaylists'
  2054. VideoImportStateConstant:
  2055. properties:
  2056. id:
  2057. type: integer
  2058. enum:
  2059. - 1
  2060. - 2
  2061. - 3
  2062. description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
  2063. label:
  2064. type: string
  2065. VideoImport:
  2066. properties:
  2067. id:
  2068. type: number
  2069. targetUrl:
  2070. type: string
  2071. magnetUri:
  2072. type: string
  2073. torrentName:
  2074. type: string
  2075. state:
  2076. type: object
  2077. properties:
  2078. id:
  2079. $ref: '#/components/schemas/VideoImportStateConstant'
  2080. label:
  2081. type: string
  2082. error:
  2083. type: string
  2084. createdAt:
  2085. type: string
  2086. updatedAt:
  2087. type: string
  2088. video:
  2089. $ref: '#/components/schemas/Video'
  2090. VideoAbuse:
  2091. properties:
  2092. id:
  2093. type: number
  2094. reason:
  2095. type: string
  2096. reporterAccount:
  2097. $ref: '#/components/schemas/Account'
  2098. video:
  2099. type: object
  2100. properties:
  2101. id:
  2102. type: number
  2103. name:
  2104. type: string
  2105. uuid:
  2106. type: string
  2107. url:
  2108. type: string
  2109. createdAt:
  2110. type: string
  2111. VideoBlacklist:
  2112. properties:
  2113. id:
  2114. type: number
  2115. videoId:
  2116. type: number
  2117. createdAt:
  2118. type: string
  2119. updatedAt:
  2120. type: string
  2121. name:
  2122. type: string
  2123. uuid:
  2124. type: string
  2125. description:
  2126. type: string
  2127. duration:
  2128. type: number
  2129. views:
  2130. type: number
  2131. likes:
  2132. type: number
  2133. dislikes:
  2134. type: number
  2135. nsfw:
  2136. type: boolean
  2137. VideoChannel:
  2138. properties:
  2139. displayName:
  2140. type: string
  2141. description:
  2142. type: string
  2143. isLocal:
  2144. type: boolean
  2145. ownerAccount:
  2146. type: object
  2147. properties:
  2148. id:
  2149. type: number
  2150. uuid:
  2151. type: string
  2152. VideoComment:
  2153. properties:
  2154. id:
  2155. type: number
  2156. url:
  2157. type: string
  2158. text:
  2159. type: string
  2160. threadId:
  2161. type: number
  2162. inReplyToCommentId:
  2163. type: number
  2164. videoId:
  2165. type: number
  2166. createdAt:
  2167. type: string
  2168. updatedAt:
  2169. type: string
  2170. totalReplies:
  2171. type: number
  2172. account:
  2173. $ref: '#/components/schemas/Account'
  2174. VideoCommentThreadTree:
  2175. properties:
  2176. comment:
  2177. $ref: '#/components/schemas/VideoComment'
  2178. children:
  2179. type: array
  2180. items:
  2181. $ref: '#/components/schemas/VideoCommentThreadTree'
  2182. VideoCaption:
  2183. properties:
  2184. language:
  2185. $ref: '#/components/schemas/VideoConstantString'
  2186. captionPath:
  2187. type: string
  2188. Avatar:
  2189. properties:
  2190. path:
  2191. type: string
  2192. createdAt:
  2193. type: string
  2194. updatedAt:
  2195. type: string
  2196. Actor:
  2197. properties:
  2198. id:
  2199. type: number
  2200. uuid:
  2201. type: string
  2202. url:
  2203. type: string
  2204. name:
  2205. type: string
  2206. host:
  2207. type: string
  2208. followingCount:
  2209. type: number
  2210. followersCount:
  2211. type: number
  2212. createdAt:
  2213. type: string
  2214. updatedAt:
  2215. type: string
  2216. avatar:
  2217. $ref: '#/components/schemas/Avatar'
  2218. Account:
  2219. allOf:
  2220. - $ref: '#/components/schemas/Actor'
  2221. - properties:
  2222. displayName:
  2223. type: string
  2224. User:
  2225. properties:
  2226. id:
  2227. type: number
  2228. username:
  2229. type: string
  2230. email:
  2231. type: string
  2232. displayNSFW:
  2233. type: boolean
  2234. autoPlayVideo:
  2235. type: boolean
  2236. role:
  2237. type: integer
  2238. enum:
  2239. - 0
  2240. - 1
  2241. - 2
  2242. description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
  2243. roleLabel:
  2244. type: string
  2245. enum:
  2246. - User
  2247. - Moderator
  2248. - Administrator
  2249. videoQuota:
  2250. type: number
  2251. videoQuotaDaily:
  2252. type: number
  2253. createdAt:
  2254. type: string
  2255. account:
  2256. $ref: '#/components/schemas/Account'
  2257. videoChannels:
  2258. type: array
  2259. items:
  2260. $ref: '#/components/schemas/VideoChannel'
  2261. UserWatchingVideo:
  2262. properties:
  2263. currentTime:
  2264. type: number
  2265. ServerConfig:
  2266. properties:
  2267. signup:
  2268. type: object
  2269. properties:
  2270. allowed:
  2271. type: boolean
  2272. transcoding:
  2273. type: object
  2274. properties:
  2275. enabledResolutions:
  2276. type: array
  2277. items:
  2278. type: number
  2279. avatar:
  2280. type: object
  2281. properties:
  2282. file:
  2283. type: object
  2284. properties:
  2285. size:
  2286. type: object
  2287. properties:
  2288. max:
  2289. type: number
  2290. extensions:
  2291. type: array
  2292. items:
  2293. type: string
  2294. video:
  2295. type: object
  2296. properties:
  2297. file:
  2298. type: object
  2299. properties:
  2300. extensions:
  2301. type: array
  2302. items:
  2303. type: string
  2304. Follow:
  2305. properties:
  2306. id:
  2307. type: number
  2308. follower:
  2309. $ref: '#/components/schemas/Actor'
  2310. following:
  2311. $ref: '#/components/schemas/Actor'
  2312. score:
  2313. type: number
  2314. state:
  2315. type: string
  2316. enum:
  2317. - pending
  2318. - accepted
  2319. createdAt:
  2320. type: string
  2321. updatedAt:
  2322. type: string
  2323. Job:
  2324. properties:
  2325. id:
  2326. type: number
  2327. state:
  2328. type: string
  2329. enum:
  2330. - pending
  2331. - processing
  2332. - error
  2333. - success
  2334. category:
  2335. type: string
  2336. enum:
  2337. - transcoding
  2338. - activitypub-http
  2339. handlerName:
  2340. type: string
  2341. handlerInputData:
  2342. type: string
  2343. createdAt:
  2344. type: string
  2345. updatedAt:
  2346. type: string
  2347. AddUserResponse:
  2348. properties:
  2349. id:
  2350. type: number
  2351. uuid:
  2352. type: string
  2353. VideoUploadResponse:
  2354. properties:
  2355. video:
  2356. type: object
  2357. properties:
  2358. id:
  2359. type: number
  2360. uuid:
  2361. type: string
  2362. CommentThreadResponse:
  2363. properties:
  2364. total:
  2365. type: number
  2366. data:
  2367. type: array
  2368. items:
  2369. $ref: '#/components/schemas/VideoComment'
  2370. CommentThreadPostResponse:
  2371. properties:
  2372. comment:
  2373. $ref: '#/components/schemas/VideoComment'
  2374. VideoListResponse:
  2375. properties:
  2376. total:
  2377. type: number
  2378. data:
  2379. type: array
  2380. items:
  2381. $ref: '#/components/schemas/Video'
  2382. AddUser:
  2383. properties:
  2384. username:
  2385. type: string
  2386. description: 'The user username '
  2387. password:
  2388. type: string
  2389. description: 'The user password '
  2390. email:
  2391. type: string
  2392. description: 'The user email '
  2393. videoQuota:
  2394. type: string
  2395. description: 'The user videoQuota '
  2396. videoQuotaDaily:
  2397. type: string
  2398. description: 'The user daily video quota '
  2399. role:
  2400. type: integer
  2401. enum:
  2402. - 0
  2403. - 1
  2404. - 2
  2405. description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
  2406. required:
  2407. - username
  2408. - password
  2409. - email
  2410. - videoQuota
  2411. - videoQuotaDaily
  2412. - role
  2413. UpdateUser:
  2414. properties:
  2415. id:
  2416. type: string
  2417. description: 'The user id '
  2418. email:
  2419. type: string
  2420. description: 'The updated email of the user '
  2421. videoQuota:
  2422. type: string
  2423. description: 'The updated videoQuota of the user '
  2424. videoQuotaDaily:
  2425. type: string
  2426. description: 'The updated daily video quota of the user '
  2427. role:
  2428. type: integer
  2429. enum:
  2430. - 0
  2431. - 1
  2432. - 2
  2433. description: 'The user role (Admin = 0, Moderator = 1, User = 2)'
  2434. required:
  2435. - id
  2436. - email
  2437. - videoQuota
  2438. - videoQuotaDaily
  2439. - role
  2440. UpdateMe:
  2441. properties:
  2442. password:
  2443. type: string
  2444. description: 'Your new password '
  2445. email:
  2446. type: string
  2447. description: 'Your new email '
  2448. displayNSFW:
  2449. type: string
  2450. description: 'Your new displayNSFW '
  2451. autoPlayVideo:
  2452. type: string
  2453. description: 'Your new autoPlayVideo '
  2454. required:
  2455. - password
  2456. - email
  2457. - displayNSFW
  2458. - autoPlayVideo
  2459. GetMeVideoRating:
  2460. properties:
  2461. id:
  2462. type: string
  2463. description: 'Id of the video '
  2464. rating:
  2465. type: number
  2466. description: 'Rating of the video '
  2467. required:
  2468. - id
  2469. - rating
  2470. VideoRating:
  2471. properties:
  2472. video:
  2473. $ref: '#/components/schemas/Video'
  2474. rating:
  2475. type: number
  2476. description: 'Rating of the video'
  2477. required:
  2478. - video
  2479. - rating
  2480. RegisterUser:
  2481. properties:
  2482. username:
  2483. type: string
  2484. description: 'The username of the user '
  2485. password:
  2486. type: string
  2487. description: 'The password of the user '
  2488. email:
  2489. type: string
  2490. description: 'The email of the user '
  2491. displayName:
  2492. type: string
  2493. description: 'The user display name'
  2494. channel:
  2495. type: object
  2496. properties:
  2497. name:
  2498. type: string
  2499. description: 'The default channel name'
  2500. displayName:
  2501. type: string
  2502. description: 'The default channel display name'
  2503. required:
  2504. - username
  2505. - password
  2506. - email
  2507. VideoChannelCreate:
  2508. properties:
  2509. name:
  2510. type: string
  2511. displayName:
  2512. type: string
  2513. description:
  2514. type: string
  2515. support:
  2516. type: string
  2517. required:
  2518. - name
  2519. - displayName
  2520. VideoChannelUpdate:
  2521. properties:
  2522. displayName:
  2523. type: string
  2524. description:
  2525. type: string
  2526. support:
  2527. type: string
  2528. bulkVideosSupportUpdate:
  2529. type: boolean
  2530. description: 'Update all videos support field of this channel'