openapi.json 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "updatenotification",
  5. "version": "0.0.1",
  6. "description": "Displays update notifications for Nextcloud and provides the SSO for the updater.",
  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. "App": {
  24. "type": "object",
  25. "required": [
  26. "appId",
  27. "appName"
  28. ],
  29. "properties": {
  30. "appId": {
  31. "type": "string"
  32. },
  33. "appName": {
  34. "type": "string"
  35. }
  36. }
  37. },
  38. "OCSMeta": {
  39. "type": "object",
  40. "required": [
  41. "status",
  42. "statuscode"
  43. ],
  44. "properties": {
  45. "status": {
  46. "type": "string"
  47. },
  48. "statuscode": {
  49. "type": "integer"
  50. },
  51. "message": {
  52. "type": "string"
  53. },
  54. "totalitems": {
  55. "type": "string"
  56. },
  57. "itemsperpage": {
  58. "type": "string"
  59. }
  60. }
  61. }
  62. }
  63. },
  64. "paths": {
  65. "/ocs/v2.php/apps/updatenotification/api/{apiVersion}/applist/{newVersion}": {
  66. "get": {
  67. "operationId": "api-get-app-list",
  68. "summary": "List available updates for apps",
  69. "description": "This endpoint requires admin access",
  70. "tags": [
  71. "api"
  72. ],
  73. "security": [
  74. {
  75. "bearer_auth": []
  76. },
  77. {
  78. "basic_auth": []
  79. }
  80. ],
  81. "parameters": [
  82. {
  83. "name": "apiVersion",
  84. "in": "path",
  85. "required": true,
  86. "schema": {
  87. "type": "string",
  88. "enum": [
  89. "v1"
  90. ],
  91. "default": "v1"
  92. }
  93. },
  94. {
  95. "name": "newVersion",
  96. "in": "path",
  97. "description": "Server version to check updates for",
  98. "required": true,
  99. "schema": {
  100. "type": "string"
  101. }
  102. },
  103. {
  104. "name": "OCS-APIRequest",
  105. "in": "header",
  106. "required": true,
  107. "schema": {
  108. "type": "string",
  109. "default": "true"
  110. }
  111. }
  112. ],
  113. "responses": {
  114. "200": {
  115. "description": "Apps returned",
  116. "content": {
  117. "application/json": {
  118. "schema": {
  119. "type": "object",
  120. "required": [
  121. "ocs"
  122. ],
  123. "properties": {
  124. "ocs": {
  125. "type": "object",
  126. "required": [
  127. "meta",
  128. "data"
  129. ],
  130. "properties": {
  131. "meta": {
  132. "$ref": "#/components/schemas/OCSMeta"
  133. },
  134. "data": {
  135. "type": "object",
  136. "required": [
  137. "missing",
  138. "available"
  139. ],
  140. "properties": {
  141. "missing": {
  142. "type": "array",
  143. "items": {
  144. "$ref": "#/components/schemas/App"
  145. }
  146. },
  147. "available": {
  148. "type": "array",
  149. "items": {
  150. "$ref": "#/components/schemas/App"
  151. }
  152. }
  153. }
  154. }
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. },
  162. "404": {
  163. "description": "New versions not found",
  164. "content": {
  165. "application/json": {
  166. "schema": {
  167. "type": "object",
  168. "required": [
  169. "ocs"
  170. ],
  171. "properties": {
  172. "ocs": {
  173. "type": "object",
  174. "required": [
  175. "meta",
  176. "data"
  177. ],
  178. "properties": {
  179. "meta": {
  180. "$ref": "#/components/schemas/OCSMeta"
  181. },
  182. "data": {
  183. "type": "object",
  184. "required": [
  185. "appstore_disabled"
  186. ],
  187. "properties": {
  188. "appstore_disabled": {
  189. "type": "boolean"
  190. },
  191. "already_on_latest": {
  192. "type": "boolean"
  193. }
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. }
  205. }
  206. },
  207. "tags": []
  208. }