1
0

openapi.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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. "minimum": 1,
  272. "maximum": 30
  273. }
  274. },
  275. {
  276. "name": "widgets[]",
  277. "in": "query",
  278. "description": "Limit results to specific widgets",
  279. "schema": {
  280. "type": "array",
  281. "default": [],
  282. "items": {
  283. "type": "string"
  284. }
  285. }
  286. },
  287. {
  288. "name": "OCS-APIRequest",
  289. "in": "header",
  290. "description": "Required to be true for the API request to pass",
  291. "required": true,
  292. "schema": {
  293. "type": "boolean",
  294. "default": true
  295. }
  296. }
  297. ],
  298. "responses": {
  299. "200": {
  300. "description": "Widget items returned",
  301. "content": {
  302. "application/json": {
  303. "schema": {
  304. "type": "object",
  305. "required": [
  306. "ocs"
  307. ],
  308. "properties": {
  309. "ocs": {
  310. "type": "object",
  311. "required": [
  312. "meta",
  313. "data"
  314. ],
  315. "properties": {
  316. "meta": {
  317. "$ref": "#/components/schemas/OCSMeta"
  318. },
  319. "data": {
  320. "type": "object",
  321. "additionalProperties": {
  322. "type": "array",
  323. "items": {
  324. "$ref": "#/components/schemas/WidgetItem"
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. }
  337. },
  338. "/ocs/v2.php/apps/dashboard/api/v2/widget-items": {
  339. "get": {
  340. "operationId": "dashboard_api-get-widget-items-v2",
  341. "summary": "Get the items for the widgets",
  342. "tags": [
  343. "dashboard_api"
  344. ],
  345. "security": [
  346. {
  347. "bearer_auth": []
  348. },
  349. {
  350. "basic_auth": []
  351. }
  352. ],
  353. "parameters": [
  354. {
  355. "name": "sinceIds",
  356. "in": "query",
  357. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  358. "schema": {
  359. "type": "string"
  360. }
  361. },
  362. {
  363. "name": "limit",
  364. "in": "query",
  365. "description": "Limit number of result items per widget, not more than 30 are allowed",
  366. "schema": {
  367. "type": "integer",
  368. "format": "int64",
  369. "default": 7,
  370. "minimum": 1,
  371. "maximum": 30
  372. }
  373. },
  374. {
  375. "name": "widgets[]",
  376. "in": "query",
  377. "description": "Limit results to specific widgets",
  378. "schema": {
  379. "type": "array",
  380. "default": [],
  381. "items": {
  382. "type": "string"
  383. }
  384. }
  385. },
  386. {
  387. "name": "OCS-APIRequest",
  388. "in": "header",
  389. "description": "Required to be true for the API request to pass",
  390. "required": true,
  391. "schema": {
  392. "type": "boolean",
  393. "default": true
  394. }
  395. }
  396. ],
  397. "responses": {
  398. "200": {
  399. "description": "Widget items returned",
  400. "content": {
  401. "application/json": {
  402. "schema": {
  403. "type": "object",
  404. "required": [
  405. "ocs"
  406. ],
  407. "properties": {
  408. "ocs": {
  409. "type": "object",
  410. "required": [
  411. "meta",
  412. "data"
  413. ],
  414. "properties": {
  415. "meta": {
  416. "$ref": "#/components/schemas/OCSMeta"
  417. },
  418. "data": {
  419. "type": "object",
  420. "additionalProperties": {
  421. "$ref": "#/components/schemas/WidgetItems"
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. }
  434. },
  435. "tags": []
  436. }