You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openapi.json 81KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867
  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. "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. "/ocs/v2.php/apps/files/api/v1/directEditing": {
  336. "get": {
  337. "operationId": "direct_editing-info",
  338. "summary": "Get the direct editing capabilities",
  339. "tags": [
  340. "direct_editing"
  341. ],
  342. "security": [
  343. {
  344. "bearer_auth": []
  345. },
  346. {
  347. "basic_auth": []
  348. }
  349. ],
  350. "parameters": [
  351. {
  352. "name": "OCS-APIRequest",
  353. "in": "header",
  354. "required": true,
  355. "schema": {
  356. "type": "string",
  357. "default": "true"
  358. }
  359. }
  360. ],
  361. "responses": {
  362. "200": {
  363. "description": "Direct editing capabilities returned",
  364. "content": {
  365. "application/json": {
  366. "schema": {
  367. "type": "object",
  368. "required": [
  369. "ocs"
  370. ],
  371. "properties": {
  372. "ocs": {
  373. "type": "object",
  374. "required": [
  375. "meta",
  376. "data"
  377. ],
  378. "properties": {
  379. "meta": {
  380. "$ref": "#/components/schemas/OCSMeta"
  381. },
  382. "data": {
  383. "type": "object",
  384. "required": [
  385. "editors",
  386. "creators"
  387. ],
  388. "properties": {
  389. "editors": {
  390. "type": "object",
  391. "additionalProperties": {
  392. "type": "object",
  393. "required": [
  394. "id",
  395. "name",
  396. "mimetypes",
  397. "optionalMimetypes",
  398. "secure"
  399. ],
  400. "properties": {
  401. "id": {
  402. "type": "string"
  403. },
  404. "name": {
  405. "type": "string"
  406. },
  407. "mimetypes": {
  408. "type": "array",
  409. "items": {
  410. "type": "string"
  411. }
  412. },
  413. "optionalMimetypes": {
  414. "type": "array",
  415. "items": {
  416. "type": "string"
  417. }
  418. },
  419. "secure": {
  420. "type": "boolean"
  421. }
  422. }
  423. }
  424. },
  425. "creators": {
  426. "type": "object",
  427. "additionalProperties": {
  428. "type": "object",
  429. "required": [
  430. "id",
  431. "editor",
  432. "name",
  433. "extension",
  434. "templates",
  435. "mimetypes"
  436. ],
  437. "properties": {
  438. "id": {
  439. "type": "string"
  440. },
  441. "editor": {
  442. "type": "string"
  443. },
  444. "name": {
  445. "type": "string"
  446. },
  447. "extension": {
  448. "type": "string"
  449. },
  450. "templates": {
  451. "type": "boolean"
  452. },
  453. "mimetypes": {
  454. "type": "array",
  455. "items": {
  456. "type": "string"
  457. }
  458. }
  459. }
  460. }
  461. }
  462. }
  463. }
  464. }
  465. }
  466. }
  467. }
  468. }
  469. }
  470. }
  471. }
  472. }
  473. },
  474. "/ocs/v2.php/apps/files/api/v1/directEditing/templates/{editorId}/{creatorId}": {
  475. "get": {
  476. "operationId": "direct_editing-templates",
  477. "summary": "Get the templates for direct editing",
  478. "tags": [
  479. "direct_editing"
  480. ],
  481. "security": [
  482. {
  483. "bearer_auth": []
  484. },
  485. {
  486. "basic_auth": []
  487. }
  488. ],
  489. "parameters": [
  490. {
  491. "name": "editorId",
  492. "in": "path",
  493. "description": "ID of the editor",
  494. "required": true,
  495. "schema": {
  496. "type": "string"
  497. }
  498. },
  499. {
  500. "name": "creatorId",
  501. "in": "path",
  502. "description": "ID of the creator",
  503. "required": true,
  504. "schema": {
  505. "type": "string"
  506. }
  507. },
  508. {
  509. "name": "OCS-APIRequest",
  510. "in": "header",
  511. "required": true,
  512. "schema": {
  513. "type": "string",
  514. "default": "true"
  515. }
  516. }
  517. ],
  518. "responses": {
  519. "200": {
  520. "description": "Templates returned",
  521. "content": {
  522. "application/json": {
  523. "schema": {
  524. "type": "object",
  525. "required": [
  526. "ocs"
  527. ],
  528. "properties": {
  529. "ocs": {
  530. "type": "object",
  531. "required": [
  532. "meta",
  533. "data"
  534. ],
  535. "properties": {
  536. "meta": {
  537. "$ref": "#/components/schemas/OCSMeta"
  538. },
  539. "data": {
  540. "type": "object",
  541. "required": [
  542. "templates"
  543. ],
  544. "properties": {
  545. "templates": {
  546. "type": "object",
  547. "additionalProperties": {
  548. "type": "object",
  549. "required": [
  550. "id",
  551. "title",
  552. "preview",
  553. "extension",
  554. "mimetype"
  555. ],
  556. "properties": {
  557. "id": {
  558. "type": "string"
  559. },
  560. "title": {
  561. "type": "string"
  562. },
  563. "preview": {
  564. "type": "string",
  565. "nullable": true
  566. },
  567. "extension": {
  568. "type": "string"
  569. },
  570. "mimetype": {
  571. "type": "string"
  572. }
  573. }
  574. }
  575. }
  576. }
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. }
  584. },
  585. "500": {
  586. "description": "",
  587. "content": {
  588. "application/json": {
  589. "schema": {
  590. "type": "object",
  591. "required": [
  592. "ocs"
  593. ],
  594. "properties": {
  595. "ocs": {
  596. "type": "object",
  597. "required": [
  598. "meta",
  599. "data"
  600. ],
  601. "properties": {
  602. "meta": {
  603. "$ref": "#/components/schemas/OCSMeta"
  604. },
  605. "data": {
  606. "type": "object",
  607. "required": [
  608. "message"
  609. ],
  610. "properties": {
  611. "message": {
  612. "type": "string"
  613. }
  614. }
  615. }
  616. }
  617. }
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. }
  625. },
  626. "/ocs/v2.php/apps/files/api/v1/directEditing/open": {
  627. "post": {
  628. "operationId": "direct_editing-open",
  629. "summary": "Open a file for direct editing",
  630. "tags": [
  631. "direct_editing"
  632. ],
  633. "security": [
  634. {
  635. "bearer_auth": []
  636. },
  637. {
  638. "basic_auth": []
  639. }
  640. ],
  641. "parameters": [
  642. {
  643. "name": "path",
  644. "in": "query",
  645. "description": "Path of the file",
  646. "required": true,
  647. "schema": {
  648. "type": "string"
  649. }
  650. },
  651. {
  652. "name": "editorId",
  653. "in": "query",
  654. "description": "ID of the editor",
  655. "schema": {
  656. "type": "string",
  657. "nullable": true
  658. }
  659. },
  660. {
  661. "name": "fileId",
  662. "in": "query",
  663. "description": "ID of the file",
  664. "schema": {
  665. "type": "integer",
  666. "format": "int64",
  667. "nullable": true
  668. }
  669. },
  670. {
  671. "name": "OCS-APIRequest",
  672. "in": "header",
  673. "required": true,
  674. "schema": {
  675. "type": "string",
  676. "default": "true"
  677. }
  678. }
  679. ],
  680. "responses": {
  681. "200": {
  682. "description": "URL for direct editing returned",
  683. "content": {
  684. "application/json": {
  685. "schema": {
  686. "type": "object",
  687. "required": [
  688. "ocs"
  689. ],
  690. "properties": {
  691. "ocs": {
  692. "type": "object",
  693. "required": [
  694. "meta",
  695. "data"
  696. ],
  697. "properties": {
  698. "meta": {
  699. "$ref": "#/components/schemas/OCSMeta"
  700. },
  701. "data": {
  702. "type": "object",
  703. "required": [
  704. "url"
  705. ],
  706. "properties": {
  707. "url": {
  708. "type": "string"
  709. }
  710. }
  711. }
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. },
  719. "403": {
  720. "description": "Opening file is not allowed",
  721. "content": {
  722. "application/json": {
  723. "schema": {
  724. "type": "object",
  725. "required": [
  726. "ocs"
  727. ],
  728. "properties": {
  729. "ocs": {
  730. "type": "object",
  731. "required": [
  732. "meta",
  733. "data"
  734. ],
  735. "properties": {
  736. "meta": {
  737. "$ref": "#/components/schemas/OCSMeta"
  738. },
  739. "data": {
  740. "type": "object",
  741. "required": [
  742. "message"
  743. ],
  744. "properties": {
  745. "message": {
  746. "type": "string"
  747. }
  748. }
  749. }
  750. }
  751. }
  752. }
  753. }
  754. }
  755. }
  756. },
  757. "500": {
  758. "description": "",
  759. "content": {
  760. "application/json": {
  761. "schema": {
  762. "type": "object",
  763. "required": [
  764. "ocs"
  765. ],
  766. "properties": {
  767. "ocs": {
  768. "type": "object",
  769. "required": [
  770. "meta",
  771. "data"
  772. ],
  773. "properties": {
  774. "meta": {
  775. "$ref": "#/components/schemas/OCSMeta"
  776. },
  777. "data": {
  778. "type": "object",
  779. "required": [
  780. "message"
  781. ],
  782. "properties": {
  783. "message": {
  784. "type": "string"
  785. }
  786. }
  787. }
  788. }
  789. }
  790. }
  791. }
  792. }
  793. }
  794. }
  795. }
  796. }
  797. },
  798. "/ocs/v2.php/apps/files/api/v1/directEditing/create": {
  799. "post": {
  800. "operationId": "direct_editing-create",
  801. "summary": "Create a file for direct editing",
  802. "tags": [
  803. "direct_editing"
  804. ],
  805. "security": [
  806. {
  807. "bearer_auth": []
  808. },
  809. {
  810. "basic_auth": []
  811. }
  812. ],
  813. "parameters": [
  814. {
  815. "name": "path",
  816. "in": "query",
  817. "description": "Path of the file",
  818. "required": true,
  819. "schema": {
  820. "type": "string"
  821. }
  822. },
  823. {
  824. "name": "editorId",
  825. "in": "query",
  826. "description": "ID of the editor",
  827. "required": true,
  828. "schema": {
  829. "type": "string"
  830. }
  831. },
  832. {
  833. "name": "creatorId",
  834. "in": "query",
  835. "description": "ID of the creator",
  836. "required": true,
  837. "schema": {
  838. "type": "string"
  839. }
  840. },
  841. {
  842. "name": "templateId",
  843. "in": "query",
  844. "description": "ID of the template",
  845. "schema": {
  846. "type": "string",
  847. "nullable": true
  848. }
  849. },
  850. {
  851. "name": "OCS-APIRequest",
  852. "in": "header",
  853. "required": true,
  854. "schema": {
  855. "type": "string",
  856. "default": "true"
  857. }
  858. }
  859. ],
  860. "responses": {
  861. "200": {
  862. "description": "URL for direct editing returned",
  863. "content": {
  864. "application/json": {
  865. "schema": {
  866. "type": "object",
  867. "required": [
  868. "ocs"
  869. ],
  870. "properties": {
  871. "ocs": {
  872. "type": "object",
  873. "required": [
  874. "meta",
  875. "data"
  876. ],
  877. "properties": {
  878. "meta": {
  879. "$ref": "#/components/schemas/OCSMeta"
  880. },
  881. "data": {
  882. "type": "object",
  883. "required": [
  884. "url"
  885. ],
  886. "properties": {
  887. "url": {
  888. "type": "string"
  889. }
  890. }
  891. }
  892. }
  893. }
  894. }
  895. }
  896. }
  897. }
  898. },
  899. "403": {
  900. "description": "Opening file is not allowed",
  901. "content": {
  902. "application/json": {
  903. "schema": {
  904. "type": "object",
  905. "required": [
  906. "ocs"
  907. ],
  908. "properties": {
  909. "ocs": {
  910. "type": "object",
  911. "required": [
  912. "meta",
  913. "data"
  914. ],
  915. "properties": {
  916. "meta": {
  917. "$ref": "#/components/schemas/OCSMeta"
  918. },
  919. "data": {
  920. "type": "object",
  921. "required": [
  922. "message"
  923. ],
  924. "properties": {
  925. "message": {
  926. "type": "string"
  927. }
  928. }
  929. }
  930. }
  931. }
  932. }
  933. }
  934. }
  935. }
  936. },
  937. "500": {
  938. "description": "",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "object",
  943. "required": [
  944. "ocs"
  945. ],
  946. "properties": {
  947. "ocs": {
  948. "type": "object",
  949. "required": [
  950. "meta",
  951. "data"
  952. ],
  953. "properties": {
  954. "meta": {
  955. "$ref": "#/components/schemas/OCSMeta"
  956. },
  957. "data": {
  958. "type": "object",
  959. "required": [
  960. "message"
  961. ],
  962. "properties": {
  963. "message": {
  964. "type": "string"
  965. }
  966. }
  967. }
  968. }
  969. }
  970. }
  971. }
  972. }
  973. }
  974. }
  975. }
  976. }
  977. },
  978. "/ocs/v2.php/apps/files/api/v1/templates": {
  979. "get": {
  980. "operationId": "template-list",
  981. "summary": "List the available templates",
  982. "tags": [
  983. "template"
  984. ],
  985. "security": [
  986. {
  987. "bearer_auth": []
  988. },
  989. {
  990. "basic_auth": []
  991. }
  992. ],
  993. "parameters": [
  994. {
  995. "name": "OCS-APIRequest",
  996. "in": "header",
  997. "required": true,
  998. "schema": {
  999. "type": "string",
  1000. "default": "true"
  1001. }
  1002. }
  1003. ],
  1004. "responses": {
  1005. "200": {
  1006. "description": "Available templates returned",
  1007. "content": {
  1008. "application/json": {
  1009. "schema": {
  1010. "type": "object",
  1011. "required": [
  1012. "ocs"
  1013. ],
  1014. "properties": {
  1015. "ocs": {
  1016. "type": "object",
  1017. "required": [
  1018. "meta",
  1019. "data"
  1020. ],
  1021. "properties": {
  1022. "meta": {
  1023. "$ref": "#/components/schemas/OCSMeta"
  1024. },
  1025. "data": {
  1026. "type": "array",
  1027. "items": {
  1028. "$ref": "#/components/schemas/TemplateFileCreator"
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. }
  1036. }
  1037. }
  1038. }
  1039. }
  1040. },
  1041. "/ocs/v2.php/apps/files/api/v1/templates/create": {
  1042. "post": {
  1043. "operationId": "template-create",
  1044. "summary": "Create a template",
  1045. "tags": [
  1046. "template"
  1047. ],
  1048. "security": [
  1049. {
  1050. "bearer_auth": []
  1051. },
  1052. {
  1053. "basic_auth": []
  1054. }
  1055. ],
  1056. "parameters": [
  1057. {
  1058. "name": "filePath",
  1059. "in": "query",
  1060. "description": "Path of the file",
  1061. "required": true,
  1062. "schema": {
  1063. "type": "string"
  1064. }
  1065. },
  1066. {
  1067. "name": "templatePath",
  1068. "in": "query",
  1069. "description": "Name of the template",
  1070. "schema": {
  1071. "type": "string",
  1072. "default": ""
  1073. }
  1074. },
  1075. {
  1076. "name": "templateType",
  1077. "in": "query",
  1078. "description": "Type of the template",
  1079. "schema": {
  1080. "type": "string",
  1081. "default": "user"
  1082. }
  1083. },
  1084. {
  1085. "name": "OCS-APIRequest",
  1086. "in": "header",
  1087. "required": true,
  1088. "schema": {
  1089. "type": "string",
  1090. "default": "true"
  1091. }
  1092. }
  1093. ],
  1094. "responses": {
  1095. "200": {
  1096. "description": "Template created successfully",
  1097. "content": {
  1098. "application/json": {
  1099. "schema": {
  1100. "type": "object",
  1101. "required": [
  1102. "ocs"
  1103. ],
  1104. "properties": {
  1105. "ocs": {
  1106. "type": "object",
  1107. "required": [
  1108. "meta",
  1109. "data"
  1110. ],
  1111. "properties": {
  1112. "meta": {
  1113. "$ref": "#/components/schemas/OCSMeta"
  1114. },
  1115. "data": {
  1116. "$ref": "#/components/schemas/TemplateFile"
  1117. }
  1118. }
  1119. }
  1120. }
  1121. }
  1122. }
  1123. }
  1124. },
  1125. "403": {
  1126. "description": "Creating template is not allowed",
  1127. "content": {
  1128. "text/plain": {
  1129. "schema": {
  1130. "type": "string"
  1131. }
  1132. }
  1133. }
  1134. }
  1135. }
  1136. }
  1137. },
  1138. "/ocs/v2.php/apps/files/api/v1/templates/path": {
  1139. "post": {
  1140. "operationId": "template-path",
  1141. "summary": "Initialize the template directory",
  1142. "tags": [
  1143. "template"
  1144. ],
  1145. "security": [
  1146. {
  1147. "bearer_auth": []
  1148. },
  1149. {
  1150. "basic_auth": []
  1151. }
  1152. ],
  1153. "parameters": [
  1154. {
  1155. "name": "templatePath",
  1156. "in": "query",
  1157. "description": "Path of the template directory",
  1158. "schema": {
  1159. "type": "string",
  1160. "default": ""
  1161. }
  1162. },
  1163. {
  1164. "name": "copySystemTemplates",
  1165. "in": "query",
  1166. "description": "Whether to copy the system templates to the template directory",
  1167. "schema": {
  1168. "type": "integer",
  1169. "default": 0
  1170. }
  1171. },
  1172. {
  1173. "name": "OCS-APIRequest",
  1174. "in": "header",
  1175. "required": true,
  1176. "schema": {
  1177. "type": "string",
  1178. "default": "true"
  1179. }
  1180. }
  1181. ],
  1182. "responses": {
  1183. "200": {
  1184. "description": "Template directory initialized successfully",
  1185. "content": {
  1186. "application/json": {
  1187. "schema": {
  1188. "type": "object",
  1189. "required": [
  1190. "ocs"
  1191. ],
  1192. "properties": {
  1193. "ocs": {
  1194. "type": "object",
  1195. "required": [
  1196. "meta",
  1197. "data"
  1198. ],
  1199. "properties": {
  1200. "meta": {
  1201. "$ref": "#/components/schemas/OCSMeta"
  1202. },
  1203. "data": {
  1204. "type": "object",
  1205. "required": [
  1206. "template_path",
  1207. "templates"
  1208. ],
  1209. "properties": {
  1210. "template_path": {
  1211. "type": "string"
  1212. },
  1213. "templates": {
  1214. "type": "array",
  1215. "items": {
  1216. "$ref": "#/components/schemas/TemplateFileCreator"
  1217. }
  1218. }
  1219. }
  1220. }
  1221. }
  1222. }
  1223. }
  1224. }
  1225. }
  1226. }
  1227. },
  1228. "403": {
  1229. "description": "Initializing the template directory is not allowed",
  1230. "content": {
  1231. "text/plain": {
  1232. "schema": {
  1233. "type": "string"
  1234. }
  1235. }
  1236. }
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "/ocs/v2.php/apps/files/api/v1/transferownership": {
  1242. "post": {
  1243. "operationId": "transfer_ownership-transfer",
  1244. "summary": "Transfer the ownership to another user",
  1245. "tags": [
  1246. "transfer_ownership"
  1247. ],
  1248. "security": [
  1249. {
  1250. "bearer_auth": []
  1251. },
  1252. {
  1253. "basic_auth": []
  1254. }
  1255. ],
  1256. "parameters": [
  1257. {
  1258. "name": "recipient",
  1259. "in": "query",
  1260. "description": "Username of the recipient",
  1261. "required": true,
  1262. "schema": {
  1263. "type": "string"
  1264. }
  1265. },
  1266. {
  1267. "name": "path",
  1268. "in": "query",
  1269. "description": "Path of the file",
  1270. "required": true,
  1271. "schema": {
  1272. "type": "string"
  1273. }
  1274. },
  1275. {
  1276. "name": "OCS-APIRequest",
  1277. "in": "header",
  1278. "required": true,
  1279. "schema": {
  1280. "type": "string",
  1281. "default": "true"
  1282. }
  1283. }
  1284. ],
  1285. "responses": {
  1286. "200": {
  1287. "description": "Ownership transferred successfully",
  1288. "content": {
  1289. "application/json": {
  1290. "schema": {
  1291. "type": "object",
  1292. "required": [
  1293. "ocs"
  1294. ],
  1295. "properties": {
  1296. "ocs": {
  1297. "type": "object",
  1298. "required": [
  1299. "meta",
  1300. "data"
  1301. ],
  1302. "properties": {
  1303. "meta": {
  1304. "$ref": "#/components/schemas/OCSMeta"
  1305. },
  1306. "data": {}
  1307. }
  1308. }
  1309. }
  1310. }
  1311. }
  1312. }
  1313. },
  1314. "400": {
  1315. "description": "Transferring ownership is not possible",
  1316. "content": {
  1317. "application/json": {
  1318. "schema": {
  1319. "type": "object",
  1320. "required": [
  1321. "ocs"
  1322. ],
  1323. "properties": {
  1324. "ocs": {
  1325. "type": "object",
  1326. "required": [
  1327. "meta",
  1328. "data"
  1329. ],
  1330. "properties": {
  1331. "meta": {
  1332. "$ref": "#/components/schemas/OCSMeta"
  1333. },
  1334. "data": {}
  1335. }
  1336. }
  1337. }
  1338. }
  1339. }
  1340. }
  1341. },
  1342. "403": {
  1343. "description": "Transferring ownership is not allowed",
  1344. "content": {
  1345. "application/json": {
  1346. "schema": {
  1347. "type": "object",
  1348. "required": [
  1349. "ocs"
  1350. ],
  1351. "properties": {
  1352. "ocs": {
  1353. "type": "object",
  1354. "required": [
  1355. "meta",
  1356. "data"
  1357. ],
  1358. "properties": {
  1359. "meta": {
  1360. "$ref": "#/components/schemas/OCSMeta"
  1361. },
  1362. "data": {}
  1363. }
  1364. }
  1365. }
  1366. }
  1367. }
  1368. }
  1369. }
  1370. }
  1371. }
  1372. },
  1373. "/ocs/v2.php/apps/files/api/v1/transferownership/{id}": {
  1374. "post": {
  1375. "operationId": "transfer_ownership-accept",
  1376. "summary": "Accept an ownership transfer",
  1377. "tags": [
  1378. "transfer_ownership"
  1379. ],
  1380. "security": [
  1381. {
  1382. "bearer_auth": []
  1383. },
  1384. {
  1385. "basic_auth": []
  1386. }
  1387. ],
  1388. "parameters": [
  1389. {
  1390. "name": "id",
  1391. "in": "path",
  1392. "description": "ID of the ownership transfer",
  1393. "required": true,
  1394. "schema": {
  1395. "type": "integer",
  1396. "format": "int64"
  1397. }
  1398. },
  1399. {
  1400. "name": "OCS-APIRequest",
  1401. "in": "header",
  1402. "required": true,
  1403. "schema": {
  1404. "type": "string",
  1405. "default": "true"
  1406. }
  1407. }
  1408. ],
  1409. "responses": {
  1410. "200": {
  1411. "description": "Ownership transfer accepted successfully",
  1412. "content": {
  1413. "application/json": {
  1414. "schema": {
  1415. "type": "object",
  1416. "required": [
  1417. "ocs"
  1418. ],
  1419. "properties": {
  1420. "ocs": {
  1421. "type": "object",
  1422. "required": [
  1423. "meta",
  1424. "data"
  1425. ],
  1426. "properties": {
  1427. "meta": {
  1428. "$ref": "#/components/schemas/OCSMeta"
  1429. },
  1430. "data": {}
  1431. }
  1432. }
  1433. }
  1434. }
  1435. }
  1436. }
  1437. },
  1438. "403": {
  1439. "description": "Accepting ownership transfer is not allowed",
  1440. "content": {
  1441. "application/json": {
  1442. "schema": {
  1443. "type": "object",
  1444. "required": [
  1445. "ocs"
  1446. ],
  1447. "properties": {
  1448. "ocs": {
  1449. "type": "object",
  1450. "required": [
  1451. "meta",
  1452. "data"
  1453. ],
  1454. "properties": {
  1455. "meta": {
  1456. "$ref": "#/components/schemas/OCSMeta"
  1457. },
  1458. "data": {}
  1459. }
  1460. }
  1461. }
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "404": {
  1467. "description": "Ownership transfer not found",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "type": "object",
  1472. "required": [
  1473. "ocs"
  1474. ],
  1475. "properties": {
  1476. "ocs": {
  1477. "type": "object",
  1478. "required": [
  1479. "meta",
  1480. "data"
  1481. ],
  1482. "properties": {
  1483. "meta": {
  1484. "$ref": "#/components/schemas/OCSMeta"
  1485. },
  1486. "data": {}
  1487. }
  1488. }
  1489. }
  1490. }
  1491. }
  1492. }
  1493. }
  1494. }
  1495. },
  1496. "delete": {
  1497. "operationId": "transfer_ownership-reject",
  1498. "summary": "Reject an ownership transfer",
  1499. "tags": [
  1500. "transfer_ownership"
  1501. ],
  1502. "security": [
  1503. {
  1504. "bearer_auth": []
  1505. },
  1506. {
  1507. "basic_auth": []
  1508. }
  1509. ],
  1510. "parameters": [
  1511. {
  1512. "name": "id",
  1513. "in": "path",
  1514. "description": "ID of the ownership transfer",
  1515. "required": true,
  1516. "schema": {
  1517. "type": "integer",
  1518. "format": "int64"
  1519. }
  1520. },
  1521. {
  1522. "name": "OCS-APIRequest",
  1523. "in": "header",
  1524. "required": true,
  1525. "schema": {
  1526. "type": "string",
  1527. "default": "true"
  1528. }
  1529. }
  1530. ],
  1531. "responses": {
  1532. "200": {
  1533. "description": "Ownership transfer rejected successfully",
  1534. "content": {
  1535. "application/json": {
  1536. "schema": {
  1537. "type": "object",
  1538. "required": [
  1539. "ocs"
  1540. ],
  1541. "properties": {
  1542. "ocs": {
  1543. "type": "object",
  1544. "required": [
  1545. "meta",
  1546. "data"
  1547. ],
  1548. "properties": {
  1549. "meta": {
  1550. "$ref": "#/components/schemas/OCSMeta"
  1551. },
  1552. "data": {}
  1553. }
  1554. }
  1555. }
  1556. }
  1557. }
  1558. }
  1559. },
  1560. "403": {
  1561. "description": "Rejecting ownership transfer is not allowed",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "object",
  1566. "required": [
  1567. "ocs"
  1568. ],
  1569. "properties": {
  1570. "ocs": {
  1571. "type": "object",
  1572. "required": [
  1573. "meta",
  1574. "data"
  1575. ],
  1576. "properties": {
  1577. "meta": {
  1578. "$ref": "#/components/schemas/OCSMeta"
  1579. },
  1580. "data": {}
  1581. }
  1582. }
  1583. }
  1584. }
  1585. }
  1586. }
  1587. },
  1588. "404": {
  1589. "description": "Ownership transfer not found",
  1590. "content": {
  1591. "application/json": {
  1592. "schema": {
  1593. "type": "object",
  1594. "required": [
  1595. "ocs"
  1596. ],
  1597. "properties": {
  1598. "ocs": {
  1599. "type": "object",
  1600. "required": [
  1601. "meta",
  1602. "data"
  1603. ],
  1604. "properties": {
  1605. "meta": {
  1606. "$ref": "#/components/schemas/OCSMeta"
  1607. },
  1608. "data": {}
  1609. }
  1610. }
  1611. }
  1612. }
  1613. }
  1614. }
  1615. }
  1616. }
  1617. }
  1618. },
  1619. "/ocs/v2.php/apps/files/api/v1/openlocaleditor": {
  1620. "post": {
  1621. "operationId": "open_local_editor-create",
  1622. "summary": "Create a local editor",
  1623. "tags": [
  1624. "open_local_editor"
  1625. ],
  1626. "security": [
  1627. {
  1628. "bearer_auth": []
  1629. },
  1630. {
  1631. "basic_auth": []
  1632. }
  1633. ],
  1634. "parameters": [
  1635. {
  1636. "name": "path",
  1637. "in": "query",
  1638. "description": "Path of the file",
  1639. "required": true,
  1640. "schema": {
  1641. "type": "string"
  1642. }
  1643. },
  1644. {
  1645. "name": "OCS-APIRequest",
  1646. "in": "header",
  1647. "required": true,
  1648. "schema": {
  1649. "type": "string",
  1650. "default": "true"
  1651. }
  1652. }
  1653. ],
  1654. "responses": {
  1655. "200": {
  1656. "description": "Local editor returned",
  1657. "content": {
  1658. "application/json": {
  1659. "schema": {
  1660. "type": "object",
  1661. "required": [
  1662. "ocs"
  1663. ],
  1664. "properties": {
  1665. "ocs": {
  1666. "type": "object",
  1667. "required": [
  1668. "meta",
  1669. "data"
  1670. ],
  1671. "properties": {
  1672. "meta": {
  1673. "$ref": "#/components/schemas/OCSMeta"
  1674. },
  1675. "data": {
  1676. "type": "object",
  1677. "required": [
  1678. "userId",
  1679. "pathHash",
  1680. "expirationTime",
  1681. "token"
  1682. ],
  1683. "properties": {
  1684. "userId": {
  1685. "type": "string",
  1686. "nullable": true
  1687. },
  1688. "pathHash": {
  1689. "type": "string"
  1690. },
  1691. "expirationTime": {
  1692. "type": "integer",
  1693. "format": "int64"
  1694. },
  1695. "token": {
  1696. "type": "string"
  1697. }
  1698. }
  1699. }
  1700. }
  1701. }
  1702. }
  1703. }
  1704. }
  1705. }
  1706. },
  1707. "500": {
  1708. "description": "",
  1709. "content": {
  1710. "application/json": {
  1711. "schema": {
  1712. "type": "object",
  1713. "required": [
  1714. "ocs"
  1715. ],
  1716. "properties": {
  1717. "ocs": {
  1718. "type": "object",
  1719. "required": [
  1720. "meta",
  1721. "data"
  1722. ],
  1723. "properties": {
  1724. "meta": {
  1725. "$ref": "#/components/schemas/OCSMeta"
  1726. },
  1727. "data": {}
  1728. }
  1729. }
  1730. }
  1731. }
  1732. }
  1733. }
  1734. }
  1735. }
  1736. }
  1737. },
  1738. "/ocs/v2.php/apps/files/api/v1/openlocaleditor/{token}": {
  1739. "post": {
  1740. "operationId": "open_local_editor-validate",
  1741. "summary": "Validate a local editor",
  1742. "tags": [
  1743. "open_local_editor"
  1744. ],
  1745. "security": [
  1746. {
  1747. "bearer_auth": []
  1748. },
  1749. {
  1750. "basic_auth": []
  1751. }
  1752. ],
  1753. "parameters": [
  1754. {
  1755. "name": "path",
  1756. "in": "query",
  1757. "description": "Path of the file",
  1758. "required": true,
  1759. "schema": {
  1760. "type": "string"
  1761. }
  1762. },
  1763. {
  1764. "name": "token",
  1765. "in": "path",
  1766. "description": "Token of the local editor",
  1767. "required": true,
  1768. "schema": {
  1769. "type": "string"
  1770. }
  1771. },
  1772. {
  1773. "name": "OCS-APIRequest",
  1774. "in": "header",
  1775. "required": true,
  1776. "schema": {
  1777. "type": "string",
  1778. "default": "true"
  1779. }
  1780. }
  1781. ],
  1782. "responses": {
  1783. "200": {
  1784. "description": "Local editor validated successfully",
  1785. "content": {
  1786. "application/json": {
  1787. "schema": {
  1788. "type": "object",
  1789. "required": [
  1790. "ocs"
  1791. ],
  1792. "properties": {
  1793. "ocs": {
  1794. "type": "object",
  1795. "required": [
  1796. "meta",
  1797. "data"
  1798. ],
  1799. "properties": {
  1800. "meta": {
  1801. "$ref": "#/components/schemas/OCSMeta"
  1802. },
  1803. "data": {
  1804. "type": "object",
  1805. "required": [
  1806. "userId",
  1807. "pathHash",
  1808. "expirationTime",
  1809. "token"
  1810. ],
  1811. "properties": {
  1812. "userId": {
  1813. "type": "string"
  1814. },
  1815. "pathHash": {
  1816. "type": "string"
  1817. },
  1818. "expirationTime": {
  1819. "type": "integer",
  1820. "format": "int64"
  1821. },
  1822. "token": {
  1823. "type": "string"
  1824. }
  1825. }
  1826. }
  1827. }
  1828. }
  1829. }
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "404": {
  1835. "description": "Local editor not found",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "type": "object",
  1840. "required": [
  1841. "ocs"
  1842. ],
  1843. "properties": {
  1844. "ocs": {
  1845. "type": "object",
  1846. "required": [
  1847. "meta",
  1848. "data"
  1849. ],
  1850. "properties": {
  1851. "meta": {
  1852. "$ref": "#/components/schemas/OCSMeta"
  1853. },
  1854. "data": {}
  1855. }
  1856. }
  1857. }
  1858. }
  1859. }
  1860. }
  1861. }
  1862. }
  1863. }
  1864. }
  1865. },
  1866. "tags": []
  1867. }