openapi.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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. "item_api_versions",
  58. "reload_interval"
  59. ],
  60. "properties": {
  61. "id": {
  62. "type": "string"
  63. },
  64. "title": {
  65. "type": "string"
  66. },
  67. "order": {
  68. "type": "integer",
  69. "format": "int64"
  70. },
  71. "icon_class": {
  72. "type": "string"
  73. },
  74. "icon_url": {
  75. "type": "string"
  76. },
  77. "widget_url": {
  78. "type": "string",
  79. "nullable": true
  80. },
  81. "item_icons_round": {
  82. "type": "boolean"
  83. },
  84. "item_api_versions": {
  85. "type": "array",
  86. "items": {
  87. "type": "integer",
  88. "format": "int64"
  89. }
  90. },
  91. "reload_interval": {
  92. "type": "integer",
  93. "format": "int64"
  94. },
  95. "buttons": {
  96. "type": "array",
  97. "items": {
  98. "type": "object",
  99. "required": [
  100. "type",
  101. "text",
  102. "link"
  103. ],
  104. "properties": {
  105. "type": {
  106. "type": "string"
  107. },
  108. "text": {
  109. "type": "string"
  110. },
  111. "link": {
  112. "type": "string"
  113. }
  114. }
  115. }
  116. }
  117. }
  118. },
  119. "WidgetItem": {
  120. "type": "object",
  121. "required": [
  122. "subtitle",
  123. "title",
  124. "link",
  125. "iconUrl",
  126. "overlayIconUrl",
  127. "sinceId"
  128. ],
  129. "properties": {
  130. "subtitle": {
  131. "type": "string"
  132. },
  133. "title": {
  134. "type": "string"
  135. },
  136. "link": {
  137. "type": "string"
  138. },
  139. "iconUrl": {
  140. "type": "string"
  141. },
  142. "overlayIconUrl": {
  143. "type": "string"
  144. },
  145. "sinceId": {
  146. "type": "string"
  147. }
  148. }
  149. },
  150. "WidgetItems": {
  151. "type": "object",
  152. "required": [
  153. "items",
  154. "emptyContentMessage",
  155. "halfEmptyContentMessage"
  156. ],
  157. "properties": {
  158. "items": {
  159. "type": "array",
  160. "items": {
  161. "$ref": "#/components/schemas/WidgetItem"
  162. }
  163. },
  164. "emptyContentMessage": {
  165. "type": "string"
  166. },
  167. "halfEmptyContentMessage": {
  168. "type": "string"
  169. }
  170. }
  171. }
  172. }
  173. },
  174. "paths": {
  175. "/ocs/v2.php/apps/dashboard/api/v1/widgets": {
  176. "get": {
  177. "operationId": "dashboard_api-get-widgets",
  178. "summary": "Get the widgets",
  179. "tags": [
  180. "dashboard_api"
  181. ],
  182. "security": [
  183. {
  184. "bearer_auth": []
  185. },
  186. {
  187. "basic_auth": []
  188. }
  189. ],
  190. "parameters": [
  191. {
  192. "name": "OCS-APIRequest",
  193. "in": "header",
  194. "description": "Required to be true for the API request to pass",
  195. "required": true,
  196. "schema": {
  197. "type": "boolean",
  198. "default": true
  199. }
  200. }
  201. ],
  202. "responses": {
  203. "200": {
  204. "description": "Widgets returned",
  205. "content": {
  206. "application/json": {
  207. "schema": {
  208. "type": "object",
  209. "required": [
  210. "ocs"
  211. ],
  212. "properties": {
  213. "ocs": {
  214. "type": "object",
  215. "required": [
  216. "meta",
  217. "data"
  218. ],
  219. "properties": {
  220. "meta": {
  221. "$ref": "#/components/schemas/OCSMeta"
  222. },
  223. "data": {
  224. "type": "object",
  225. "additionalProperties": {
  226. "$ref": "#/components/schemas/Widget"
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. }
  236. }
  237. }
  238. },
  239. "/ocs/v2.php/apps/dashboard/api/v1/widget-items": {
  240. "get": {
  241. "operationId": "dashboard_api-get-widget-items",
  242. "summary": "Get the items for the widgets",
  243. "tags": [
  244. "dashboard_api"
  245. ],
  246. "security": [
  247. {
  248. "bearer_auth": []
  249. },
  250. {
  251. "basic_auth": []
  252. }
  253. ],
  254. "parameters": [
  255. {
  256. "name": "sinceIds",
  257. "in": "query",
  258. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  259. "schema": {
  260. "type": "string"
  261. }
  262. },
  263. {
  264. "name": "limit",
  265. "in": "query",
  266. "description": "Limit number of result items per widget",
  267. "schema": {
  268. "type": "integer",
  269. "format": "int64",
  270. "default": 7
  271. }
  272. },
  273. {
  274. "name": "widgets[]",
  275. "in": "query",
  276. "description": "Limit results to specific widgets",
  277. "schema": {
  278. "type": "array",
  279. "default": [],
  280. "items": {
  281. "type": "string"
  282. }
  283. }
  284. },
  285. {
  286. "name": "OCS-APIRequest",
  287. "in": "header",
  288. "description": "Required to be true for the API request to pass",
  289. "required": true,
  290. "schema": {
  291. "type": "boolean",
  292. "default": true
  293. }
  294. }
  295. ],
  296. "responses": {
  297. "200": {
  298. "description": "Widget items returned",
  299. "content": {
  300. "application/json": {
  301. "schema": {
  302. "type": "object",
  303. "required": [
  304. "ocs"
  305. ],
  306. "properties": {
  307. "ocs": {
  308. "type": "object",
  309. "required": [
  310. "meta",
  311. "data"
  312. ],
  313. "properties": {
  314. "meta": {
  315. "$ref": "#/components/schemas/OCSMeta"
  316. },
  317. "data": {
  318. "type": "object",
  319. "additionalProperties": {
  320. "type": "array",
  321. "items": {
  322. "$ref": "#/components/schemas/WidgetItem"
  323. }
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. }
  332. }
  333. }
  334. }
  335. },
  336. "/ocs/v2.php/apps/dashboard/api/v2/widget-items": {
  337. "get": {
  338. "operationId": "dashboard_api-get-widget-items-v2",
  339. "summary": "Get the items for the widgets",
  340. "tags": [
  341. "dashboard_api"
  342. ],
  343. "security": [
  344. {
  345. "bearer_auth": []
  346. },
  347. {
  348. "basic_auth": []
  349. }
  350. ],
  351. "parameters": [
  352. {
  353. "name": "sinceIds",
  354. "in": "query",
  355. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  356. "schema": {
  357. "type": "string"
  358. }
  359. },
  360. {
  361. "name": "limit",
  362. "in": "query",
  363. "description": "Limit number of result items per widget",
  364. "schema": {
  365. "type": "integer",
  366. "format": "int64",
  367. "default": 7
  368. }
  369. },
  370. {
  371. "name": "widgets[]",
  372. "in": "query",
  373. "description": "Limit results to specific widgets",
  374. "schema": {
  375. "type": "array",
  376. "default": [],
  377. "items": {
  378. "type": "string"
  379. }
  380. }
  381. },
  382. {
  383. "name": "OCS-APIRequest",
  384. "in": "header",
  385. "description": "Required to be true for the API request to pass",
  386. "required": true,
  387. "schema": {
  388. "type": "boolean",
  389. "default": true
  390. }
  391. }
  392. ],
  393. "responses": {
  394. "200": {
  395. "description": "Widget items returned",
  396. "content": {
  397. "application/json": {
  398. "schema": {
  399. "type": "object",
  400. "required": [
  401. "ocs"
  402. ],
  403. "properties": {
  404. "ocs": {
  405. "type": "object",
  406. "required": [
  407. "meta",
  408. "data"
  409. ],
  410. "properties": {
  411. "meta": {
  412. "$ref": "#/components/schemas/OCSMeta"
  413. },
  414. "data": {
  415. "type": "object",
  416. "additionalProperties": {
  417. "$ref": "#/components/schemas/WidgetItems"
  418. }
  419. }
  420. }
  421. }
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. },
  431. "tags": []
  432. }