openapi.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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. "requestBody": {
  224. "required": false,
  225. "content": {
  226. "application/json": {
  227. "schema": {
  228. "type": "object",
  229. "properties": {
  230. "version": {
  231. "type": "string",
  232. "nullable": true,
  233. "description": "The version to search the changelog entry for (defaults to the latest installed)"
  234. }
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "parameters": [
  241. {
  242. "name": "apiVersion",
  243. "in": "path",
  244. "required": true,
  245. "schema": {
  246. "type": "string",
  247. "enum": [
  248. "v1"
  249. ],
  250. "default": "v1"
  251. }
  252. },
  253. {
  254. "name": "appId",
  255. "in": "path",
  256. "description": "App to search changelog entry for",
  257. "required": true,
  258. "schema": {
  259. "type": "string"
  260. }
  261. },
  262. {
  263. "name": "OCS-APIRequest",
  264. "in": "header",
  265. "description": "Required to be true for the API request to pass",
  266. "required": true,
  267. "schema": {
  268. "type": "boolean",
  269. "default": true
  270. }
  271. }
  272. ],
  273. "responses": {
  274. "200": {
  275. "description": "Changelog entry returned",
  276. "content": {
  277. "application/json": {
  278. "schema": {
  279. "type": "object",
  280. "required": [
  281. "ocs"
  282. ],
  283. "properties": {
  284. "ocs": {
  285. "type": "object",
  286. "required": [
  287. "meta",
  288. "data"
  289. ],
  290. "properties": {
  291. "meta": {
  292. "$ref": "#/components/schemas/OCSMeta"
  293. },
  294. "data": {
  295. "type": "object",
  296. "required": [
  297. "appName",
  298. "content",
  299. "version"
  300. ],
  301. "properties": {
  302. "appName": {
  303. "type": "string"
  304. },
  305. "content": {
  306. "type": "string"
  307. },
  308. "version": {
  309. "type": "string"
  310. }
  311. }
  312. }
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. },
  320. "404": {
  321. "description": "No changelog found",
  322. "content": {
  323. "application/json": {
  324. "schema": {
  325. "type": "object",
  326. "required": [
  327. "ocs"
  328. ],
  329. "properties": {
  330. "ocs": {
  331. "type": "object",
  332. "required": [
  333. "meta",
  334. "data"
  335. ],
  336. "properties": {
  337. "meta": {
  338. "$ref": "#/components/schemas/OCSMeta"
  339. },
  340. "data": {
  341. "type": "object"
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. }
  351. }
  352. }
  353. },
  354. "tags": []
  355. }