openapi.json 93 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files",
  5. "version": "0.0.1",
  6. "description": "File Management",
  7. "license": {
  8. "name": "agpl"
  9. }
  10. },
  11. "components": {
  12. "securitySchemes": {
  13. "basic_auth": {
  14. "type": "http",
  15. "scheme": "basic"
  16. },
  17. "bearer_auth": {
  18. "type": "http",
  19. "scheme": "bearer"
  20. }
  21. },
  22. "schemas": {
  23. "Capabilities": {
  24. "type": "object",
  25. "required": [
  26. "files"
  27. ],
  28. "properties": {
  29. "files": {
  30. "type": "object",
  31. "required": [
  32. "$comment",
  33. "bigfilechunking",
  34. "blacklisted_files",
  35. "forbidden_filenames",
  36. "forbidden_filename_basenames",
  37. "forbidden_filename_characters",
  38. "forbidden_filename_extensions",
  39. "chunked_upload",
  40. "directEditing"
  41. ],
  42. "properties": {
  43. "$comment": {
  44. "type": "string",
  45. "nullable": true
  46. },
  47. "bigfilechunking": {
  48. "type": "boolean"
  49. },
  50. "blacklisted_files": {
  51. "type": "array",
  52. "items": {
  53. "type": "object"
  54. }
  55. },
  56. "forbidden_filenames": {
  57. "type": "array",
  58. "items": {
  59. "type": "string"
  60. }
  61. },
  62. "forbidden_filename_basenames": {
  63. "type": "array",
  64. "items": {
  65. "type": "string"
  66. }
  67. },
  68. "forbidden_filename_characters": {
  69. "type": "array",
  70. "items": {
  71. "type": "string"
  72. }
  73. },
  74. "forbidden_filename_extensions": {
  75. "type": "array",
  76. "items": {
  77. "type": "string"
  78. }
  79. },
  80. "chunked_upload": {
  81. "type": "object",
  82. "required": [
  83. "max_size",
  84. "max_parallel_count"
  85. ],
  86. "properties": {
  87. "max_size": {
  88. "type": "integer",
  89. "format": "int64"
  90. },
  91. "max_parallel_count": {
  92. "type": "integer",
  93. "format": "int64"
  94. }
  95. }
  96. },
  97. "directEditing": {
  98. "type": "object",
  99. "required": [
  100. "url",
  101. "etag",
  102. "supportsFileId"
  103. ],
  104. "properties": {
  105. "url": {
  106. "type": "string"
  107. },
  108. "etag": {
  109. "type": "string"
  110. },
  111. "supportsFileId": {
  112. "type": "boolean"
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. },
  120. "FolderTree": {
  121. "type": "array",
  122. "items": {
  123. "type": "object",
  124. "required": [
  125. "id",
  126. "basename",
  127. "children"
  128. ],
  129. "properties": {
  130. "id": {
  131. "type": "integer",
  132. "format": "int64"
  133. },
  134. "basename": {
  135. "type": "string"
  136. },
  137. "displayName": {
  138. "type": "string"
  139. },
  140. "children": {
  141. "type": "array",
  142. "items": {
  143. "type": "object"
  144. }
  145. }
  146. }
  147. }
  148. },
  149. "OCSMeta": {
  150. "type": "object",
  151. "required": [
  152. "status",
  153. "statuscode"
  154. ],
  155. "properties": {
  156. "status": {
  157. "type": "string"
  158. },
  159. "statuscode": {
  160. "type": "integer"
  161. },
  162. "message": {
  163. "type": "string"
  164. },
  165. "totalitems": {
  166. "type": "string"
  167. },
  168. "itemsperpage": {
  169. "type": "string"
  170. }
  171. }
  172. },
  173. "TemplateField": {
  174. "type": "object",
  175. "required": [
  176. "index",
  177. "content",
  178. "type"
  179. ],
  180. "properties": {
  181. "index": {
  182. "type": "string"
  183. },
  184. "content": {
  185. "type": "string"
  186. },
  187. "type": {
  188. "type": "string"
  189. }
  190. }
  191. },
  192. "TemplateFile": {
  193. "type": "object",
  194. "required": [
  195. "basename",
  196. "etag",
  197. "fileid",
  198. "filename",
  199. "lastmod",
  200. "mime",
  201. "size",
  202. "type",
  203. "hasPreview"
  204. ],
  205. "properties": {
  206. "basename": {
  207. "type": "string"
  208. },
  209. "etag": {
  210. "type": "string"
  211. },
  212. "fileid": {
  213. "type": "integer",
  214. "format": "int64"
  215. },
  216. "filename": {
  217. "type": "string",
  218. "nullable": true
  219. },
  220. "lastmod": {
  221. "type": "integer",
  222. "format": "int64"
  223. },
  224. "mime": {
  225. "type": "string"
  226. },
  227. "size": {
  228. "type": "integer",
  229. "format": "int64"
  230. },
  231. "type": {
  232. "type": "string"
  233. },
  234. "hasPreview": {
  235. "type": "boolean"
  236. }
  237. }
  238. },
  239. "TemplateFileCreator": {
  240. "type": "object",
  241. "required": [
  242. "app",
  243. "label",
  244. "extension",
  245. "iconClass",
  246. "iconSvgInline",
  247. "mimetypes",
  248. "ratio",
  249. "actionLabel"
  250. ],
  251. "properties": {
  252. "app": {
  253. "type": "string"
  254. },
  255. "label": {
  256. "type": "string"
  257. },
  258. "extension": {
  259. "type": "string"
  260. },
  261. "iconClass": {
  262. "type": "string",
  263. "nullable": true
  264. },
  265. "iconSvgInline": {
  266. "type": "string",
  267. "nullable": true
  268. },
  269. "mimetypes": {
  270. "type": "array",
  271. "items": {
  272. "type": "string"
  273. }
  274. },
  275. "ratio": {
  276. "type": "number",
  277. "format": "double",
  278. "nullable": true
  279. },
  280. "actionLabel": {
  281. "type": "string"
  282. }
  283. }
  284. }
  285. }
  286. },
  287. "paths": {
  288. "/index.php/apps/files/api/v1/thumbnail/{x}/{y}/{file}": {
  289. "get": {
  290. "operationId": "api-get-thumbnail",
  291. "summary": "Gets a thumbnail of the specified file",
  292. "tags": [
  293. "api"
  294. ],
  295. "security": [
  296. {
  297. "bearer_auth": []
  298. },
  299. {
  300. "basic_auth": []
  301. }
  302. ],
  303. "parameters": [
  304. {
  305. "name": "x",
  306. "in": "path",
  307. "description": "Width of the thumbnail",
  308. "required": true,
  309. "schema": {
  310. "type": "integer",
  311. "format": "int64"
  312. }
  313. },
  314. {
  315. "name": "y",
  316. "in": "path",
  317. "description": "Height of the thumbnail",
  318. "required": true,
  319. "schema": {
  320. "type": "integer",
  321. "format": "int64"
  322. }
  323. },
  324. {
  325. "name": "file",
  326. "in": "path",
  327. "description": "URL-encoded filename",
  328. "required": true,
  329. "schema": {
  330. "type": "string",
  331. "pattern": "^.+$"
  332. }
  333. }
  334. ],
  335. "responses": {
  336. "200": {
  337. "description": "Thumbnail returned",
  338. "content": {
  339. "*/*": {
  340. "schema": {
  341. "type": "string",
  342. "format": "binary"
  343. }
  344. }
  345. }
  346. },
  347. "400": {
  348. "description": "Getting thumbnail is not possible",
  349. "content": {
  350. "application/json": {
  351. "schema": {
  352. "type": "object",
  353. "properties": {
  354. "message": {
  355. "type": "string"
  356. }
  357. }
  358. }
  359. }
  360. }
  361. },
  362. "404": {
  363. "description": "File not found",
  364. "content": {
  365. "application/json": {
  366. "schema": {
  367. "type": "object",
  368. "properties": {
  369. "message": {
  370. "type": "string"
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. }
  379. },
  380. "/ocs/v2.php/apps/files/api/v1/directEditing": {
  381. "get": {
  382. "operationId": "direct_editing-info",
  383. "summary": "Get the direct editing capabilities",
  384. "tags": [
  385. "direct_editing"
  386. ],
  387. "security": [
  388. {
  389. "bearer_auth": []
  390. },
  391. {
  392. "basic_auth": []
  393. }
  394. ],
  395. "parameters": [
  396. {
  397. "name": "OCS-APIRequest",
  398. "in": "header",
  399. "description": "Required to be true for the API request to pass",
  400. "required": true,
  401. "schema": {
  402. "type": "boolean",
  403. "default": true
  404. }
  405. }
  406. ],
  407. "responses": {
  408. "200": {
  409. "description": "Direct editing capabilities returned",
  410. "content": {
  411. "application/json": {
  412. "schema": {
  413. "type": "object",
  414. "required": [
  415. "ocs"
  416. ],
  417. "properties": {
  418. "ocs": {
  419. "type": "object",
  420. "required": [
  421. "meta",
  422. "data"
  423. ],
  424. "properties": {
  425. "meta": {
  426. "$ref": "#/components/schemas/OCSMeta"
  427. },
  428. "data": {
  429. "type": "object",
  430. "required": [
  431. "editors",
  432. "creators"
  433. ],
  434. "properties": {
  435. "editors": {
  436. "type": "object",
  437. "additionalProperties": {
  438. "type": "object",
  439. "required": [
  440. "id",
  441. "name",
  442. "mimetypes",
  443. "optionalMimetypes",
  444. "secure"
  445. ],
  446. "properties": {
  447. "id": {
  448. "type": "string"
  449. },
  450. "name": {
  451. "type": "string"
  452. },
  453. "mimetypes": {
  454. "type": "array",
  455. "items": {
  456. "type": "string"
  457. }
  458. },
  459. "optionalMimetypes": {
  460. "type": "array",
  461. "items": {
  462. "type": "string"
  463. }
  464. },
  465. "secure": {
  466. "type": "boolean"
  467. }
  468. }
  469. }
  470. },
  471. "creators": {
  472. "type": "object",
  473. "additionalProperties": {
  474. "type": "object",
  475. "required": [
  476. "id",
  477. "editor",
  478. "name",
  479. "extension",
  480. "templates",
  481. "mimetypes"
  482. ],
  483. "properties": {
  484. "id": {
  485. "type": "string"
  486. },
  487. "editor": {
  488. "type": "string"
  489. },
  490. "name": {
  491. "type": "string"
  492. },
  493. "extension": {
  494. "type": "string"
  495. },
  496. "templates": {
  497. "type": "boolean"
  498. },
  499. "mimetypes": {
  500. "type": "array",
  501. "items": {
  502. "type": "string"
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515. }
  516. }
  517. }
  518. }
  519. },
  520. "/ocs/v2.php/apps/files/api/v1/directEditing/templates/{editorId}/{creatorId}": {
  521. "get": {
  522. "operationId": "direct_editing-templates",
  523. "summary": "Get the templates for direct editing",
  524. "tags": [
  525. "direct_editing"
  526. ],
  527. "security": [
  528. {
  529. "bearer_auth": []
  530. },
  531. {
  532. "basic_auth": []
  533. }
  534. ],
  535. "parameters": [
  536. {
  537. "name": "editorId",
  538. "in": "path",
  539. "description": "ID of the editor",
  540. "required": true,
  541. "schema": {
  542. "type": "string"
  543. }
  544. },
  545. {
  546. "name": "creatorId",
  547. "in": "path",
  548. "description": "ID of the creator",
  549. "required": true,
  550. "schema": {
  551. "type": "string"
  552. }
  553. },
  554. {
  555. "name": "OCS-APIRequest",
  556. "in": "header",
  557. "description": "Required to be true for the API request to pass",
  558. "required": true,
  559. "schema": {
  560. "type": "boolean",
  561. "default": true
  562. }
  563. }
  564. ],
  565. "responses": {
  566. "200": {
  567. "description": "Templates returned",
  568. "content": {
  569. "application/json": {
  570. "schema": {
  571. "type": "object",
  572. "required": [
  573. "ocs"
  574. ],
  575. "properties": {
  576. "ocs": {
  577. "type": "object",
  578. "required": [
  579. "meta",
  580. "data"
  581. ],
  582. "properties": {
  583. "meta": {
  584. "$ref": "#/components/schemas/OCSMeta"
  585. },
  586. "data": {
  587. "type": "object",
  588. "required": [
  589. "templates"
  590. ],
  591. "properties": {
  592. "templates": {
  593. "type": "object",
  594. "additionalProperties": {
  595. "type": "object",
  596. "required": [
  597. "id",
  598. "title",
  599. "preview",
  600. "extension",
  601. "mimetype"
  602. ],
  603. "properties": {
  604. "id": {
  605. "type": "string"
  606. },
  607. "title": {
  608. "type": "string"
  609. },
  610. "preview": {
  611. "type": "string",
  612. "nullable": true
  613. },
  614. "extension": {
  615. "type": "string"
  616. },
  617. "mimetype": {
  618. "type": "string"
  619. }
  620. }
  621. }
  622. }
  623. }
  624. }
  625. }
  626. }
  627. }
  628. }
  629. }
  630. }
  631. },
  632. "500": {
  633. "description": "",
  634. "content": {
  635. "application/json": {
  636. "schema": {
  637. "type": "object",
  638. "required": [
  639. "ocs"
  640. ],
  641. "properties": {
  642. "ocs": {
  643. "type": "object",
  644. "required": [
  645. "meta",
  646. "data"
  647. ],
  648. "properties": {
  649. "meta": {
  650. "$ref": "#/components/schemas/OCSMeta"
  651. },
  652. "data": {
  653. "type": "object",
  654. "required": [
  655. "message"
  656. ],
  657. "properties": {
  658. "message": {
  659. "type": "string"
  660. }
  661. }
  662. }
  663. }
  664. }
  665. }
  666. }
  667. }
  668. }
  669. }
  670. }
  671. }
  672. },
  673. "/ocs/v2.php/apps/files/api/v1/directEditing/open": {
  674. "post": {
  675. "operationId": "direct_editing-open",
  676. "summary": "Open a file for direct editing",
  677. "tags": [
  678. "direct_editing"
  679. ],
  680. "security": [
  681. {
  682. "bearer_auth": []
  683. },
  684. {
  685. "basic_auth": []
  686. }
  687. ],
  688. "requestBody": {
  689. "required": true,
  690. "content": {
  691. "application/json": {
  692. "schema": {
  693. "type": "object",
  694. "required": [
  695. "path"
  696. ],
  697. "properties": {
  698. "path": {
  699. "type": "string",
  700. "description": "Path of the file"
  701. },
  702. "editorId": {
  703. "type": "string",
  704. "nullable": true,
  705. "description": "ID of the editor"
  706. },
  707. "fileId": {
  708. "type": "integer",
  709. "format": "int64",
  710. "nullable": true,
  711. "description": "ID of the file"
  712. }
  713. }
  714. }
  715. }
  716. }
  717. },
  718. "parameters": [
  719. {
  720. "name": "OCS-APIRequest",
  721. "in": "header",
  722. "description": "Required to be true for the API request to pass",
  723. "required": true,
  724. "schema": {
  725. "type": "boolean",
  726. "default": true
  727. }
  728. }
  729. ],
  730. "responses": {
  731. "200": {
  732. "description": "URL for direct editing returned",
  733. "content": {
  734. "application/json": {
  735. "schema": {
  736. "type": "object",
  737. "required": [
  738. "ocs"
  739. ],
  740. "properties": {
  741. "ocs": {
  742. "type": "object",
  743. "required": [
  744. "meta",
  745. "data"
  746. ],
  747. "properties": {
  748. "meta": {
  749. "$ref": "#/components/schemas/OCSMeta"
  750. },
  751. "data": {
  752. "type": "object",
  753. "required": [
  754. "url"
  755. ],
  756. "properties": {
  757. "url": {
  758. "type": "string"
  759. }
  760. }
  761. }
  762. }
  763. }
  764. }
  765. }
  766. }
  767. }
  768. },
  769. "403": {
  770. "description": "Opening file is not allowed",
  771. "content": {
  772. "application/json": {
  773. "schema": {
  774. "type": "object",
  775. "required": [
  776. "ocs"
  777. ],
  778. "properties": {
  779. "ocs": {
  780. "type": "object",
  781. "required": [
  782. "meta",
  783. "data"
  784. ],
  785. "properties": {
  786. "meta": {
  787. "$ref": "#/components/schemas/OCSMeta"
  788. },
  789. "data": {
  790. "type": "object",
  791. "required": [
  792. "message"
  793. ],
  794. "properties": {
  795. "message": {
  796. "type": "string"
  797. }
  798. }
  799. }
  800. }
  801. }
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "500": {
  808. "description": "",
  809. "content": {
  810. "application/json": {
  811. "schema": {
  812. "type": "object",
  813. "required": [
  814. "ocs"
  815. ],
  816. "properties": {
  817. "ocs": {
  818. "type": "object",
  819. "required": [
  820. "meta",
  821. "data"
  822. ],
  823. "properties": {
  824. "meta": {
  825. "$ref": "#/components/schemas/OCSMeta"
  826. },
  827. "data": {
  828. "type": "object",
  829. "required": [
  830. "message"
  831. ],
  832. "properties": {
  833. "message": {
  834. "type": "string"
  835. }
  836. }
  837. }
  838. }
  839. }
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. }
  847. },
  848. "/ocs/v2.php/apps/files/api/v1/directEditing/create": {
  849. "post": {
  850. "operationId": "direct_editing-create",
  851. "summary": "Create a file for direct editing",
  852. "tags": [
  853. "direct_editing"
  854. ],
  855. "security": [
  856. {
  857. "bearer_auth": []
  858. },
  859. {
  860. "basic_auth": []
  861. }
  862. ],
  863. "requestBody": {
  864. "required": true,
  865. "content": {
  866. "application/json": {
  867. "schema": {
  868. "type": "object",
  869. "required": [
  870. "path",
  871. "editorId",
  872. "creatorId"
  873. ],
  874. "properties": {
  875. "path": {
  876. "type": "string",
  877. "description": "Path of the file"
  878. },
  879. "editorId": {
  880. "type": "string",
  881. "description": "ID of the editor"
  882. },
  883. "creatorId": {
  884. "type": "string",
  885. "description": "ID of the creator"
  886. },
  887. "templateId": {
  888. "type": "string",
  889. "nullable": true,
  890. "description": "ID of the template"
  891. }
  892. }
  893. }
  894. }
  895. }
  896. },
  897. "parameters": [
  898. {
  899. "name": "OCS-APIRequest",
  900. "in": "header",
  901. "description": "Required to be true for the API request to pass",
  902. "required": true,
  903. "schema": {
  904. "type": "boolean",
  905. "default": true
  906. }
  907. }
  908. ],
  909. "responses": {
  910. "200": {
  911. "description": "URL for direct editing returned",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "type": "object",
  916. "required": [
  917. "ocs"
  918. ],
  919. "properties": {
  920. "ocs": {
  921. "type": "object",
  922. "required": [
  923. "meta",
  924. "data"
  925. ],
  926. "properties": {
  927. "meta": {
  928. "$ref": "#/components/schemas/OCSMeta"
  929. },
  930. "data": {
  931. "type": "object",
  932. "required": [
  933. "url"
  934. ],
  935. "properties": {
  936. "url": {
  937. "type": "string"
  938. }
  939. }
  940. }
  941. }
  942. }
  943. }
  944. }
  945. }
  946. }
  947. },
  948. "403": {
  949. "description": "Opening file is not allowed",
  950. "content": {
  951. "application/json": {
  952. "schema": {
  953. "type": "object",
  954. "required": [
  955. "ocs"
  956. ],
  957. "properties": {
  958. "ocs": {
  959. "type": "object",
  960. "required": [
  961. "meta",
  962. "data"
  963. ],
  964. "properties": {
  965. "meta": {
  966. "$ref": "#/components/schemas/OCSMeta"
  967. },
  968. "data": {
  969. "type": "object",
  970. "required": [
  971. "message"
  972. ],
  973. "properties": {
  974. "message": {
  975. "type": "string"
  976. }
  977. }
  978. }
  979. }
  980. }
  981. }
  982. }
  983. }
  984. }
  985. },
  986. "500": {
  987. "description": "",
  988. "content": {
  989. "application/json": {
  990. "schema": {
  991. "type": "object",
  992. "required": [
  993. "ocs"
  994. ],
  995. "properties": {
  996. "ocs": {
  997. "type": "object",
  998. "required": [
  999. "meta",
  1000. "data"
  1001. ],
  1002. "properties": {
  1003. "meta": {
  1004. "$ref": "#/components/schemas/OCSMeta"
  1005. },
  1006. "data": {
  1007. "type": "object",
  1008. "required": [
  1009. "message"
  1010. ],
  1011. "properties": {
  1012. "message": {
  1013. "type": "string"
  1014. }
  1015. }
  1016. }
  1017. }
  1018. }
  1019. }
  1020. }
  1021. }
  1022. }
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "/ocs/v2.php/apps/files/api/v1/templates": {
  1028. "get": {
  1029. "operationId": "template-list",
  1030. "summary": "List the available templates",
  1031. "tags": [
  1032. "template"
  1033. ],
  1034. "security": [
  1035. {
  1036. "bearer_auth": []
  1037. },
  1038. {
  1039. "basic_auth": []
  1040. }
  1041. ],
  1042. "parameters": [
  1043. {
  1044. "name": "OCS-APIRequest",
  1045. "in": "header",
  1046. "description": "Required to be true for the API request to pass",
  1047. "required": true,
  1048. "schema": {
  1049. "type": "boolean",
  1050. "default": true
  1051. }
  1052. }
  1053. ],
  1054. "responses": {
  1055. "200": {
  1056. "description": "Available templates returned",
  1057. "content": {
  1058. "application/json": {
  1059. "schema": {
  1060. "type": "object",
  1061. "required": [
  1062. "ocs"
  1063. ],
  1064. "properties": {
  1065. "ocs": {
  1066. "type": "object",
  1067. "required": [
  1068. "meta",
  1069. "data"
  1070. ],
  1071. "properties": {
  1072. "meta": {
  1073. "$ref": "#/components/schemas/OCSMeta"
  1074. },
  1075. "data": {
  1076. "type": "array",
  1077. "items": {
  1078. "$ref": "#/components/schemas/TemplateFileCreator"
  1079. }
  1080. }
  1081. }
  1082. }
  1083. }
  1084. }
  1085. }
  1086. }
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "/ocs/v2.php/apps/files/api/v1/templates/create": {
  1092. "post": {
  1093. "operationId": "template-create",
  1094. "summary": "Create a template",
  1095. "tags": [
  1096. "template"
  1097. ],
  1098. "security": [
  1099. {
  1100. "bearer_auth": []
  1101. },
  1102. {
  1103. "basic_auth": []
  1104. }
  1105. ],
  1106. "requestBody": {
  1107. "required": true,
  1108. "content": {
  1109. "application/json": {
  1110. "schema": {
  1111. "type": "object",
  1112. "required": [
  1113. "filePath"
  1114. ],
  1115. "properties": {
  1116. "filePath": {
  1117. "type": "string",
  1118. "description": "Path of the file"
  1119. },
  1120. "templatePath": {
  1121. "type": "string",
  1122. "default": "",
  1123. "description": "Name of the template"
  1124. },
  1125. "templateType": {
  1126. "type": "string",
  1127. "default": "user",
  1128. "description": "Type of the template"
  1129. },
  1130. "templateFields": {
  1131. "type": "array",
  1132. "default": [],
  1133. "description": "Fields of the template",
  1134. "items": {
  1135. "$ref": "#/components/schemas/TemplateField"
  1136. }
  1137. }
  1138. }
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "parameters": [
  1144. {
  1145. "name": "OCS-APIRequest",
  1146. "in": "header",
  1147. "description": "Required to be true for the API request to pass",
  1148. "required": true,
  1149. "schema": {
  1150. "type": "boolean",
  1151. "default": true
  1152. }
  1153. }
  1154. ],
  1155. "responses": {
  1156. "200": {
  1157. "description": "Template created successfully",
  1158. "content": {
  1159. "application/json": {
  1160. "schema": {
  1161. "type": "object",
  1162. "required": [
  1163. "ocs"
  1164. ],
  1165. "properties": {
  1166. "ocs": {
  1167. "type": "object",
  1168. "required": [
  1169. "meta",
  1170. "data"
  1171. ],
  1172. "properties": {
  1173. "meta": {
  1174. "$ref": "#/components/schemas/OCSMeta"
  1175. },
  1176. "data": {
  1177. "$ref": "#/components/schemas/TemplateFile"
  1178. }
  1179. }
  1180. }
  1181. }
  1182. }
  1183. }
  1184. }
  1185. },
  1186. "403": {
  1187. "description": "Creating template is not allowed",
  1188. "content": {
  1189. "application/json": {
  1190. "schema": {
  1191. "type": "object",
  1192. "required": [
  1193. "ocs"
  1194. ],
  1195. "properties": {
  1196. "ocs": {
  1197. "type": "object",
  1198. "required": [
  1199. "meta",
  1200. "data"
  1201. ],
  1202. "properties": {
  1203. "meta": {
  1204. "$ref": "#/components/schemas/OCSMeta"
  1205. },
  1206. "data": {}
  1207. }
  1208. }
  1209. }
  1210. }
  1211. }
  1212. }
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "/ocs/v2.php/apps/files/api/v1/templates/path": {
  1218. "post": {
  1219. "operationId": "template-path",
  1220. "summary": "Initialize the template directory",
  1221. "tags": [
  1222. "template"
  1223. ],
  1224. "security": [
  1225. {
  1226. "bearer_auth": []
  1227. },
  1228. {
  1229. "basic_auth": []
  1230. }
  1231. ],
  1232. "requestBody": {
  1233. "required": false,
  1234. "content": {
  1235. "application/json": {
  1236. "schema": {
  1237. "type": "object",
  1238. "properties": {
  1239. "templatePath": {
  1240. "type": "string",
  1241. "default": "",
  1242. "description": "Path of the template directory"
  1243. },
  1244. "copySystemTemplates": {
  1245. "type": "boolean",
  1246. "default": false,
  1247. "description": "Whether to copy the system templates to the template directory"
  1248. }
  1249. }
  1250. }
  1251. }
  1252. }
  1253. },
  1254. "parameters": [
  1255. {
  1256. "name": "OCS-APIRequest",
  1257. "in": "header",
  1258. "description": "Required to be true for the API request to pass",
  1259. "required": true,
  1260. "schema": {
  1261. "type": "boolean",
  1262. "default": true
  1263. }
  1264. }
  1265. ],
  1266. "responses": {
  1267. "200": {
  1268. "description": "Template directory initialized successfully",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "type": "object",
  1273. "required": [
  1274. "ocs"
  1275. ],
  1276. "properties": {
  1277. "ocs": {
  1278. "type": "object",
  1279. "required": [
  1280. "meta",
  1281. "data"
  1282. ],
  1283. "properties": {
  1284. "meta": {
  1285. "$ref": "#/components/schemas/OCSMeta"
  1286. },
  1287. "data": {
  1288. "type": "object",
  1289. "required": [
  1290. "template_path",
  1291. "templates"
  1292. ],
  1293. "properties": {
  1294. "template_path": {
  1295. "type": "string"
  1296. },
  1297. "templates": {
  1298. "type": "array",
  1299. "items": {
  1300. "$ref": "#/components/schemas/TemplateFileCreator"
  1301. }
  1302. }
  1303. }
  1304. }
  1305. }
  1306. }
  1307. }
  1308. }
  1309. }
  1310. }
  1311. },
  1312. "403": {
  1313. "description": "Initializing the template directory is not allowed",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "object",
  1318. "required": [
  1319. "ocs"
  1320. ],
  1321. "properties": {
  1322. "ocs": {
  1323. "type": "object",
  1324. "required": [
  1325. "meta",
  1326. "data"
  1327. ],
  1328. "properties": {
  1329. "meta": {
  1330. "$ref": "#/components/schemas/OCSMeta"
  1331. },
  1332. "data": {}
  1333. }
  1334. }
  1335. }
  1336. }
  1337. }
  1338. }
  1339. }
  1340. }
  1341. }
  1342. },
  1343. "/ocs/v2.php/apps/files/api/v1/transferownership": {
  1344. "post": {
  1345. "operationId": "transfer_ownership-transfer",
  1346. "summary": "Transfer the ownership to another user",
  1347. "tags": [
  1348. "transfer_ownership"
  1349. ],
  1350. "security": [
  1351. {
  1352. "bearer_auth": []
  1353. },
  1354. {
  1355. "basic_auth": []
  1356. }
  1357. ],
  1358. "requestBody": {
  1359. "required": true,
  1360. "content": {
  1361. "application/json": {
  1362. "schema": {
  1363. "type": "object",
  1364. "required": [
  1365. "recipient",
  1366. "path"
  1367. ],
  1368. "properties": {
  1369. "recipient": {
  1370. "type": "string",
  1371. "description": "Username of the recipient"
  1372. },
  1373. "path": {
  1374. "type": "string",
  1375. "description": "Path of the file"
  1376. }
  1377. }
  1378. }
  1379. }
  1380. }
  1381. },
  1382. "parameters": [
  1383. {
  1384. "name": "OCS-APIRequest",
  1385. "in": "header",
  1386. "description": "Required to be true for the API request to pass",
  1387. "required": true,
  1388. "schema": {
  1389. "type": "boolean",
  1390. "default": true
  1391. }
  1392. }
  1393. ],
  1394. "responses": {
  1395. "200": {
  1396. "description": "Ownership transferred successfully",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "type": "object",
  1401. "required": [
  1402. "ocs"
  1403. ],
  1404. "properties": {
  1405. "ocs": {
  1406. "type": "object",
  1407. "required": [
  1408. "meta",
  1409. "data"
  1410. ],
  1411. "properties": {
  1412. "meta": {
  1413. "$ref": "#/components/schemas/OCSMeta"
  1414. },
  1415. "data": {}
  1416. }
  1417. }
  1418. }
  1419. }
  1420. }
  1421. }
  1422. },
  1423. "400": {
  1424. "description": "Transferring ownership is not possible",
  1425. "content": {
  1426. "application/json": {
  1427. "schema": {
  1428. "type": "object",
  1429. "required": [
  1430. "ocs"
  1431. ],
  1432. "properties": {
  1433. "ocs": {
  1434. "type": "object",
  1435. "required": [
  1436. "meta",
  1437. "data"
  1438. ],
  1439. "properties": {
  1440. "meta": {
  1441. "$ref": "#/components/schemas/OCSMeta"
  1442. },
  1443. "data": {}
  1444. }
  1445. }
  1446. }
  1447. }
  1448. }
  1449. }
  1450. },
  1451. "403": {
  1452. "description": "Transferring ownership is not allowed",
  1453. "content": {
  1454. "application/json": {
  1455. "schema": {
  1456. "type": "object",
  1457. "required": [
  1458. "ocs"
  1459. ],
  1460. "properties": {
  1461. "ocs": {
  1462. "type": "object",
  1463. "required": [
  1464. "meta",
  1465. "data"
  1466. ],
  1467. "properties": {
  1468. "meta": {
  1469. "$ref": "#/components/schemas/OCSMeta"
  1470. },
  1471. "data": {}
  1472. }
  1473. }
  1474. }
  1475. }
  1476. }
  1477. }
  1478. }
  1479. }
  1480. }
  1481. },
  1482. "/ocs/v2.php/apps/files/api/v1/transferownership/{id}": {
  1483. "post": {
  1484. "operationId": "transfer_ownership-accept",
  1485. "summary": "Accept an ownership transfer",
  1486. "tags": [
  1487. "transfer_ownership"
  1488. ],
  1489. "security": [
  1490. {
  1491. "bearer_auth": []
  1492. },
  1493. {
  1494. "basic_auth": []
  1495. }
  1496. ],
  1497. "parameters": [
  1498. {
  1499. "name": "id",
  1500. "in": "path",
  1501. "description": "ID of the ownership transfer",
  1502. "required": true,
  1503. "schema": {
  1504. "type": "integer",
  1505. "format": "int64"
  1506. }
  1507. },
  1508. {
  1509. "name": "OCS-APIRequest",
  1510. "in": "header",
  1511. "description": "Required to be true for the API request to pass",
  1512. "required": true,
  1513. "schema": {
  1514. "type": "boolean",
  1515. "default": true
  1516. }
  1517. }
  1518. ],
  1519. "responses": {
  1520. "200": {
  1521. "description": "Ownership transfer accepted successfully",
  1522. "content": {
  1523. "application/json": {
  1524. "schema": {
  1525. "type": "object",
  1526. "required": [
  1527. "ocs"
  1528. ],
  1529. "properties": {
  1530. "ocs": {
  1531. "type": "object",
  1532. "required": [
  1533. "meta",
  1534. "data"
  1535. ],
  1536. "properties": {
  1537. "meta": {
  1538. "$ref": "#/components/schemas/OCSMeta"
  1539. },
  1540. "data": {}
  1541. }
  1542. }
  1543. }
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "403": {
  1549. "description": "Accepting ownership transfer is not allowed",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "type": "object",
  1554. "required": [
  1555. "ocs"
  1556. ],
  1557. "properties": {
  1558. "ocs": {
  1559. "type": "object",
  1560. "required": [
  1561. "meta",
  1562. "data"
  1563. ],
  1564. "properties": {
  1565. "meta": {
  1566. "$ref": "#/components/schemas/OCSMeta"
  1567. },
  1568. "data": {}
  1569. }
  1570. }
  1571. }
  1572. }
  1573. }
  1574. }
  1575. },
  1576. "404": {
  1577. "description": "Ownership transfer not found",
  1578. "content": {
  1579. "application/json": {
  1580. "schema": {
  1581. "type": "object",
  1582. "required": [
  1583. "ocs"
  1584. ],
  1585. "properties": {
  1586. "ocs": {
  1587. "type": "object",
  1588. "required": [
  1589. "meta",
  1590. "data"
  1591. ],
  1592. "properties": {
  1593. "meta": {
  1594. "$ref": "#/components/schemas/OCSMeta"
  1595. },
  1596. "data": {}
  1597. }
  1598. }
  1599. }
  1600. }
  1601. }
  1602. }
  1603. }
  1604. }
  1605. },
  1606. "delete": {
  1607. "operationId": "transfer_ownership-reject",
  1608. "summary": "Reject an ownership transfer",
  1609. "tags": [
  1610. "transfer_ownership"
  1611. ],
  1612. "security": [
  1613. {
  1614. "bearer_auth": []
  1615. },
  1616. {
  1617. "basic_auth": []
  1618. }
  1619. ],
  1620. "parameters": [
  1621. {
  1622. "name": "id",
  1623. "in": "path",
  1624. "description": "ID of the ownership transfer",
  1625. "required": true,
  1626. "schema": {
  1627. "type": "integer",
  1628. "format": "int64"
  1629. }
  1630. },
  1631. {
  1632. "name": "OCS-APIRequest",
  1633. "in": "header",
  1634. "description": "Required to be true for the API request to pass",
  1635. "required": true,
  1636. "schema": {
  1637. "type": "boolean",
  1638. "default": true
  1639. }
  1640. }
  1641. ],
  1642. "responses": {
  1643. "200": {
  1644. "description": "Ownership transfer rejected successfully",
  1645. "content": {
  1646. "application/json": {
  1647. "schema": {
  1648. "type": "object",
  1649. "required": [
  1650. "ocs"
  1651. ],
  1652. "properties": {
  1653. "ocs": {
  1654. "type": "object",
  1655. "required": [
  1656. "meta",
  1657. "data"
  1658. ],
  1659. "properties": {
  1660. "meta": {
  1661. "$ref": "#/components/schemas/OCSMeta"
  1662. },
  1663. "data": {}
  1664. }
  1665. }
  1666. }
  1667. }
  1668. }
  1669. }
  1670. },
  1671. "403": {
  1672. "description": "Rejecting ownership transfer is not allowed",
  1673. "content": {
  1674. "application/json": {
  1675. "schema": {
  1676. "type": "object",
  1677. "required": [
  1678. "ocs"
  1679. ],
  1680. "properties": {
  1681. "ocs": {
  1682. "type": "object",
  1683. "required": [
  1684. "meta",
  1685. "data"
  1686. ],
  1687. "properties": {
  1688. "meta": {
  1689. "$ref": "#/components/schemas/OCSMeta"
  1690. },
  1691. "data": {}
  1692. }
  1693. }
  1694. }
  1695. }
  1696. }
  1697. }
  1698. },
  1699. "404": {
  1700. "description": "Ownership transfer not found",
  1701. "content": {
  1702. "application/json": {
  1703. "schema": {
  1704. "type": "object",
  1705. "required": [
  1706. "ocs"
  1707. ],
  1708. "properties": {
  1709. "ocs": {
  1710. "type": "object",
  1711. "required": [
  1712. "meta",
  1713. "data"
  1714. ],
  1715. "properties": {
  1716. "meta": {
  1717. "$ref": "#/components/schemas/OCSMeta"
  1718. },
  1719. "data": {}
  1720. }
  1721. }
  1722. }
  1723. }
  1724. }
  1725. }
  1726. }
  1727. }
  1728. }
  1729. },
  1730. "/ocs/v2.php/apps/files/api/v1/openlocaleditor": {
  1731. "post": {
  1732. "operationId": "open_local_editor-create",
  1733. "summary": "Create a local editor",
  1734. "tags": [
  1735. "open_local_editor"
  1736. ],
  1737. "security": [
  1738. {
  1739. "bearer_auth": []
  1740. },
  1741. {
  1742. "basic_auth": []
  1743. }
  1744. ],
  1745. "requestBody": {
  1746. "required": true,
  1747. "content": {
  1748. "application/json": {
  1749. "schema": {
  1750. "type": "object",
  1751. "required": [
  1752. "path"
  1753. ],
  1754. "properties": {
  1755. "path": {
  1756. "type": "string",
  1757. "description": "Path of the file"
  1758. }
  1759. }
  1760. }
  1761. }
  1762. }
  1763. },
  1764. "parameters": [
  1765. {
  1766. "name": "OCS-APIRequest",
  1767. "in": "header",
  1768. "description": "Required to be true for the API request to pass",
  1769. "required": true,
  1770. "schema": {
  1771. "type": "boolean",
  1772. "default": true
  1773. }
  1774. }
  1775. ],
  1776. "responses": {
  1777. "200": {
  1778. "description": "Local editor returned",
  1779. "content": {
  1780. "application/json": {
  1781. "schema": {
  1782. "type": "object",
  1783. "required": [
  1784. "ocs"
  1785. ],
  1786. "properties": {
  1787. "ocs": {
  1788. "type": "object",
  1789. "required": [
  1790. "meta",
  1791. "data"
  1792. ],
  1793. "properties": {
  1794. "meta": {
  1795. "$ref": "#/components/schemas/OCSMeta"
  1796. },
  1797. "data": {
  1798. "type": "object",
  1799. "required": [
  1800. "userId",
  1801. "pathHash",
  1802. "expirationTime",
  1803. "token"
  1804. ],
  1805. "properties": {
  1806. "userId": {
  1807. "type": "string",
  1808. "nullable": true
  1809. },
  1810. "pathHash": {
  1811. "type": "string"
  1812. },
  1813. "expirationTime": {
  1814. "type": "integer",
  1815. "format": "int64"
  1816. },
  1817. "token": {
  1818. "type": "string"
  1819. }
  1820. }
  1821. }
  1822. }
  1823. }
  1824. }
  1825. }
  1826. }
  1827. }
  1828. },
  1829. "500": {
  1830. "description": "",
  1831. "content": {
  1832. "application/json": {
  1833. "schema": {
  1834. "type": "object",
  1835. "required": [
  1836. "ocs"
  1837. ],
  1838. "properties": {
  1839. "ocs": {
  1840. "type": "object",
  1841. "required": [
  1842. "meta",
  1843. "data"
  1844. ],
  1845. "properties": {
  1846. "meta": {
  1847. "$ref": "#/components/schemas/OCSMeta"
  1848. },
  1849. "data": {}
  1850. }
  1851. }
  1852. }
  1853. }
  1854. }
  1855. }
  1856. }
  1857. }
  1858. }
  1859. },
  1860. "/ocs/v2.php/apps/files/api/v1/openlocaleditor/{token}": {
  1861. "post": {
  1862. "operationId": "open_local_editor-validate",
  1863. "summary": "Validate a local editor",
  1864. "tags": [
  1865. "open_local_editor"
  1866. ],
  1867. "security": [
  1868. {
  1869. "bearer_auth": []
  1870. },
  1871. {
  1872. "basic_auth": []
  1873. }
  1874. ],
  1875. "requestBody": {
  1876. "required": true,
  1877. "content": {
  1878. "application/json": {
  1879. "schema": {
  1880. "type": "object",
  1881. "required": [
  1882. "path"
  1883. ],
  1884. "properties": {
  1885. "path": {
  1886. "type": "string",
  1887. "description": "Path of the file"
  1888. }
  1889. }
  1890. }
  1891. }
  1892. }
  1893. },
  1894. "parameters": [
  1895. {
  1896. "name": "token",
  1897. "in": "path",
  1898. "description": "Token of the local editor",
  1899. "required": true,
  1900. "schema": {
  1901. "type": "string"
  1902. }
  1903. },
  1904. {
  1905. "name": "OCS-APIRequest",
  1906. "in": "header",
  1907. "description": "Required to be true for the API request to pass",
  1908. "required": true,
  1909. "schema": {
  1910. "type": "boolean",
  1911. "default": true
  1912. }
  1913. }
  1914. ],
  1915. "responses": {
  1916. "200": {
  1917. "description": "Local editor validated successfully",
  1918. "content": {
  1919. "application/json": {
  1920. "schema": {
  1921. "type": "object",
  1922. "required": [
  1923. "ocs"
  1924. ],
  1925. "properties": {
  1926. "ocs": {
  1927. "type": "object",
  1928. "required": [
  1929. "meta",
  1930. "data"
  1931. ],
  1932. "properties": {
  1933. "meta": {
  1934. "$ref": "#/components/schemas/OCSMeta"
  1935. },
  1936. "data": {
  1937. "type": "object",
  1938. "required": [
  1939. "userId",
  1940. "pathHash",
  1941. "expirationTime",
  1942. "token"
  1943. ],
  1944. "properties": {
  1945. "userId": {
  1946. "type": "string"
  1947. },
  1948. "pathHash": {
  1949. "type": "string"
  1950. },
  1951. "expirationTime": {
  1952. "type": "integer",
  1953. "format": "int64"
  1954. },
  1955. "token": {
  1956. "type": "string"
  1957. }
  1958. }
  1959. }
  1960. }
  1961. }
  1962. }
  1963. }
  1964. }
  1965. }
  1966. },
  1967. "404": {
  1968. "description": "Local editor not found",
  1969. "content": {
  1970. "application/json": {
  1971. "schema": {
  1972. "type": "object",
  1973. "required": [
  1974. "ocs"
  1975. ],
  1976. "properties": {
  1977. "ocs": {
  1978. "type": "object",
  1979. "required": [
  1980. "meta",
  1981. "data"
  1982. ],
  1983. "properties": {
  1984. "meta": {
  1985. "$ref": "#/components/schemas/OCSMeta"
  1986. },
  1987. "data": {}
  1988. }
  1989. }
  1990. }
  1991. }
  1992. }
  1993. }
  1994. }
  1995. }
  1996. }
  1997. },
  1998. "/ocs/v2.php/apps/files/api/v1/folder-tree": {
  1999. "get": {
  2000. "operationId": "api-get-folder-tree",
  2001. "summary": "Returns the folder tree of the user",
  2002. "tags": [
  2003. "api"
  2004. ],
  2005. "security": [
  2006. {
  2007. "bearer_auth": []
  2008. },
  2009. {
  2010. "basic_auth": []
  2011. }
  2012. ],
  2013. "parameters": [
  2014. {
  2015. "name": "path",
  2016. "in": "query",
  2017. "description": "The path relative to the user folder",
  2018. "schema": {
  2019. "type": "string",
  2020. "default": "/"
  2021. }
  2022. },
  2023. {
  2024. "name": "depth",
  2025. "in": "query",
  2026. "description": "The depth of the tree",
  2027. "schema": {
  2028. "type": "integer",
  2029. "format": "int64",
  2030. "default": 1
  2031. }
  2032. },
  2033. {
  2034. "name": "OCS-APIRequest",
  2035. "in": "header",
  2036. "description": "Required to be true for the API request to pass",
  2037. "required": true,
  2038. "schema": {
  2039. "type": "boolean",
  2040. "default": true
  2041. }
  2042. }
  2043. ],
  2044. "responses": {
  2045. "200": {
  2046. "description": "Folder tree returned successfully",
  2047. "content": {
  2048. "application/json": {
  2049. "schema": {
  2050. "$ref": "#/components/schemas/FolderTree"
  2051. }
  2052. }
  2053. }
  2054. },
  2055. "401": {
  2056. "description": "Unauthorized",
  2057. "content": {
  2058. "application/json": {
  2059. "schema": {
  2060. "type": "object",
  2061. "required": [
  2062. "message"
  2063. ],
  2064. "properties": {
  2065. "message": {
  2066. "type": "string"
  2067. }
  2068. }
  2069. }
  2070. }
  2071. }
  2072. },
  2073. "400": {
  2074. "description": "Invalid folder path",
  2075. "content": {
  2076. "application/json": {
  2077. "schema": {
  2078. "type": "object",
  2079. "required": [
  2080. "message"
  2081. ],
  2082. "properties": {
  2083. "message": {
  2084. "type": "string"
  2085. }
  2086. }
  2087. }
  2088. }
  2089. }
  2090. },
  2091. "404": {
  2092. "description": "Folder not found",
  2093. "content": {
  2094. "application/json": {
  2095. "schema": {
  2096. "type": "object",
  2097. "required": [
  2098. "message"
  2099. ],
  2100. "properties": {
  2101. "message": {
  2102. "type": "string"
  2103. }
  2104. }
  2105. }
  2106. }
  2107. }
  2108. }
  2109. }
  2110. }
  2111. }
  2112. },
  2113. "tags": []
  2114. }