openapi.json 82 KB

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