openapi.json 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  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. "parameters": [
  520. {
  521. "name": "layout[]",
  522. "in": "query",
  523. "description": "The new layout",
  524. "required": true,
  525. "schema": {
  526. "type": "array",
  527. "items": {
  528. "type": "string"
  529. }
  530. }
  531. },
  532. {
  533. "name": "OCS-APIRequest",
  534. "in": "header",
  535. "description": "Required to be true for the API request to pass",
  536. "required": true,
  537. "schema": {
  538. "type": "boolean",
  539. "default": true
  540. }
  541. }
  542. ],
  543. "responses": {
  544. "200": {
  545. "description": "Statuses updated successfully",
  546. "content": {
  547. "application/json": {
  548. "schema": {
  549. "type": "object",
  550. "required": [
  551. "ocs"
  552. ],
  553. "properties": {
  554. "ocs": {
  555. "type": "object",
  556. "required": [
  557. "meta",
  558. "data"
  559. ],
  560. "properties": {
  561. "meta": {
  562. "$ref": "#/components/schemas/OCSMeta"
  563. },
  564. "data": {
  565. "type": "object",
  566. "required": [
  567. "layout"
  568. ],
  569. "properties": {
  570. "layout": {
  571. "type": "array",
  572. "items": {
  573. "type": "string"
  574. }
  575. }
  576. }
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. }
  584. }
  585. }
  586. }
  587. },
  588. "/ocs/v2.php/apps/dashboard/api/v3/statuses": {
  589. "get": {
  590. "operationId": "dashboard_api-get-statuses",
  591. "summary": "Get the statuses",
  592. "tags": [
  593. "dashboard_api"
  594. ],
  595. "security": [
  596. {
  597. "bearer_auth": []
  598. },
  599. {
  600. "basic_auth": []
  601. }
  602. ],
  603. "parameters": [
  604. {
  605. "name": "OCS-APIRequest",
  606. "in": "header",
  607. "description": "Required to be true for the API request to pass",
  608. "required": true,
  609. "schema": {
  610. "type": "boolean",
  611. "default": true
  612. }
  613. }
  614. ],
  615. "responses": {
  616. "200": {
  617. "description": "Statuses returned",
  618. "content": {
  619. "application/json": {
  620. "schema": {
  621. "type": "object",
  622. "required": [
  623. "ocs"
  624. ],
  625. "properties": {
  626. "ocs": {
  627. "type": "object",
  628. "required": [
  629. "meta",
  630. "data"
  631. ],
  632. "properties": {
  633. "meta": {
  634. "$ref": "#/components/schemas/OCSMeta"
  635. },
  636. "data": {
  637. "type": "object",
  638. "required": [
  639. "statuses"
  640. ],
  641. "properties": {
  642. "statuses": {
  643. "type": "array",
  644. "items": {
  645. "type": "string"
  646. }
  647. }
  648. }
  649. }
  650. }
  651. }
  652. }
  653. }
  654. }
  655. }
  656. }
  657. }
  658. },
  659. "post": {
  660. "operationId": "dashboard_api-update-statuses",
  661. "summary": "Update the statuses",
  662. "tags": [
  663. "dashboard_api"
  664. ],
  665. "security": [
  666. {
  667. "bearer_auth": []
  668. },
  669. {
  670. "basic_auth": []
  671. }
  672. ],
  673. "parameters": [
  674. {
  675. "name": "statuses[]",
  676. "in": "query",
  677. "description": "The new statuses",
  678. "required": true,
  679. "schema": {
  680. "type": "array",
  681. "items": {
  682. "type": "string"
  683. }
  684. }
  685. },
  686. {
  687. "name": "OCS-APIRequest",
  688. "in": "header",
  689. "description": "Required to be true for the API request to pass",
  690. "required": true,
  691. "schema": {
  692. "type": "boolean",
  693. "default": true
  694. }
  695. }
  696. ],
  697. "responses": {
  698. "200": {
  699. "description": "Statuses updated successfully",
  700. "content": {
  701. "application/json": {
  702. "schema": {
  703. "type": "object",
  704. "required": [
  705. "ocs"
  706. ],
  707. "properties": {
  708. "ocs": {
  709. "type": "object",
  710. "required": [
  711. "meta",
  712. "data"
  713. ],
  714. "properties": {
  715. "meta": {
  716. "$ref": "#/components/schemas/OCSMeta"
  717. },
  718. "data": {
  719. "type": "object",
  720. "required": [
  721. "statuses"
  722. ],
  723. "properties": {
  724. "statuses": {
  725. "type": "array",
  726. "items": {
  727. "type": "string"
  728. }
  729. }
  730. }
  731. }
  732. }
  733. }
  734. }
  735. }
  736. }
  737. }
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "tags": []
  744. }