openapi.json 97 KB

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