1
0

openapi.json 92 KB

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