1
0

openapi.json 92 KB

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