openapi-ex_app.json 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "core-ex_app",
  5. "version": "0.0.1",
  6. "description": "Core functionality of Nextcloud",
  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. "core"
  27. ],
  28. "properties": {
  29. "core": {
  30. "type": "object",
  31. "required": [
  32. "pollinterval",
  33. "webdav-root",
  34. "reference-api",
  35. "reference-regex",
  36. "mod-rewrite-working"
  37. ],
  38. "properties": {
  39. "pollinterval": {
  40. "type": "integer",
  41. "format": "int64"
  42. },
  43. "webdav-root": {
  44. "type": "string"
  45. },
  46. "reference-api": {
  47. "type": "boolean"
  48. },
  49. "reference-regex": {
  50. "type": "string"
  51. },
  52. "mod-rewrite-working": {
  53. "type": "boolean"
  54. }
  55. }
  56. }
  57. }
  58. },
  59. "OCSMeta": {
  60. "type": "object",
  61. "required": [
  62. "status",
  63. "statuscode"
  64. ],
  65. "properties": {
  66. "status": {
  67. "type": "string"
  68. },
  69. "statuscode": {
  70. "type": "integer"
  71. },
  72. "message": {
  73. "type": "string"
  74. },
  75. "totalitems": {
  76. "type": "string"
  77. },
  78. "itemsperpage": {
  79. "type": "string"
  80. }
  81. }
  82. },
  83. "PublicCapabilities": {
  84. "type": "object",
  85. "required": [
  86. "bruteforce"
  87. ],
  88. "properties": {
  89. "bruteforce": {
  90. "type": "object",
  91. "required": [
  92. "delay",
  93. "allow-listed"
  94. ],
  95. "properties": {
  96. "delay": {
  97. "type": "integer",
  98. "format": "int64"
  99. },
  100. "allow-listed": {
  101. "type": "boolean"
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "TaskProcessingIO": {
  108. "type": "object",
  109. "additionalProperties": {
  110. "anyOf": [
  111. {
  112. "type": "number"
  113. },
  114. {
  115. "type": "array",
  116. "items": {
  117. "type": "number"
  118. }
  119. },
  120. {
  121. "type": "string"
  122. },
  123. {
  124. "type": "array",
  125. "items": {
  126. "type": "string"
  127. }
  128. }
  129. ]
  130. }
  131. },
  132. "TaskProcessingTask": {
  133. "type": "object",
  134. "required": [
  135. "id",
  136. "lastUpdated",
  137. "type",
  138. "status",
  139. "userId",
  140. "appId",
  141. "input",
  142. "output",
  143. "customId",
  144. "completionExpectedAt",
  145. "progress"
  146. ],
  147. "properties": {
  148. "id": {
  149. "type": "integer",
  150. "format": "int64"
  151. },
  152. "lastUpdated": {
  153. "type": "integer",
  154. "format": "int64"
  155. },
  156. "type": {
  157. "type": "string"
  158. },
  159. "status": {
  160. "type": "string",
  161. "enum": [
  162. "STATUS_CANCELLED",
  163. "STATUS_FAILED",
  164. "STATUS_SUCCESSFUL",
  165. "STATUS_RUNNING",
  166. "STATUS_SCHEDULED",
  167. "STATUS_UNKNOWN"
  168. ]
  169. },
  170. "userId": {
  171. "type": "string",
  172. "nullable": true
  173. },
  174. "appId": {
  175. "type": "string"
  176. },
  177. "input": {
  178. "$ref": "#/components/schemas/TaskProcessingIO"
  179. },
  180. "output": {
  181. "$ref": "#/components/schemas/TaskProcessingIO",
  182. "nullable": true
  183. },
  184. "customId": {
  185. "type": "string",
  186. "nullable": true
  187. },
  188. "completionExpectedAt": {
  189. "type": "integer",
  190. "format": "int64",
  191. "nullable": true
  192. },
  193. "progress": {
  194. "type": "number",
  195. "format": "double",
  196. "nullable": true
  197. }
  198. }
  199. }
  200. }
  201. },
  202. "paths": {
  203. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/file/{fileId}": {
  204. "get": {
  205. "operationId": "task_processing_api-get-file-contents-ex-app",
  206. "summary": "Returns the contents of a file referenced in a task(ExApp route version)",
  207. "description": "This endpoint requires admin access",
  208. "tags": [
  209. "task_processing_api"
  210. ],
  211. "security": [
  212. {
  213. "bearer_auth": []
  214. },
  215. {
  216. "basic_auth": []
  217. }
  218. ],
  219. "parameters": [
  220. {
  221. "name": "taskId",
  222. "in": "path",
  223. "description": "The id of the task",
  224. "required": true,
  225. "schema": {
  226. "type": "integer",
  227. "format": "int64"
  228. }
  229. },
  230. {
  231. "name": "fileId",
  232. "in": "path",
  233. "description": "The file id of the file to retrieve",
  234. "required": true,
  235. "schema": {
  236. "type": "integer",
  237. "format": "int64"
  238. }
  239. },
  240. {
  241. "name": "OCS-APIRequest",
  242. "in": "header",
  243. "description": "Required to be true for the API request to pass",
  244. "required": true,
  245. "schema": {
  246. "type": "boolean",
  247. "default": true
  248. }
  249. }
  250. ],
  251. "responses": {
  252. "200": {
  253. "description": "File content returned",
  254. "content": {
  255. "*/*": {
  256. "schema": {
  257. "type": "string",
  258. "format": "binary"
  259. }
  260. }
  261. }
  262. },
  263. "500": {
  264. "description": "",
  265. "content": {
  266. "application/json": {
  267. "schema": {
  268. "type": "object",
  269. "required": [
  270. "ocs"
  271. ],
  272. "properties": {
  273. "ocs": {
  274. "type": "object",
  275. "required": [
  276. "meta",
  277. "data"
  278. ],
  279. "properties": {
  280. "meta": {
  281. "$ref": "#/components/schemas/OCSMeta"
  282. },
  283. "data": {
  284. "type": "object",
  285. "required": [
  286. "message"
  287. ],
  288. "properties": {
  289. "message": {
  290. "type": "string"
  291. }
  292. }
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. },
  301. "404": {
  302. "description": "Task or file not found",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "type": "object",
  307. "required": [
  308. "ocs"
  309. ],
  310. "properties": {
  311. "ocs": {
  312. "type": "object",
  313. "required": [
  314. "meta",
  315. "data"
  316. ],
  317. "properties": {
  318. "meta": {
  319. "$ref": "#/components/schemas/OCSMeta"
  320. },
  321. "data": {
  322. "type": "object",
  323. "required": [
  324. "message"
  325. ],
  326. "properties": {
  327. "message": {
  328. "type": "string"
  329. }
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. },
  342. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/progress": {
  343. "post": {
  344. "operationId": "task_processing_api-set-progress",
  345. "summary": "Sets the task progress",
  346. "description": "This endpoint requires admin access",
  347. "tags": [
  348. "task_processing_api"
  349. ],
  350. "security": [
  351. {
  352. "bearer_auth": []
  353. },
  354. {
  355. "basic_auth": []
  356. }
  357. ],
  358. "requestBody": {
  359. "required": true,
  360. "content": {
  361. "application/json": {
  362. "schema": {
  363. "type": "object",
  364. "required": [
  365. "progress"
  366. ],
  367. "properties": {
  368. "progress": {
  369. "type": "number",
  370. "format": "double",
  371. "description": "The progress"
  372. }
  373. }
  374. }
  375. }
  376. }
  377. },
  378. "parameters": [
  379. {
  380. "name": "taskId",
  381. "in": "path",
  382. "description": "The id of the task",
  383. "required": true,
  384. "schema": {
  385. "type": "integer",
  386. "format": "int64"
  387. }
  388. },
  389. {
  390. "name": "OCS-APIRequest",
  391. "in": "header",
  392. "description": "Required to be true for the API request to pass",
  393. "required": true,
  394. "schema": {
  395. "type": "boolean",
  396. "default": true
  397. }
  398. }
  399. ],
  400. "responses": {
  401. "200": {
  402. "description": "Progress updated successfully",
  403. "content": {
  404. "application/json": {
  405. "schema": {
  406. "type": "object",
  407. "required": [
  408. "ocs"
  409. ],
  410. "properties": {
  411. "ocs": {
  412. "type": "object",
  413. "required": [
  414. "meta",
  415. "data"
  416. ],
  417. "properties": {
  418. "meta": {
  419. "$ref": "#/components/schemas/OCSMeta"
  420. },
  421. "data": {
  422. "type": "object",
  423. "required": [
  424. "task"
  425. ],
  426. "properties": {
  427. "task": {
  428. "$ref": "#/components/schemas/TaskProcessingTask"
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. },
  439. "500": {
  440. "description": "",
  441. "content": {
  442. "application/json": {
  443. "schema": {
  444. "type": "object",
  445. "required": [
  446. "ocs"
  447. ],
  448. "properties": {
  449. "ocs": {
  450. "type": "object",
  451. "required": [
  452. "meta",
  453. "data"
  454. ],
  455. "properties": {
  456. "meta": {
  457. "$ref": "#/components/schemas/OCSMeta"
  458. },
  459. "data": {
  460. "type": "object",
  461. "required": [
  462. "message"
  463. ],
  464. "properties": {
  465. "message": {
  466. "type": "string"
  467. }
  468. }
  469. }
  470. }
  471. }
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "404": {
  478. "description": "Task not found",
  479. "content": {
  480. "application/json": {
  481. "schema": {
  482. "type": "object",
  483. "required": [
  484. "ocs"
  485. ],
  486. "properties": {
  487. "ocs": {
  488. "type": "object",
  489. "required": [
  490. "meta",
  491. "data"
  492. ],
  493. "properties": {
  494. "meta": {
  495. "$ref": "#/components/schemas/OCSMeta"
  496. },
  497. "data": {
  498. "type": "object",
  499. "required": [
  500. "message"
  501. ],
  502. "properties": {
  503. "message": {
  504. "type": "string"
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515. }
  516. }
  517. },
  518. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/result": {
  519. "post": {
  520. "operationId": "task_processing_api-set-result",
  521. "summary": "Sets the task result",
  522. "description": "This endpoint requires admin access",
  523. "tags": [
  524. "task_processing_api"
  525. ],
  526. "security": [
  527. {
  528. "bearer_auth": []
  529. },
  530. {
  531. "basic_auth": []
  532. }
  533. ],
  534. "requestBody": {
  535. "required": false,
  536. "content": {
  537. "application/json": {
  538. "schema": {
  539. "type": "object",
  540. "properties": {
  541. "output": {
  542. "type": "object",
  543. "nullable": true,
  544. "description": "The resulting task output",
  545. "additionalProperties": {
  546. "type": "object"
  547. }
  548. },
  549. "errorMessage": {
  550. "type": "string",
  551. "nullable": true,
  552. "description": "An error message if the task failed"
  553. }
  554. }
  555. }
  556. }
  557. }
  558. },
  559. "parameters": [
  560. {
  561. "name": "taskId",
  562. "in": "path",
  563. "description": "The id of the task",
  564. "required": true,
  565. "schema": {
  566. "type": "integer",
  567. "format": "int64"
  568. }
  569. },
  570. {
  571. "name": "OCS-APIRequest",
  572. "in": "header",
  573. "description": "Required to be true for the API request to pass",
  574. "required": true,
  575. "schema": {
  576. "type": "boolean",
  577. "default": true
  578. }
  579. }
  580. ],
  581. "responses": {
  582. "200": {
  583. "description": "Result updated successfully",
  584. "content": {
  585. "application/json": {
  586. "schema": {
  587. "type": "object",
  588. "required": [
  589. "ocs"
  590. ],
  591. "properties": {
  592. "ocs": {
  593. "type": "object",
  594. "required": [
  595. "meta",
  596. "data"
  597. ],
  598. "properties": {
  599. "meta": {
  600. "$ref": "#/components/schemas/OCSMeta"
  601. },
  602. "data": {
  603. "type": "object",
  604. "required": [
  605. "task"
  606. ],
  607. "properties": {
  608. "task": {
  609. "$ref": "#/components/schemas/TaskProcessingTask"
  610. }
  611. }
  612. }
  613. }
  614. }
  615. }
  616. }
  617. }
  618. }
  619. },
  620. "500": {
  621. "description": "",
  622. "content": {
  623. "application/json": {
  624. "schema": {
  625. "type": "object",
  626. "required": [
  627. "ocs"
  628. ],
  629. "properties": {
  630. "ocs": {
  631. "type": "object",
  632. "required": [
  633. "meta",
  634. "data"
  635. ],
  636. "properties": {
  637. "meta": {
  638. "$ref": "#/components/schemas/OCSMeta"
  639. },
  640. "data": {
  641. "type": "object",
  642. "required": [
  643. "message"
  644. ],
  645. "properties": {
  646. "message": {
  647. "type": "string"
  648. }
  649. }
  650. }
  651. }
  652. }
  653. }
  654. }
  655. }
  656. }
  657. },
  658. "404": {
  659. "description": "Task not found",
  660. "content": {
  661. "application/json": {
  662. "schema": {
  663. "type": "object",
  664. "required": [
  665. "ocs"
  666. ],
  667. "properties": {
  668. "ocs": {
  669. "type": "object",
  670. "required": [
  671. "meta",
  672. "data"
  673. ],
  674. "properties": {
  675. "meta": {
  676. "$ref": "#/components/schemas/OCSMeta"
  677. },
  678. "data": {
  679. "type": "object",
  680. "required": [
  681. "message"
  682. ],
  683. "properties": {
  684. "message": {
  685. "type": "string"
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694. }
  695. }
  696. }
  697. }
  698. },
  699. "/ocs/v2.php/taskprocessing/tasks_provider/next": {
  700. "get": {
  701. "operationId": "task_processing_api-get-next-scheduled-task",
  702. "summary": "Returns the next scheduled task for the taskTypeId",
  703. "description": "This endpoint requires admin access",
  704. "tags": [
  705. "task_processing_api"
  706. ],
  707. "security": [
  708. {
  709. "bearer_auth": []
  710. },
  711. {
  712. "basic_auth": []
  713. }
  714. ],
  715. "requestBody": {
  716. "required": true,
  717. "content": {
  718. "application/json": {
  719. "schema": {
  720. "type": "object",
  721. "required": [
  722. "providerIds",
  723. "taskTypeIds"
  724. ],
  725. "properties": {
  726. "providerIds": {
  727. "type": "array",
  728. "description": "The ids of the providers",
  729. "items": {
  730. "type": "string"
  731. }
  732. },
  733. "taskTypeIds": {
  734. "type": "array",
  735. "description": "The ids of the task types",
  736. "items": {
  737. "type": "string"
  738. }
  739. }
  740. }
  741. }
  742. }
  743. }
  744. },
  745. "parameters": [
  746. {
  747. "name": "OCS-APIRequest",
  748. "in": "header",
  749. "description": "Required to be true for the API request to pass",
  750. "required": true,
  751. "schema": {
  752. "type": "boolean",
  753. "default": true
  754. }
  755. }
  756. ],
  757. "responses": {
  758. "200": {
  759. "description": "Task returned",
  760. "content": {
  761. "application/json": {
  762. "schema": {
  763. "type": "object",
  764. "required": [
  765. "ocs"
  766. ],
  767. "properties": {
  768. "ocs": {
  769. "type": "object",
  770. "required": [
  771. "meta",
  772. "data"
  773. ],
  774. "properties": {
  775. "meta": {
  776. "$ref": "#/components/schemas/OCSMeta"
  777. },
  778. "data": {
  779. "type": "object",
  780. "required": [
  781. "task",
  782. "provider"
  783. ],
  784. "properties": {
  785. "task": {
  786. "$ref": "#/components/schemas/TaskProcessingTask"
  787. },
  788. "provider": {
  789. "type": "object",
  790. "required": [
  791. "name"
  792. ],
  793. "properties": {
  794. "name": {
  795. "type": "string"
  796. }
  797. }
  798. }
  799. }
  800. }
  801. }
  802. }
  803. }
  804. }
  805. }
  806. }
  807. },
  808. "204": {
  809. "description": "No task found"
  810. },
  811. "500": {
  812. "description": "",
  813. "content": {
  814. "application/json": {
  815. "schema": {
  816. "type": "object",
  817. "required": [
  818. "ocs"
  819. ],
  820. "properties": {
  821. "ocs": {
  822. "type": "object",
  823. "required": [
  824. "meta",
  825. "data"
  826. ],
  827. "properties": {
  828. "meta": {
  829. "$ref": "#/components/schemas/OCSMeta"
  830. },
  831. "data": {
  832. "type": "object",
  833. "required": [
  834. "message"
  835. ],
  836. "properties": {
  837. "message": {
  838. "type": "string"
  839. }
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. }
  847. }
  848. }
  849. }
  850. }
  851. }
  852. },
  853. "tags": [
  854. {
  855. "name": "avatar",
  856. "description": "Class AvatarController"
  857. },
  858. {
  859. "name": "guest_avatar",
  860. "description": "This controller handles guest avatar requests."
  861. },
  862. {
  863. "name": "ocm",
  864. "description": "Controller about the endpoint /ocm-provider/"
  865. }
  866. ]
  867. }