openapi.json 82 KB

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