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

1610 lines
72 KiB

  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. "user": {
  56. "type": "object",
  57. "required": [
  58. "language",
  59. "locale",
  60. "timezone"
  61. ],
  62. "properties": {
  63. "language": {
  64. "type": "string"
  65. },
  66. "locale": {
  67. "type": "string"
  68. },
  69. "timezone": {
  70. "type": "string"
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }
  77. },
  78. "OCSMeta": {
  79. "type": "object",
  80. "required": [
  81. "status",
  82. "statuscode"
  83. ],
  84. "properties": {
  85. "status": {
  86. "type": "string"
  87. },
  88. "statuscode": {
  89. "type": "integer"
  90. },
  91. "message": {
  92. "type": "string"
  93. },
  94. "totalitems": {
  95. "type": "string"
  96. },
  97. "itemsperpage": {
  98. "type": "string"
  99. }
  100. }
  101. },
  102. "PublicCapabilities": {
  103. "type": "object",
  104. "required": [
  105. "bruteforce"
  106. ],
  107. "properties": {
  108. "bruteforce": {
  109. "type": "object",
  110. "required": [
  111. "delay",
  112. "allow-listed"
  113. ],
  114. "properties": {
  115. "delay": {
  116. "type": "integer",
  117. "format": "int64"
  118. },
  119. "allow-listed": {
  120. "type": "boolean"
  121. }
  122. }
  123. }
  124. }
  125. },
  126. "TaskProcessingIO": {
  127. "type": "object",
  128. "additionalProperties": {
  129. "anyOf": [
  130. {
  131. "type": "number"
  132. },
  133. {
  134. "type": "array",
  135. "items": {
  136. "type": "number"
  137. }
  138. },
  139. {
  140. "type": "string"
  141. },
  142. {
  143. "type": "array",
  144. "items": {
  145. "type": "string"
  146. }
  147. }
  148. ]
  149. }
  150. },
  151. "TaskProcessingTask": {
  152. "type": "object",
  153. "required": [
  154. "id",
  155. "lastUpdated",
  156. "type",
  157. "status",
  158. "userId",
  159. "appId",
  160. "input",
  161. "output",
  162. "customId",
  163. "completionExpectedAt",
  164. "progress",
  165. "scheduledAt",
  166. "startedAt",
  167. "endedAt",
  168. "allowCleanup"
  169. ],
  170. "properties": {
  171. "id": {
  172. "type": "integer",
  173. "format": "int64"
  174. },
  175. "lastUpdated": {
  176. "type": "integer",
  177. "format": "int64"
  178. },
  179. "type": {
  180. "type": "string"
  181. },
  182. "status": {
  183. "type": "string",
  184. "enum": [
  185. "STATUS_CANCELLED",
  186. "STATUS_FAILED",
  187. "STATUS_SUCCESSFUL",
  188. "STATUS_RUNNING",
  189. "STATUS_SCHEDULED",
  190. "STATUS_UNKNOWN"
  191. ]
  192. },
  193. "userId": {
  194. "type": "string",
  195. "nullable": true
  196. },
  197. "appId": {
  198. "type": "string"
  199. },
  200. "input": {
  201. "$ref": "#/components/schemas/TaskProcessingIO"
  202. },
  203. "output": {
  204. "nullable": true,
  205. "allOf": [
  206. {
  207. "$ref": "#/components/schemas/TaskProcessingIO"
  208. }
  209. ]
  210. },
  211. "customId": {
  212. "type": "string",
  213. "nullable": true
  214. },
  215. "completionExpectedAt": {
  216. "type": "integer",
  217. "format": "int64",
  218. "nullable": true
  219. },
  220. "progress": {
  221. "type": "number",
  222. "format": "double",
  223. "nullable": true
  224. },
  225. "scheduledAt": {
  226. "type": "integer",
  227. "format": "int64",
  228. "nullable": true
  229. },
  230. "startedAt": {
  231. "type": "integer",
  232. "format": "int64",
  233. "nullable": true
  234. },
  235. "endedAt": {
  236. "type": "integer",
  237. "format": "int64",
  238. "nullable": true
  239. },
  240. "allowCleanup": {
  241. "type": "boolean"
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "paths": {
  248. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/file/{fileId}": {
  249. "get": {
  250. "operationId": "task_processing_api-get-file-contents-ex-app",
  251. "summary": "Returns the contents of a file referenced in a task(ExApp route version)",
  252. "description": "This endpoint requires admin access",
  253. "tags": [
  254. "task_processing_api"
  255. ],
  256. "security": [
  257. {
  258. "bearer_auth": []
  259. },
  260. {
  261. "basic_auth": []
  262. }
  263. ],
  264. "parameters": [
  265. {
  266. "name": "taskId",
  267. "in": "path",
  268. "description": "The id of the task",
  269. "required": true,
  270. "schema": {
  271. "type": "integer",
  272. "format": "int64"
  273. }
  274. },
  275. {
  276. "name": "fileId",
  277. "in": "path",
  278. "description": "The file id of the file to retrieve",
  279. "required": true,
  280. "schema": {
  281. "type": "integer",
  282. "format": "int64"
  283. }
  284. },
  285. {
  286. "name": "OCS-APIRequest",
  287. "in": "header",
  288. "description": "Required to be true for the API request to pass",
  289. "required": true,
  290. "schema": {
  291. "type": "boolean",
  292. "default": true
  293. }
  294. }
  295. ],
  296. "responses": {
  297. "200": {
  298. "description": "File content returned",
  299. "content": {
  300. "*/*": {
  301. "schema": {
  302. "type": "string",
  303. "format": "binary"
  304. }
  305. }
  306. }
  307. },
  308. "500": {
  309. "description": "",
  310. "content": {
  311. "application/json": {
  312. "schema": {
  313. "type": "object",
  314. "required": [
  315. "ocs"
  316. ],
  317. "properties": {
  318. "ocs": {
  319. "type": "object",
  320. "required": [
  321. "meta",
  322. "data"
  323. ],
  324. "properties": {
  325. "meta": {
  326. "$ref": "#/components/schemas/OCSMeta"
  327. },
  328. "data": {
  329. "type": "object",
  330. "required": [
  331. "message"
  332. ],
  333. "properties": {
  334. "message": {
  335. "type": "string"
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. }
  343. }
  344. }
  345. },
  346. "404": {
  347. "description": "Task or file not found",
  348. "content": {
  349. "application/json": {
  350. "schema": {
  351. "type": "object",
  352. "required": [
  353. "ocs"
  354. ],
  355. "properties": {
  356. "ocs": {
  357. "type": "object",
  358. "required": [
  359. "meta",
  360. "data"
  361. ],
  362. "properties": {
  363. "meta": {
  364. "$ref": "#/components/schemas/OCSMeta"
  365. },
  366. "data": {
  367. "type": "object",
  368. "required": [
  369. "message"
  370. ],
  371. "properties": {
  372. "message": {
  373. "type": "string"
  374. }
  375. }
  376. }
  377. }
  378. }
  379. }
  380. }
  381. }
  382. }
  383. },
  384. "401": {
  385. "description": "Current user is not logged in",
  386. "content": {
  387. "application/json": {
  388. "schema": {
  389. "type": "object",
  390. "required": [
  391. "ocs"
  392. ],
  393. "properties": {
  394. "ocs": {
  395. "type": "object",
  396. "required": [
  397. "meta",
  398. "data"
  399. ],
  400. "properties": {
  401. "meta": {
  402. "$ref": "#/components/schemas/OCSMeta"
  403. },
  404. "data": {}
  405. }
  406. }
  407. }
  408. }
  409. }
  410. }
  411. },
  412. "403": {
  413. "description": "Logged in account must be an admin",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "type": "object",
  418. "required": [
  419. "ocs"
  420. ],
  421. "properties": {
  422. "ocs": {
  423. "type": "object",
  424. "required": [
  425. "meta",
  426. "data"
  427. ],
  428. "properties": {
  429. "meta": {
  430. "$ref": "#/components/schemas/OCSMeta"
  431. },
  432. "data": {}
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. }
  440. }
  441. }
  442. },
  443. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/file": {
  444. "post": {
  445. "operationId": "task_processing_api-set-file-contents-ex-app",
  446. "summary": "Upload a file so it can be referenced in a task result (ExApp route version)",
  447. "description": "Use field 'file' for the file upload\nThis endpoint requires admin access",
  448. "tags": [
  449. "task_processing_api"
  450. ],
  451. "security": [
  452. {
  453. "bearer_auth": []
  454. },
  455. {
  456. "basic_auth": []
  457. }
  458. ],
  459. "parameters": [
  460. {
  461. "name": "taskId",
  462. "in": "path",
  463. "description": "The id of the task",
  464. "required": true,
  465. "schema": {
  466. "type": "integer",
  467. "format": "int64"
  468. }
  469. },
  470. {
  471. "name": "OCS-APIRequest",
  472. "in": "header",
  473. "description": "Required to be true for the API request to pass",
  474. "required": true,
  475. "schema": {
  476. "type": "boolean",
  477. "default": true
  478. }
  479. }
  480. ],
  481. "responses": {
  482. "201": {
  483. "description": "File created",
  484. "content": {
  485. "application/json": {
  486. "schema": {
  487. "type": "object",
  488. "required": [
  489. "ocs"
  490. ],
  491. "properties": {
  492. "ocs": {
  493. "type": "object",
  494. "required": [
  495. "meta",
  496. "data"
  497. ],
  498. "properties": {
  499. "meta": {
  500. "$ref": "#/components/schemas/OCSMeta"
  501. },
  502. "data": {
  503. "type": "object",
  504. "required": [
  505. "fileId"
  506. ],
  507. "properties": {
  508. "fileId": {
  509. "type": "integer",
  510. "format": "int64"
  511. }
  512. }
  513. }
  514. }
  515. }
  516. }
  517. }
  518. }
  519. }
  520. },
  521. "400": {
  522. "description": "File upload failed or no file was uploaded",
  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. "message"
  545. ],
  546. "properties": {
  547. "message": {
  548. "type": "string"
  549. }
  550. }
  551. }
  552. }
  553. }
  554. }
  555. }
  556. }
  557. }
  558. },
  559. "500": {
  560. "description": "",
  561. "content": {
  562. "application/json": {
  563. "schema": {
  564. "type": "object",
  565. "required": [
  566. "ocs"
  567. ],
  568. "properties": {
  569. "ocs": {
  570. "type": "object",
  571. "required": [
  572. "meta",
  573. "data"
  574. ],
  575. "properties": {
  576. "meta": {
  577. "$ref": "#/components/schemas/OCSMeta"
  578. },
  579. "data": {
  580. "type": "object",
  581. "required": [
  582. "message"
  583. ],
  584. "properties": {
  585. "message": {
  586. "type": "string"
  587. }
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }
  594. }
  595. }
  596. },
  597. "404": {
  598. "description": "Task not found",
  599. "content": {
  600. "application/json": {
  601. "schema": {
  602. "type": "object",
  603. "required": [
  604. "ocs"
  605. ],
  606. "properties": {
  607. "ocs": {
  608. "type": "object",
  609. "required": [
  610. "meta",
  611. "data"
  612. ],
  613. "properties": {
  614. "meta": {
  615. "$ref": "#/components/schemas/OCSMeta"
  616. },
  617. "data": {
  618. "type": "object",
  619. "required": [
  620. "message"
  621. ],
  622. "properties": {
  623. "message": {
  624. "type": "string"
  625. }
  626. }
  627. }
  628. }
  629. }
  630. }
  631. }
  632. }
  633. }
  634. },
  635. "401": {
  636. "description": "Current user is not logged in",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "type": "object",
  641. "required": [
  642. "ocs"
  643. ],
  644. "properties": {
  645. "ocs": {
  646. "type": "object",
  647. "required": [
  648. "meta",
  649. "data"
  650. ],
  651. "properties": {
  652. "meta": {
  653. "$ref": "#/components/schemas/OCSMeta"
  654. },
  655. "data": {}
  656. }
  657. }
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "403": {
  664. "description": "Logged in account must be an admin",
  665. "content": {
  666. "application/json": {
  667. "schema": {
  668. "type": "object",
  669. "required": [
  670. "ocs"
  671. ],
  672. "properties": {
  673. "ocs": {
  674. "type": "object",
  675. "required": [
  676. "meta",
  677. "data"
  678. ],
  679. "properties": {
  680. "meta": {
  681. "$ref": "#/components/schemas/OCSMeta"
  682. },
  683. "data": {}
  684. }
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. }
  692. }
  693. },
  694. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/progress": {
  695. "post": {
  696. "operationId": "task_processing_api-set-progress",
  697. "summary": "Sets the task progress",
  698. "description": "This endpoint requires admin access",
  699. "tags": [
  700. "task_processing_api"
  701. ],
  702. "security": [
  703. {
  704. "bearer_auth": []
  705. },
  706. {
  707. "basic_auth": []
  708. }
  709. ],
  710. "requestBody": {
  711. "required": true,
  712. "content": {
  713. "application/json": {
  714. "schema": {
  715. "type": "object",
  716. "required": [
  717. "progress"
  718. ],
  719. "properties": {
  720. "progress": {
  721. "type": "number",
  722. "format": "double",
  723. "description": "The progress"
  724. }
  725. }
  726. }
  727. }
  728. }
  729. },
  730. "parameters": [
  731. {
  732. "name": "taskId",
  733. "in": "path",
  734. "description": "The id of the task",
  735. "required": true,
  736. "schema": {
  737. "type": "integer",
  738. "format": "int64"
  739. }
  740. },
  741. {
  742. "name": "OCS-APIRequest",
  743. "in": "header",
  744. "description": "Required to be true for the API request to pass",
  745. "required": true,
  746. "schema": {
  747. "type": "boolean",
  748. "default": true
  749. }
  750. }
  751. ],
  752. "responses": {
  753. "200": {
  754. "description": "Progress updated successfully",
  755. "content": {
  756. "application/json": {
  757. "schema": {
  758. "type": "object",
  759. "required": [
  760. "ocs"
  761. ],
  762. "properties": {
  763. "ocs": {
  764. "type": "object",
  765. "required": [
  766. "meta",
  767. "data"
  768. ],
  769. "properties": {
  770. "meta": {
  771. "$ref": "#/components/schemas/OCSMeta"
  772. },
  773. "data": {
  774. "type": "object",
  775. "required": [
  776. "task"
  777. ],
  778. "properties": {
  779. "task": {
  780. "$ref": "#/components/schemas/TaskProcessingTask"
  781. }
  782. }
  783. }
  784. }
  785. }
  786. }
  787. }
  788. }
  789. }
  790. },
  791. "500": {
  792. "description": "",
  793. "content": {
  794. "application/json": {
  795. "schema": {
  796. "type": "object",
  797. "required": [
  798. "ocs"
  799. ],
  800. "properties": {
  801. "ocs": {
  802. "type": "object",
  803. "required": [
  804. "meta",
  805. "data"
  806. ],
  807. "properties": {
  808. "meta": {
  809. "$ref": "#/components/schemas/OCSMeta"
  810. },
  811. "data": {
  812. "type": "object",
  813. "required": [
  814. "message"
  815. ],
  816. "properties": {
  817. "message": {
  818. "type": "string"
  819. }
  820. }
  821. }
  822. }
  823. }
  824. }
  825. }
  826. }
  827. }
  828. },
  829. "404": {
  830. "description": "Task not found",
  831. "content": {
  832. "application/json": {
  833. "schema": {
  834. "type": "object",
  835. "required": [
  836. "ocs"
  837. ],
  838. "properties": {
  839. "ocs": {
  840. "type": "object",
  841. "required": [
  842. "meta",
  843. "data"
  844. ],
  845. "properties": {
  846. "meta": {
  847. "$ref": "#/components/schemas/OCSMeta"
  848. },
  849. "data": {
  850. "type": "object",
  851. "required": [
  852. "message"
  853. ],
  854. "properties": {
  855. "message": {
  856. "type": "string"
  857. }
  858. }
  859. }
  860. }
  861. }
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "401": {
  868. "description": "Current user is not logged in",
  869. "content": {
  870. "application/json": {
  871. "schema": {
  872. "type": "object",
  873. "required": [
  874. "ocs"
  875. ],
  876. "properties": {
  877. "ocs": {
  878. "type": "object",
  879. "required": [
  880. "meta",
  881. "data"
  882. ],
  883. "properties": {
  884. "meta": {
  885. "$ref": "#/components/schemas/OCSMeta"
  886. },
  887. "data": {}
  888. }
  889. }
  890. }
  891. }
  892. }
  893. }
  894. },
  895. "403": {
  896. "description": "Logged in account must be an admin",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "type": "object",
  901. "required": [
  902. "ocs"
  903. ],
  904. "properties": {
  905. "ocs": {
  906. "type": "object",
  907. "required": [
  908. "meta",
  909. "data"
  910. ],
  911. "properties": {
  912. "meta": {
  913. "$ref": "#/components/schemas/OCSMeta"
  914. },
  915. "data": {}
  916. }
  917. }
  918. }
  919. }
  920. }
  921. }
  922. }
  923. }
  924. }
  925. },
  926. "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/result": {
  927. "post": {
  928. "operationId": "task_processing_api-set-result",
  929. "summary": "Sets the task result",
  930. "description": "This endpoint requires admin access",
  931. "tags": [
  932. "task_processing_api"
  933. ],
  934. "security": [
  935. {
  936. "bearer_auth": []
  937. },
  938. {
  939. "basic_auth": []
  940. }
  941. ],
  942. "requestBody": {
  943. "required": false,
  944. "content": {
  945. "application/json": {
  946. "schema": {
  947. "type": "object",
  948. "properties": {
  949. "output": {
  950. "type": "object",
  951. "nullable": true,
  952. "default": null,
  953. "description": "The resulting task output, files are represented by their IDs",
  954. "additionalProperties": {
  955. "type": "object"
  956. }
  957. },
  958. "errorMessage": {
  959. "type": "string",
  960. "nullable": true,
  961. "default": null,
  962. "description": "An error message if the task failed"
  963. },
  964. "userFacingErrorMessage": {
  965. "type": "string",
  966. "nullable": true,
  967. "default": null,
  968. "description": "An error message that will be shown to the user"
  969. }
  970. }
  971. }
  972. }
  973. }
  974. },
  975. "parameters": [
  976. {
  977. "name": "taskId",
  978. "in": "path",
  979. "description": "The id of the task",
  980. "required": true,
  981. "schema": {
  982. "type": "integer",
  983. "format": "int64"
  984. }
  985. },
  986. {
  987. "name": "OCS-APIRequest",
  988. "in": "header",
  989. "description": "Required to be true for the API request to pass",
  990. "required": true,
  991. "schema": {
  992. "type": "boolean",
  993. "default": true
  994. }
  995. }
  996. ],
  997. "responses": {
  998. "200": {
  999. "description": "Result updated successfully",
  1000. "content": {
  1001. "application/json": {
  1002. "schema": {
  1003. "type": "object",
  1004. "required": [
  1005. "ocs"
  1006. ],
  1007. "properties": {
  1008. "ocs": {
  1009. "type": "object",
  1010. "required": [
  1011. "meta",
  1012. "data"
  1013. ],
  1014. "properties": {
  1015. "meta": {
  1016. "$ref": "#/components/schemas/OCSMeta"
  1017. },
  1018. "data": {
  1019. "type": "object",
  1020. "required": [
  1021. "task"
  1022. ],
  1023. "properties": {
  1024. "task": {
  1025. "$ref": "#/components/schemas/TaskProcessingTask"
  1026. }
  1027. }
  1028. }
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. },
  1036. "500": {
  1037. "description": "",
  1038. "content": {
  1039. "application/json": {
  1040. "schema": {
  1041. "type": "object",
  1042. "required": [
  1043. "ocs"
  1044. ],
  1045. "properties": {
  1046. "ocs": {
  1047. "type": "object",
  1048. "required": [
  1049. "meta",
  1050. "data"
  1051. ],
  1052. "properties": {
  1053. "meta": {
  1054. "$ref": "#/components/schemas/OCSMeta"
  1055. },
  1056. "data": {
  1057. "type": "object",
  1058. "required": [
  1059. "message"
  1060. ],
  1061. "properties": {
  1062. "message": {
  1063. "type": "string"
  1064. }
  1065. }
  1066. }
  1067. }
  1068. }
  1069. }
  1070. }
  1071. }
  1072. }
  1073. },
  1074. "404": {
  1075. "description": "Task not found",
  1076. "content": {
  1077. "application/json": {
  1078. "schema": {
  1079. "type": "object",
  1080. "required": [
  1081. "ocs"
  1082. ],
  1083. "properties": {
  1084. "ocs": {
  1085. "type": "object",
  1086. "required": [
  1087. "meta",
  1088. "data"
  1089. ],
  1090. "properties": {
  1091. "meta": {
  1092. "$ref": "#/components/schemas/OCSMeta"
  1093. },
  1094. "data": {
  1095. "type": "object",
  1096. "required": [
  1097. "message"
  1098. ],
  1099. "properties": {
  1100. "message": {
  1101. "type": "string"
  1102. }
  1103. }
  1104. }
  1105. }
  1106. }
  1107. }
  1108. }
  1109. }
  1110. }
  1111. },
  1112. "401": {
  1113. "description": "Current user is not logged in",
  1114. "content": {
  1115. "application/json": {
  1116. "schema": {
  1117. "type": "object",
  1118. "required": [
  1119. "ocs"
  1120. ],
  1121. "properties": {
  1122. "ocs": {
  1123. "type": "object",
  1124. "required": [
  1125. "meta",
  1126. "data"
  1127. ],
  1128. "properties": {
  1129. "meta": {
  1130. "$ref": "#/components/schemas/OCSMeta"
  1131. },
  1132. "data": {}
  1133. }
  1134. }
  1135. }
  1136. }
  1137. }
  1138. }
  1139. },
  1140. "403": {
  1141. "description": "Logged in account must be an admin",
  1142. "content": {
  1143. "application/json": {
  1144. "schema": {
  1145. "type": "object",
  1146. "required": [
  1147. "ocs"
  1148. ],
  1149. "properties": {
  1150. "ocs": {
  1151. "type": "object",
  1152. "required": [
  1153. "meta",
  1154. "data"
  1155. ],
  1156. "properties": {
  1157. "meta": {
  1158. "$ref": "#/components/schemas/OCSMeta"
  1159. },
  1160. "data": {}
  1161. }
  1162. }
  1163. }
  1164. }
  1165. }
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "/ocs/v2.php/taskprocessing/tasks_provider/next": {
  1172. "get": {
  1173. "operationId": "task_processing_api-get-next-scheduled-task",
  1174. "summary": "Returns the next scheduled task for the taskTypeId",
  1175. "description": "This endpoint requires admin access",
  1176. "tags": [
  1177. "task_processing_api"
  1178. ],
  1179. "security": [
  1180. {
  1181. "bearer_auth": []
  1182. },
  1183. {
  1184. "basic_auth": []
  1185. }
  1186. ],
  1187. "parameters": [
  1188. {
  1189. "name": "providerIds[]",
  1190. "in": "query",
  1191. "description": "The ids of the providers",
  1192. "required": true,
  1193. "schema": {
  1194. "type": "array",
  1195. "items": {
  1196. "type": "string"
  1197. }
  1198. }
  1199. },
  1200. {
  1201. "name": "taskTypeIds[]",
  1202. "in": "query",
  1203. "description": "The ids of the task types",
  1204. "required": true,
  1205. "schema": {
  1206. "type": "array",
  1207. "items": {
  1208. "type": "string"
  1209. }
  1210. }
  1211. },
  1212. {
  1213. "name": "OCS-APIRequest",
  1214. "in": "header",
  1215. "description": "Required to be true for the API request to pass",
  1216. "required": true,
  1217. "schema": {
  1218. "type": "boolean",
  1219. "default": true
  1220. }
  1221. }
  1222. ],
  1223. "responses": {
  1224. "200": {
  1225. "description": "Task returned",
  1226. "content": {
  1227. "application/json": {
  1228. "schema": {
  1229. "type": "object",
  1230. "required": [
  1231. "ocs"
  1232. ],
  1233. "properties": {
  1234. "ocs": {
  1235. "type": "object",
  1236. "required": [
  1237. "meta",
  1238. "data"
  1239. ],
  1240. "properties": {
  1241. "meta": {
  1242. "$ref": "#/components/schemas/OCSMeta"
  1243. },
  1244. "data": {
  1245. "type": "object",
  1246. "required": [
  1247. "task",
  1248. "provider"
  1249. ],
  1250. "properties": {
  1251. "task": {
  1252. "$ref": "#/components/schemas/TaskProcessingTask"
  1253. },
  1254. "provider": {
  1255. "type": "object",
  1256. "required": [
  1257. "name"
  1258. ],
  1259. "properties": {
  1260. "name": {
  1261. "type": "string"
  1262. }
  1263. }
  1264. }
  1265. }
  1266. }
  1267. }
  1268. }
  1269. }
  1270. }
  1271. }
  1272. }
  1273. },
  1274. "204": {
  1275. "description": "No task found"
  1276. },
  1277. "500": {
  1278. "description": "",
  1279. "content": {
  1280. "application/json": {
  1281. "schema": {
  1282. "type": "object",
  1283. "required": [
  1284. "ocs"
  1285. ],
  1286. "properties": {
  1287. "ocs": {
  1288. "type": "object",
  1289. "required": [
  1290. "meta",
  1291. "data"
  1292. ],
  1293. "properties": {
  1294. "meta": {
  1295. "$ref": "#/components/schemas/OCSMeta"
  1296. },
  1297. "data": {
  1298. "type": "object",
  1299. "required": [
  1300. "message"
  1301. ],
  1302. "properties": {
  1303. "message": {
  1304. "type": "string"
  1305. }
  1306. }
  1307. }
  1308. }
  1309. }
  1310. }
  1311. }
  1312. }
  1313. }
  1314. },
  1315. "401": {
  1316. "description": "Current user is not logged in",
  1317. "content": {
  1318. "application/json": {
  1319. "schema": {
  1320. "type": "object",
  1321. "required": [
  1322. "ocs"
  1323. ],
  1324. "properties": {
  1325. "ocs": {
  1326. "type": "object",
  1327. "required": [
  1328. "meta",
  1329. "data"
  1330. ],
  1331. "properties": {
  1332. "meta": {
  1333. "$ref": "#/components/schemas/OCSMeta"
  1334. },
  1335. "data": {}
  1336. }
  1337. }
  1338. }
  1339. }
  1340. }
  1341. }
  1342. },
  1343. "403": {
  1344. "description": "Logged in account must be an admin",
  1345. "content": {
  1346. "application/json": {
  1347. "schema": {
  1348. "type": "object",
  1349. "required": [
  1350. "ocs"
  1351. ],
  1352. "properties": {
  1353. "ocs": {
  1354. "type": "object",
  1355. "required": [
  1356. "meta",
  1357. "data"
  1358. ],
  1359. "properties": {
  1360. "meta": {
  1361. "$ref": "#/components/schemas/OCSMeta"
  1362. },
  1363. "data": {}
  1364. }
  1365. }
  1366. }
  1367. }
  1368. }
  1369. }
  1370. }
  1371. }
  1372. }
  1373. },
  1374. "/ocs/v2.php/taskprocessing/tasks_provider/next_batch": {
  1375. "get": {
  1376. "operationId": "task_processing_api-get-next-scheduled-task-batch",
  1377. "summary": "Returns the next n scheduled tasks for the specified set of taskTypes and providers The returned tasks are capped at ~50MiB",
  1378. "description": "This endpoint requires admin access",
  1379. "tags": [
  1380. "task_processing_api"
  1381. ],
  1382. "security": [
  1383. {
  1384. "bearer_auth": []
  1385. },
  1386. {
  1387. "basic_auth": []
  1388. }
  1389. ],
  1390. "parameters": [
  1391. {
  1392. "name": "providerIds[]",
  1393. "in": "query",
  1394. "description": "The ids of the providers",
  1395. "required": true,
  1396. "schema": {
  1397. "type": "array",
  1398. "items": {
  1399. "type": "string"
  1400. }
  1401. }
  1402. },
  1403. {
  1404. "name": "taskTypeIds[]",
  1405. "in": "query",
  1406. "description": "The ids of the task types",
  1407. "required": true,
  1408. "schema": {
  1409. "type": "array",
  1410. "items": {
  1411. "type": "string"
  1412. }
  1413. }
  1414. },
  1415. {
  1416. "name": "numberOfTasks",
  1417. "in": "query",
  1418. "description": "The number of tasks to return",
  1419. "schema": {
  1420. "type": "integer",
  1421. "format": "int64",
  1422. "default": 1
  1423. }
  1424. },
  1425. {
  1426. "name": "OCS-APIRequest",
  1427. "in": "header",
  1428. "description": "Required to be true for the API request to pass",
  1429. "required": true,
  1430. "schema": {
  1431. "type": "boolean",
  1432. "default": true
  1433. }
  1434. }
  1435. ],
  1436. "responses": {
  1437. "200": {
  1438. "description": "Tasks returned",
  1439. "content": {
  1440. "application/json": {
  1441. "schema": {
  1442. "type": "object",
  1443. "required": [
  1444. "ocs"
  1445. ],
  1446. "properties": {
  1447. "ocs": {
  1448. "type": "object",
  1449. "required": [
  1450. "meta",
  1451. "data"
  1452. ],
  1453. "properties": {
  1454. "meta": {
  1455. "$ref": "#/components/schemas/OCSMeta"
  1456. },
  1457. "data": {
  1458. "type": "object",
  1459. "required": [
  1460. "tasks",
  1461. "has_more"
  1462. ],
  1463. "properties": {
  1464. "tasks": {
  1465. "type": "array",
  1466. "items": {
  1467. "type": "object",
  1468. "required": [
  1469. "task",
  1470. "provider"
  1471. ],
  1472. "properties": {
  1473. "task": {
  1474. "$ref": "#/components/schemas/TaskProcessingTask"
  1475. },
  1476. "provider": {
  1477. "type": "string"
  1478. }
  1479. }
  1480. }
  1481. },
  1482. "has_more": {
  1483. "type": "boolean"
  1484. }
  1485. }
  1486. }
  1487. }
  1488. }
  1489. }
  1490. }
  1491. }
  1492. }
  1493. },
  1494. "500": {
  1495. "description": "",
  1496. "content": {
  1497. "application/json": {
  1498. "schema": {
  1499. "type": "object",
  1500. "required": [
  1501. "ocs"
  1502. ],
  1503. "properties": {
  1504. "ocs": {
  1505. "type": "object",
  1506. "required": [
  1507. "meta",
  1508. "data"
  1509. ],
  1510. "properties": {
  1511. "meta": {
  1512. "$ref": "#/components/schemas/OCSMeta"
  1513. },
  1514. "data": {
  1515. "type": "object",
  1516. "required": [
  1517. "message"
  1518. ],
  1519. "properties": {
  1520. "message": {
  1521. "type": "string"
  1522. }
  1523. }
  1524. }
  1525. }
  1526. }
  1527. }
  1528. }
  1529. }
  1530. }
  1531. },
  1532. "401": {
  1533. "description": "Current user is not logged in",
  1534. "content": {
  1535. "application/json": {
  1536. "schema": {
  1537. "type": "object",
  1538. "required": [
  1539. "ocs"
  1540. ],
  1541. "properties": {
  1542. "ocs": {
  1543. "type": "object",
  1544. "required": [
  1545. "meta",
  1546. "data"
  1547. ],
  1548. "properties": {
  1549. "meta": {
  1550. "$ref": "#/components/schemas/OCSMeta"
  1551. },
  1552. "data": {}
  1553. }
  1554. }
  1555. }
  1556. }
  1557. }
  1558. }
  1559. },
  1560. "403": {
  1561. "description": "Logged in account must be an admin",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "object",
  1566. "required": [
  1567. "ocs"
  1568. ],
  1569. "properties": {
  1570. "ocs": {
  1571. "type": "object",
  1572. "required": [
  1573. "meta",
  1574. "data"
  1575. ],
  1576. "properties": {
  1577. "meta": {
  1578. "$ref": "#/components/schemas/OCSMeta"
  1579. },
  1580. "data": {}
  1581. }
  1582. }
  1583. }
  1584. }
  1585. }
  1586. }
  1587. }
  1588. }
  1589. }
  1590. }
  1591. },
  1592. "tags": [
  1593. {
  1594. "name": "ocs",
  1595. "description": "If you are here because you can't extend the OCSController class, you got the wrong one. Please use {@see \\OCP\\AppFramework\\OCSController}!"
  1596. },
  1597. {
  1598. "name": "avatar",
  1599. "description": "Class AvatarController"
  1600. },
  1601. {
  1602. "name": "guest_avatar",
  1603. "description": "This controller handles guest avatar requests."
  1604. },
  1605. {
  1606. "name": "ocm",
  1607. "description": "Controller about the endpoint /ocm-provider/"
  1608. }
  1609. ]
  1610. }