1
0

openapi.json 31 KB

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