openapi.json 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  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/widget-items": {
  176. "get": {
  177. "operationId": "dashboard_api-get-widget-items",
  178. "summary": "Get the items for 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": "sinceIds",
  193. "in": "query",
  194. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  195. "schema": {
  196. "type": "string"
  197. }
  198. },
  199. {
  200. "name": "limit",
  201. "in": "query",
  202. "description": "Limit number of result items per widget",
  203. "schema": {
  204. "type": "integer",
  205. "format": "int64",
  206. "default": 7,
  207. "minimum": 1,
  208. "maximum": 30
  209. }
  210. },
  211. {
  212. "name": "widgets[]",
  213. "in": "query",
  214. "description": "Limit results to specific widgets",
  215. "schema": {
  216. "type": "array",
  217. "default": [],
  218. "items": {
  219. "type": "string"
  220. }
  221. }
  222. },
  223. {
  224. "name": "OCS-APIRequest",
  225. "in": "header",
  226. "description": "Required to be true for the API request to pass",
  227. "required": true,
  228. "schema": {
  229. "type": "boolean",
  230. "default": true
  231. }
  232. }
  233. ],
  234. "responses": {
  235. "200": {
  236. "description": "Widget items returned",
  237. "content": {
  238. "application/json": {
  239. "schema": {
  240. "type": "object",
  241. "required": [
  242. "ocs"
  243. ],
  244. "properties": {
  245. "ocs": {
  246. "type": "object",
  247. "required": [
  248. "meta",
  249. "data"
  250. ],
  251. "properties": {
  252. "meta": {
  253. "$ref": "#/components/schemas/OCSMeta"
  254. },
  255. "data": {
  256. "type": "object",
  257. "additionalProperties": {
  258. "type": "array",
  259. "items": {
  260. "$ref": "#/components/schemas/WidgetItem"
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "/ocs/v2.php/apps/dashboard/api/v2/widget-items": {
  275. "get": {
  276. "operationId": "dashboard_api-get-widget-items-v2",
  277. "summary": "Get the items for the widgets",
  278. "tags": [
  279. "dashboard_api"
  280. ],
  281. "security": [
  282. {
  283. "bearer_auth": []
  284. },
  285. {
  286. "basic_auth": []
  287. }
  288. ],
  289. "parameters": [
  290. {
  291. "name": "sinceIds",
  292. "in": "query",
  293. "description": "Array indexed by widget Ids, contains date/id from which we want the new items",
  294. "schema": {
  295. "type": "string"
  296. }
  297. },
  298. {
  299. "name": "limit",
  300. "in": "query",
  301. "description": "Limit number of result items per widget, not more than 30 are allowed",
  302. "schema": {
  303. "type": "integer",
  304. "format": "int64",
  305. "default": 7,
  306. "minimum": 1,
  307. "maximum": 30
  308. }
  309. },
  310. {
  311. "name": "widgets[]",
  312. "in": "query",
  313. "description": "Limit results to specific widgets",
  314. "schema": {
  315. "type": "array",
  316. "default": [],
  317. "items": {
  318. "type": "string"
  319. }
  320. }
  321. },
  322. {
  323. "name": "OCS-APIRequest",
  324. "in": "header",
  325. "description": "Required to be true for the API request to pass",
  326. "required": true,
  327. "schema": {
  328. "type": "boolean",
  329. "default": true
  330. }
  331. }
  332. ],
  333. "responses": {
  334. "200": {
  335. "description": "Widget items returned",
  336. "content": {
  337. "application/json": {
  338. "schema": {
  339. "type": "object",
  340. "required": [
  341. "ocs"
  342. ],
  343. "properties": {
  344. "ocs": {
  345. "type": "object",
  346. "required": [
  347. "meta",
  348. "data"
  349. ],
  350. "properties": {
  351. "meta": {
  352. "$ref": "#/components/schemas/OCSMeta"
  353. },
  354. "data": {
  355. "type": "object",
  356. "additionalProperties": {
  357. "$ref": "#/components/schemas/WidgetItems"
  358. }
  359. }
  360. }
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "/ocs/v2.php/apps/dashboard/api/v1/widgets": {
  371. "get": {
  372. "operationId": "dashboard_api-get-widgets",
  373. "summary": "Get the widgets",
  374. "tags": [
  375. "dashboard_api"
  376. ],
  377. "security": [
  378. {
  379. "bearer_auth": []
  380. },
  381. {
  382. "basic_auth": []
  383. }
  384. ],
  385. "parameters": [
  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": "Widgets 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/Widget"
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. },
  434. "/ocs/v2.php/apps/dashboard/api/v3/layout": {
  435. "get": {
  436. "operationId": "dashboard_api-get-layout",
  437. "summary": "Get the layout",
  438. "tags": [
  439. "dashboard_api"
  440. ],
  441. "security": [
  442. {
  443. "bearer_auth": []
  444. },
  445. {
  446. "basic_auth": []
  447. }
  448. ],
  449. "parameters": [
  450. {
  451. "name": "OCS-APIRequest",
  452. "in": "header",
  453. "description": "Required to be true for the API request to pass",
  454. "required": true,
  455. "schema": {
  456. "type": "boolean",
  457. "default": true
  458. }
  459. }
  460. ],
  461. "responses": {
  462. "200": {
  463. "description": "Layout returned",
  464. "content": {
  465. "application/json": {
  466. "schema": {
  467. "type": "object",
  468. "required": [
  469. "ocs"
  470. ],
  471. "properties": {
  472. "ocs": {
  473. "type": "object",
  474. "required": [
  475. "meta",
  476. "data"
  477. ],
  478. "properties": {
  479. "meta": {
  480. "$ref": "#/components/schemas/OCSMeta"
  481. },
  482. "data": {
  483. "type": "object",
  484. "required": [
  485. "layout"
  486. ],
  487. "properties": {
  488. "layout": {
  489. "type": "array",
  490. "items": {
  491. "type": "string"
  492. }
  493. }
  494. }
  495. }
  496. }
  497. }
  498. }
  499. }
  500. }
  501. }
  502. }
  503. }
  504. },
  505. "post": {
  506. "operationId": "dashboard_api-update-layout",
  507. "summary": "Update the layout",
  508. "tags": [
  509. "dashboard_api"
  510. ],
  511. "security": [
  512. {
  513. "bearer_auth": []
  514. },
  515. {
  516. "basic_auth": []
  517. }
  518. ],
  519. "requestBody": {
  520. "required": true,
  521. "content": {
  522. "application/json": {
  523. "schema": {
  524. "type": "object",
  525. "required": [
  526. "layout"
  527. ],
  528. "properties": {
  529. "layout": {
  530. "type": "array",
  531. "description": "The new layout",
  532. "items": {
  533. "type": "string"
  534. }
  535. }
  536. }
  537. }
  538. }
  539. }
  540. },
  541. "parameters": [
  542. {
  543. "name": "OCS-APIRequest",
  544. "in": "header",
  545. "description": "Required to be true for the API request to pass",
  546. "required": true,
  547. "schema": {
  548. "type": "boolean",
  549. "default": true
  550. }
  551. }
  552. ],
  553. "responses": {
  554. "200": {
  555. "description": "Statuses updated successfully",
  556. "content": {
  557. "application/json": {
  558. "schema": {
  559. "type": "object",
  560. "required": [
  561. "ocs"
  562. ],
  563. "properties": {
  564. "ocs": {
  565. "type": "object",
  566. "required": [
  567. "meta",
  568. "data"
  569. ],
  570. "properties": {
  571. "meta": {
  572. "$ref": "#/components/schemas/OCSMeta"
  573. },
  574. "data": {
  575. "type": "object",
  576. "required": [
  577. "layout"
  578. ],
  579. "properties": {
  580. "layout": {
  581. "type": "array",
  582. "items": {
  583. "type": "string"
  584. }
  585. }
  586. }
  587. }
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }
  594. }
  595. }
  596. }
  597. },
  598. "/ocs/v2.php/apps/dashboard/api/v3/statuses": {
  599. "get": {
  600. "operationId": "dashboard_api-get-statuses",
  601. "summary": "Get the statuses",
  602. "tags": [
  603. "dashboard_api"
  604. ],
  605. "security": [
  606. {
  607. "bearer_auth": []
  608. },
  609. {
  610. "basic_auth": []
  611. }
  612. ],
  613. "parameters": [
  614. {
  615. "name": "OCS-APIRequest",
  616. "in": "header",
  617. "description": "Required to be true for the API request to pass",
  618. "required": true,
  619. "schema": {
  620. "type": "boolean",
  621. "default": true
  622. }
  623. }
  624. ],
  625. "responses": {
  626. "200": {
  627. "description": "Statuses returned",
  628. "content": {
  629. "application/json": {
  630. "schema": {
  631. "type": "object",
  632. "required": [
  633. "ocs"
  634. ],
  635. "properties": {
  636. "ocs": {
  637. "type": "object",
  638. "required": [
  639. "meta",
  640. "data"
  641. ],
  642. "properties": {
  643. "meta": {
  644. "$ref": "#/components/schemas/OCSMeta"
  645. },
  646. "data": {
  647. "type": "object",
  648. "required": [
  649. "statuses"
  650. ],
  651. "properties": {
  652. "statuses": {
  653. "type": "array",
  654. "items": {
  655. "type": "string"
  656. }
  657. }
  658. }
  659. }
  660. }
  661. }
  662. }
  663. }
  664. }
  665. }
  666. }
  667. }
  668. },
  669. "post": {
  670. "operationId": "dashboard_api-update-statuses",
  671. "summary": "Update the statuses",
  672. "tags": [
  673. "dashboard_api"
  674. ],
  675. "security": [
  676. {
  677. "bearer_auth": []
  678. },
  679. {
  680. "basic_auth": []
  681. }
  682. ],
  683. "requestBody": {
  684. "required": true,
  685. "content": {
  686. "application/json": {
  687. "schema": {
  688. "type": "object",
  689. "required": [
  690. "statuses"
  691. ],
  692. "properties": {
  693. "statuses": {
  694. "type": "array",
  695. "description": "The new statuses",
  696. "items": {
  697. "type": "string"
  698. }
  699. }
  700. }
  701. }
  702. }
  703. }
  704. },
  705. "parameters": [
  706. {
  707. "name": "OCS-APIRequest",
  708. "in": "header",
  709. "description": "Required to be true for the API request to pass",
  710. "required": true,
  711. "schema": {
  712. "type": "boolean",
  713. "default": true
  714. }
  715. }
  716. ],
  717. "responses": {
  718. "200": {
  719. "description": "Statuses updated successfully",
  720. "content": {
  721. "application/json": {
  722. "schema": {
  723. "type": "object",
  724. "required": [
  725. "ocs"
  726. ],
  727. "properties": {
  728. "ocs": {
  729. "type": "object",
  730. "required": [
  731. "meta",
  732. "data"
  733. ],
  734. "properties": {
  735. "meta": {
  736. "$ref": "#/components/schemas/OCSMeta"
  737. },
  738. "data": {
  739. "type": "object",
  740. "required": [
  741. "statuses"
  742. ],
  743. "properties": {
  744. "statuses": {
  745. "type": "array",
  746. "items": {
  747. "type": "string"
  748. }
  749. }
  750. }
  751. }
  752. }
  753. }
  754. }
  755. }
  756. }
  757. }
  758. }
  759. }
  760. }
  761. }
  762. },
  763. "tags": []
  764. }