openapi.json 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. "description": "Required to be true for the API request to pass",
  107. "required": true,
  108. "schema": {
  109. "type": "boolean",
  110. "default": true
  111. }
  112. }
  113. ],
  114. "responses": {
  115. "200": {
  116. "description": "Apps returned",
  117. "content": {
  118. "application/json": {
  119. "schema": {
  120. "type": "object",
  121. "required": [
  122. "ocs"
  123. ],
  124. "properties": {
  125. "ocs": {
  126. "type": "object",
  127. "required": [
  128. "meta",
  129. "data"
  130. ],
  131. "properties": {
  132. "meta": {
  133. "$ref": "#/components/schemas/OCSMeta"
  134. },
  135. "data": {
  136. "type": "object",
  137. "required": [
  138. "missing",
  139. "available"
  140. ],
  141. "properties": {
  142. "missing": {
  143. "type": "array",
  144. "items": {
  145. "$ref": "#/components/schemas/App"
  146. }
  147. },
  148. "available": {
  149. "type": "array",
  150. "items": {
  151. "$ref": "#/components/schemas/App"
  152. }
  153. }
  154. }
  155. }
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. },
  163. "404": {
  164. "description": "New versions not found",
  165. "content": {
  166. "application/json": {
  167. "schema": {
  168. "type": "object",
  169. "required": [
  170. "ocs"
  171. ],
  172. "properties": {
  173. "ocs": {
  174. "type": "object",
  175. "required": [
  176. "meta",
  177. "data"
  178. ],
  179. "properties": {
  180. "meta": {
  181. "$ref": "#/components/schemas/OCSMeta"
  182. },
  183. "data": {
  184. "type": "object",
  185. "required": [
  186. "appstore_disabled"
  187. ],
  188. "properties": {
  189. "appstore_disabled": {
  190. "type": "boolean"
  191. },
  192. "already_on_latest": {
  193. "type": "boolean"
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. }
  205. }
  206. }
  207. },
  208. "tags": []
  209. }