openapi.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "dashboard",
  5. "version": "0.0.1",
  6. "description": "Dashboard app",
  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. "OCSMeta": {
  24. "type": "object",
  25. "required": [
  26. "status",
  27. "statuscode"
  28. ],
  29. "properties": {
  30. "status": {
  31. "type": "string"
  32. },
  33. "statuscode": {
  34. "type": "integer"
  35. },
  36. "message": {
  37. "type": "string"
  38. },
  39. "totalitems": {
  40. "type": "string"
  41. },
  42. "itemsperpage": {
  43. "type": "string"
  44. }
  45. }
  46. },
  47. "Widget": {
  48. "type": "object",
  49. "required": [
  50. "id",
  51. "title",
  52. "order",
  53. "icon_class",
  54. "icon_url",
  55. "widget_url",
  56. "item_icons_round"
  57. ],
  58. "properties": {
  59. "id": {
  60. "type": "string"
  61. },
  62. "title": {
  63. "type": "string"
  64. },
  65. "order": {
  66. "type": "integer",
  67. "format": "int64"
  68. },
  69. "icon_class": {
  70. "type": "string"
  71. },
  72. "icon_url": {
  73. "type": "string"
  74. },
  75. "widget_url": {
  76. "type": "string",
  77. "nullable": true
  78. },
  79. "item_icons_round": {
  80. "type": "boolean"
  81. },
  82. "buttons": {
  83. "type": "array",
  84. "items": {
  85. "type": "object",
  86. "required": [
  87. "type",
  88. "text",
  89. "link"
  90. ],
  91. "properties": {
  92. "type": {
  93. "type": "string"
  94. },
  95. "text": {
  96. "type": "string"
  97. },
  98. "link": {
  99. "type": "string"
  100. }
  101. }
  102. }
  103. }
  104. }
  105. },
  106. "WidgetItem": {
  107. "type": "object",
  108. "required": [
  109. "subtitle",
  110. "title",
  111. "link",
  112. "iconUrl",
  113. "sinceId"
  114. ],
  115. "properties": {
  116. "subtitle": {
  117. "type": "string"
  118. },
  119. "title": {
  120. "type": "string"
  121. },
  122. "link": {
  123. "type": "string"
  124. },
  125. "iconUrl": {
  126. "type": "string"
  127. },
  128. "sinceId": {
  129. "type": "string"
  130. }
  131. }
  132. }
  133. }
  134. },
  135. "paths": {
  136. "/ocs/v2.php/apps/dashboard/api/v1/widgets": {
  137. "get": {
  138. "operationId": "dashboard_api-get-widgets",
  139. "summary": "Get the widgets",
  140. "tags": [
  141. "dashboard_api"
  142. ],
  143. "security": [
  144. {
  145. "bearer_auth": []
  146. },
  147. {
  148. "basic_auth": []
  149. }
  150. ],
  151. "parameters": [
  152. {
  153. "name": "OCS-APIRequest",
  154. "in": "header",
  155. "required": true,
  156. "schema": {
  157. "type": "string",
  158. "default": "true"
  159. }
  160. }
  161. ],
  162. "responses": {
  163. "200": {
  164. "description": "",
  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": "array",
  185. "items": {
  186. "$ref": "#/components/schemas/Widget"
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }
  198. },
  199. "/ocs/v2.php/apps/dashboard/api/v1/widget-items": {
  200. "get": {
  201. "operationId": "dashboard_api-get-widget-items",
  202. "summary": "Get the items for the widgets",
  203. "tags": [
  204. "dashboard_api"
  205. ],
  206. "security": [
  207. {
  208. "bearer_auth": []
  209. },
  210. {
  211. "basic_auth": []
  212. }
  213. ],
  214. "parameters": [
  215. {
  216. "name": "sinceIds",
  217. "in": "query",
  218. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  219. "schema": {
  220. "type": "string"
  221. }
  222. },
  223. {
  224. "name": "limit",
  225. "in": "query",
  226. "description": "Limit number of result items per widget",
  227. "schema": {
  228. "type": "integer",
  229. "format": "int64",
  230. "default": 7
  231. }
  232. },
  233. {
  234. "name": "widgets",
  235. "in": "query",
  236. "description": "Limit results to specific widgets",
  237. "schema": {
  238. "type": "string"
  239. }
  240. },
  241. {
  242. "name": "OCS-APIRequest",
  243. "in": "header",
  244. "required": true,
  245. "schema": {
  246. "type": "string",
  247. "default": "true"
  248. }
  249. }
  250. ],
  251. "responses": {
  252. "200": {
  253. "description": "",
  254. "content": {
  255. "application/json": {
  256. "schema": {
  257. "type": "object",
  258. "required": [
  259. "ocs"
  260. ],
  261. "properties": {
  262. "ocs": {
  263. "type": "object",
  264. "required": [
  265. "meta",
  266. "data"
  267. ],
  268. "properties": {
  269. "meta": {
  270. "$ref": "#/components/schemas/OCSMeta"
  271. },
  272. "data": {
  273. "type": "object",
  274. "additionalProperties": {
  275. "type": "array",
  276. "items": {
  277. "$ref": "#/components/schemas/WidgetItem"
  278. }
  279. }
  280. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }
  289. }
  290. }
  291. },
  292. "tags": []
  293. }