openapi.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "updatenotification",
  5. "version": "0.0.1",
  6. "description": "Displays update notifications for Nextcloud, app updates, 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. "/ocs/v2.php/apps/updatenotification/api/{apiVersion}/changelog/{appId}": {
  208. "get": {
  209. "operationId": "api-get-app-changelog-entry",
  210. "summary": "Get changelog entry for an app",
  211. "description": "This endpoint requires admin access",
  212. "tags": [
  213. "api"
  214. ],
  215. "security": [
  216. {
  217. "bearer_auth": []
  218. },
  219. {
  220. "basic_auth": []
  221. }
  222. ],
  223. "parameters": [
  224. {
  225. "name": "version",
  226. "in": "query",
  227. "description": "The version to search the changelog entry for (defaults to the latest installed)",
  228. "schema": {
  229. "type": "string",
  230. "nullable": true
  231. }
  232. },
  233. {
  234. "name": "apiVersion",
  235. "in": "path",
  236. "required": true,
  237. "schema": {
  238. "type": "string",
  239. "enum": [
  240. "v1"
  241. ],
  242. "default": "v1"
  243. }
  244. },
  245. {
  246. "name": "appId",
  247. "in": "path",
  248. "description": "App to search changelog entry for",
  249. "required": true,
  250. "schema": {
  251. "type": "string"
  252. }
  253. },
  254. {
  255. "name": "OCS-APIRequest",
  256. "in": "header",
  257. "description": "Required to be true for the API request to pass",
  258. "required": true,
  259. "schema": {
  260. "type": "boolean",
  261. "default": true
  262. }
  263. }
  264. ],
  265. "responses": {
  266. "200": {
  267. "description": "Changelog entry returned",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "type": "object",
  272. "required": [
  273. "ocs"
  274. ],
  275. "properties": {
  276. "ocs": {
  277. "type": "object",
  278. "required": [
  279. "meta",
  280. "data"
  281. ],
  282. "properties": {
  283. "meta": {
  284. "$ref": "#/components/schemas/OCSMeta"
  285. },
  286. "data": {
  287. "type": "object",
  288. "required": [
  289. "appName",
  290. "content",
  291. "version"
  292. ],
  293. "properties": {
  294. "appName": {
  295. "type": "string"
  296. },
  297. "content": {
  298. "type": "string"
  299. },
  300. "version": {
  301. "type": "string"
  302. }
  303. }
  304. }
  305. }
  306. }
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "404": {
  313. "description": "No changelog found",
  314. "content": {
  315. "application/json": {
  316. "schema": {
  317. "type": "object",
  318. "required": [
  319. "ocs"
  320. ],
  321. "properties": {
  322. "ocs": {
  323. "type": "object",
  324. "required": [
  325. "meta",
  326. "data"
  327. ],
  328. "properties": {
  329. "meta": {
  330. "$ref": "#/components/schemas/OCSMeta"
  331. },
  332. "data": {
  333. "type": "object"
  334. }
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. }
  343. }
  344. }
  345. },
  346. "tags": []
  347. }