openapi.json 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "user_status",
  5. "version": "0.0.1",
  6. "description": "User status",
  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. "Capabilities": {
  24. "type": "object",
  25. "required": [
  26. "user_status"
  27. ],
  28. "properties": {
  29. "user_status": {
  30. "type": "object",
  31. "required": [
  32. "enabled",
  33. "restore",
  34. "supports_emoji"
  35. ],
  36. "properties": {
  37. "enabled": {
  38. "type": "boolean"
  39. },
  40. "restore": {
  41. "type": "boolean"
  42. },
  43. "supports_emoji": {
  44. "type": "boolean"
  45. }
  46. }
  47. }
  48. }
  49. },
  50. "ClearAt": {
  51. "type": "object",
  52. "required": [
  53. "type",
  54. "time"
  55. ],
  56. "properties": {
  57. "type": {
  58. "type": "string",
  59. "enum": [
  60. "period",
  61. "end-of"
  62. ]
  63. },
  64. "time": {
  65. "anyOf": [
  66. {
  67. "type": "integer",
  68. "format": "int64"
  69. },
  70. {
  71. "$ref": "#/components/schemas/ClearAtTimeType"
  72. }
  73. ]
  74. }
  75. }
  76. },
  77. "ClearAtTimeType": {
  78. "type": "string",
  79. "enum": [
  80. "day",
  81. "week"
  82. ]
  83. },
  84. "OCSMeta": {
  85. "type": "object",
  86. "required": [
  87. "status",
  88. "statuscode"
  89. ],
  90. "properties": {
  91. "status": {
  92. "type": "string"
  93. },
  94. "statuscode": {
  95. "type": "integer"
  96. },
  97. "message": {
  98. "type": "string"
  99. },
  100. "totalitems": {
  101. "type": "string"
  102. },
  103. "itemsperpage": {
  104. "type": "string"
  105. }
  106. }
  107. },
  108. "Predefined": {
  109. "type": "object",
  110. "required": [
  111. "id",
  112. "icon",
  113. "message",
  114. "clearAt",
  115. "visible"
  116. ],
  117. "properties": {
  118. "id": {
  119. "type": "string"
  120. },
  121. "icon": {
  122. "type": "string"
  123. },
  124. "message": {
  125. "type": "string"
  126. },
  127. "clearAt": {
  128. "$ref": "#/components/schemas/ClearAt",
  129. "nullable": true
  130. },
  131. "visible": {
  132. "type": "boolean",
  133. "nullable": true
  134. }
  135. }
  136. },
  137. "Private": {
  138. "allOf": [
  139. {
  140. "$ref": "#/components/schemas/Public"
  141. },
  142. {
  143. "type": "object",
  144. "required": [
  145. "messageId",
  146. "messageIsPredefined",
  147. "statusIsUserDefined"
  148. ],
  149. "properties": {
  150. "messageId": {
  151. "type": "string",
  152. "nullable": true
  153. },
  154. "messageIsPredefined": {
  155. "type": "boolean"
  156. },
  157. "statusIsUserDefined": {
  158. "type": "boolean"
  159. }
  160. }
  161. }
  162. ]
  163. },
  164. "Public": {
  165. "type": "object",
  166. "required": [
  167. "userId",
  168. "message",
  169. "icon",
  170. "clearAt",
  171. "status"
  172. ],
  173. "properties": {
  174. "userId": {
  175. "type": "string"
  176. },
  177. "message": {
  178. "type": "string",
  179. "nullable": true
  180. },
  181. "icon": {
  182. "type": "string",
  183. "nullable": true
  184. },
  185. "clearAt": {
  186. "type": "integer",
  187. "format": "int64",
  188. "nullable": true
  189. },
  190. "status": {
  191. "$ref": "#/components/schemas/Type"
  192. }
  193. }
  194. },
  195. "Type": {
  196. "type": "string",
  197. "enum": [
  198. "online",
  199. "away",
  200. "dnd",
  201. "busy",
  202. "offline",
  203. "invisible"
  204. ]
  205. }
  206. }
  207. },
  208. "paths": {
  209. "/ocs/v2.php/apps/user_status/api/v1/heartbeat": {
  210. "put": {
  211. "operationId": "heartbeat-heartbeat",
  212. "summary": "Keep the status alive",
  213. "tags": [
  214. "heartbeat"
  215. ],
  216. "security": [
  217. {
  218. "bearer_auth": []
  219. },
  220. {
  221. "basic_auth": []
  222. }
  223. ],
  224. "parameters": [
  225. {
  226. "name": "status",
  227. "in": "query",
  228. "description": "Only online, away",
  229. "required": true,
  230. "schema": {
  231. "type": "string"
  232. }
  233. },
  234. {
  235. "name": "OCS-APIRequest",
  236. "in": "header",
  237. "description": "Required to be true for the API request to pass",
  238. "required": true,
  239. "schema": {
  240. "type": "boolean",
  241. "default": true
  242. }
  243. }
  244. ],
  245. "responses": {
  246. "200": {
  247. "description": "Status successfully updated",
  248. "content": {
  249. "application/json": {
  250. "schema": {
  251. "type": "object",
  252. "required": [
  253. "ocs"
  254. ],
  255. "properties": {
  256. "ocs": {
  257. "type": "object",
  258. "required": [
  259. "meta",
  260. "data"
  261. ],
  262. "properties": {
  263. "meta": {
  264. "$ref": "#/components/schemas/OCSMeta"
  265. },
  266. "data": {
  267. "$ref": "#/components/schemas/Private"
  268. }
  269. }
  270. }
  271. }
  272. }
  273. }
  274. }
  275. },
  276. "400": {
  277. "description": "Invalid status to update",
  278. "content": {
  279. "application/json": {
  280. "schema": {
  281. "type": "object",
  282. "required": [
  283. "ocs"
  284. ],
  285. "properties": {
  286. "ocs": {
  287. "type": "object",
  288. "required": [
  289. "meta",
  290. "data"
  291. ],
  292. "properties": {
  293. "meta": {
  294. "$ref": "#/components/schemas/OCSMeta"
  295. },
  296. "data": {}
  297. }
  298. }
  299. }
  300. }
  301. }
  302. }
  303. },
  304. "500": {
  305. "description": "",
  306. "content": {
  307. "application/json": {
  308. "schema": {
  309. "type": "object",
  310. "required": [
  311. "ocs"
  312. ],
  313. "properties": {
  314. "ocs": {
  315. "type": "object",
  316. "required": [
  317. "meta",
  318. "data"
  319. ],
  320. "properties": {
  321. "meta": {
  322. "$ref": "#/components/schemas/OCSMeta"
  323. },
  324. "data": {}
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. },
  332. "204": {
  333. "description": "User has no status to keep alive"
  334. }
  335. }
  336. }
  337. },
  338. "/ocs/v2.php/apps/user_status/api/v1/predefined_statuses": {
  339. "get": {
  340. "operationId": "predefined_status-find-all",
  341. "summary": "Get all predefined messages",
  342. "tags": [
  343. "predefined_status"
  344. ],
  345. "security": [
  346. {
  347. "bearer_auth": []
  348. },
  349. {
  350. "basic_auth": []
  351. }
  352. ],
  353. "parameters": [
  354. {
  355. "name": "OCS-APIRequest",
  356. "in": "header",
  357. "description": "Required to be true for the API request to pass",
  358. "required": true,
  359. "schema": {
  360. "type": "boolean",
  361. "default": true
  362. }
  363. }
  364. ],
  365. "responses": {
  366. "200": {
  367. "description": "Predefined statuses returned",
  368. "content": {
  369. "application/json": {
  370. "schema": {
  371. "type": "object",
  372. "required": [
  373. "ocs"
  374. ],
  375. "properties": {
  376. "ocs": {
  377. "type": "object",
  378. "required": [
  379. "meta",
  380. "data"
  381. ],
  382. "properties": {
  383. "meta": {
  384. "$ref": "#/components/schemas/OCSMeta"
  385. },
  386. "data": {
  387. "type": "array",
  388. "items": {
  389. "$ref": "#/components/schemas/Predefined"
  390. }
  391. }
  392. }
  393. }
  394. }
  395. }
  396. }
  397. }
  398. }
  399. }
  400. }
  401. },
  402. "/ocs/v2.php/apps/user_status/api/v1/statuses": {
  403. "get": {
  404. "operationId": "statuses-find-all",
  405. "summary": "Find statuses of users",
  406. "tags": [
  407. "statuses"
  408. ],
  409. "security": [
  410. {
  411. "bearer_auth": []
  412. },
  413. {
  414. "basic_auth": []
  415. }
  416. ],
  417. "parameters": [
  418. {
  419. "name": "limit",
  420. "in": "query",
  421. "description": "Maximum number of statuses to find",
  422. "schema": {
  423. "type": "integer",
  424. "format": "int64",
  425. "nullable": true
  426. }
  427. },
  428. {
  429. "name": "offset",
  430. "in": "query",
  431. "description": "Offset for finding statuses",
  432. "schema": {
  433. "type": "integer",
  434. "format": "int64",
  435. "nullable": true
  436. }
  437. },
  438. {
  439. "name": "OCS-APIRequest",
  440. "in": "header",
  441. "description": "Required to be true for the API request to pass",
  442. "required": true,
  443. "schema": {
  444. "type": "boolean",
  445. "default": true
  446. }
  447. }
  448. ],
  449. "responses": {
  450. "200": {
  451. "description": "Statuses returned",
  452. "content": {
  453. "application/json": {
  454. "schema": {
  455. "type": "object",
  456. "required": [
  457. "ocs"
  458. ],
  459. "properties": {
  460. "ocs": {
  461. "type": "object",
  462. "required": [
  463. "meta",
  464. "data"
  465. ],
  466. "properties": {
  467. "meta": {
  468. "$ref": "#/components/schemas/OCSMeta"
  469. },
  470. "data": {
  471. "type": "array",
  472. "items": {
  473. "$ref": "#/components/schemas/Public"
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. }
  481. }
  482. }
  483. }
  484. }
  485. },
  486. "/ocs/v2.php/apps/user_status/api/v1/statuses/{userId}": {
  487. "get": {
  488. "operationId": "statuses-find",
  489. "summary": "Find the status of a user",
  490. "tags": [
  491. "statuses"
  492. ],
  493. "security": [
  494. {
  495. "bearer_auth": []
  496. },
  497. {
  498. "basic_auth": []
  499. }
  500. ],
  501. "parameters": [
  502. {
  503. "name": "userId",
  504. "in": "path",
  505. "description": "ID of the user",
  506. "required": true,
  507. "schema": {
  508. "type": "string"
  509. }
  510. },
  511. {
  512. "name": "OCS-APIRequest",
  513. "in": "header",
  514. "description": "Required to be true for the API request to pass",
  515. "required": true,
  516. "schema": {
  517. "type": "boolean",
  518. "default": true
  519. }
  520. }
  521. ],
  522. "responses": {
  523. "200": {
  524. "description": "Status returned",
  525. "content": {
  526. "application/json": {
  527. "schema": {
  528. "type": "object",
  529. "required": [
  530. "ocs"
  531. ],
  532. "properties": {
  533. "ocs": {
  534. "type": "object",
  535. "required": [
  536. "meta",
  537. "data"
  538. ],
  539. "properties": {
  540. "meta": {
  541. "$ref": "#/components/schemas/OCSMeta"
  542. },
  543. "data": {
  544. "$ref": "#/components/schemas/Public"
  545. }
  546. }
  547. }
  548. }
  549. }
  550. }
  551. }
  552. },
  553. "404": {
  554. "description": "The user was not found",
  555. "content": {
  556. "application/json": {
  557. "schema": {
  558. "type": "object",
  559. "required": [
  560. "ocs"
  561. ],
  562. "properties": {
  563. "ocs": {
  564. "type": "object",
  565. "required": [
  566. "meta",
  567. "data"
  568. ],
  569. "properties": {
  570. "meta": {
  571. "$ref": "#/components/schemas/OCSMeta"
  572. },
  573. "data": {}
  574. }
  575. }
  576. }
  577. }
  578. }
  579. }
  580. }
  581. }
  582. }
  583. },
  584. "/ocs/v2.php/apps/user_status/api/v1/user_status": {
  585. "get": {
  586. "operationId": "user_status-get-status",
  587. "summary": "Get the status of the current user",
  588. "tags": [
  589. "user_status"
  590. ],
  591. "security": [
  592. {
  593. "bearer_auth": []
  594. },
  595. {
  596. "basic_auth": []
  597. }
  598. ],
  599. "parameters": [
  600. {
  601. "name": "OCS-APIRequest",
  602. "in": "header",
  603. "description": "Required to be true for the API request to pass",
  604. "required": true,
  605. "schema": {
  606. "type": "boolean",
  607. "default": true
  608. }
  609. }
  610. ],
  611. "responses": {
  612. "200": {
  613. "description": "The status was found successfully",
  614. "content": {
  615. "application/json": {
  616. "schema": {
  617. "type": "object",
  618. "required": [
  619. "ocs"
  620. ],
  621. "properties": {
  622. "ocs": {
  623. "type": "object",
  624. "required": [
  625. "meta",
  626. "data"
  627. ],
  628. "properties": {
  629. "meta": {
  630. "$ref": "#/components/schemas/OCSMeta"
  631. },
  632. "data": {
  633. "$ref": "#/components/schemas/Private"
  634. }
  635. }
  636. }
  637. }
  638. }
  639. }
  640. }
  641. },
  642. "404": {
  643. "description": "The user was not found",
  644. "content": {
  645. "application/json": {
  646. "schema": {
  647. "type": "object",
  648. "required": [
  649. "ocs"
  650. ],
  651. "properties": {
  652. "ocs": {
  653. "type": "object",
  654. "required": [
  655. "meta",
  656. "data"
  657. ],
  658. "properties": {
  659. "meta": {
  660. "$ref": "#/components/schemas/OCSMeta"
  661. },
  662. "data": {}
  663. }
  664. }
  665. }
  666. }
  667. }
  668. }
  669. }
  670. }
  671. }
  672. },
  673. "/ocs/v2.php/apps/user_status/api/v1/user_status/status": {
  674. "put": {
  675. "operationId": "user_status-set-status",
  676. "summary": "Update the status type of the current user",
  677. "tags": [
  678. "user_status"
  679. ],
  680. "security": [
  681. {
  682. "bearer_auth": []
  683. },
  684. {
  685. "basic_auth": []
  686. }
  687. ],
  688. "parameters": [
  689. {
  690. "name": "statusType",
  691. "in": "query",
  692. "description": "The new status type",
  693. "required": true,
  694. "schema": {
  695. "type": "string"
  696. }
  697. },
  698. {
  699. "name": "OCS-APIRequest",
  700. "in": "header",
  701. "description": "Required to be true for the API request to pass",
  702. "required": true,
  703. "schema": {
  704. "type": "boolean",
  705. "default": true
  706. }
  707. }
  708. ],
  709. "responses": {
  710. "200": {
  711. "description": "The status was updated successfully",
  712. "content": {
  713. "application/json": {
  714. "schema": {
  715. "type": "object",
  716. "required": [
  717. "ocs"
  718. ],
  719. "properties": {
  720. "ocs": {
  721. "type": "object",
  722. "required": [
  723. "meta",
  724. "data"
  725. ],
  726. "properties": {
  727. "meta": {
  728. "$ref": "#/components/schemas/OCSMeta"
  729. },
  730. "data": {
  731. "$ref": "#/components/schemas/Private"
  732. }
  733. }
  734. }
  735. }
  736. }
  737. }
  738. }
  739. },
  740. "400": {
  741. "description": "The status type is invalid",
  742. "content": {
  743. "application/json": {
  744. "schema": {
  745. "type": "object",
  746. "required": [
  747. "ocs"
  748. ],
  749. "properties": {
  750. "ocs": {
  751. "type": "object",
  752. "required": [
  753. "meta",
  754. "data"
  755. ],
  756. "properties": {
  757. "meta": {
  758. "$ref": "#/components/schemas/OCSMeta"
  759. },
  760. "data": {}
  761. }
  762. }
  763. }
  764. }
  765. }
  766. }
  767. }
  768. }
  769. }
  770. },
  771. "/ocs/v2.php/apps/user_status/api/v1/user_status/message/predefined": {
  772. "put": {
  773. "operationId": "user_status-set-predefined-message",
  774. "summary": "Set the message to a predefined message for the current user",
  775. "tags": [
  776. "user_status"
  777. ],
  778. "security": [
  779. {
  780. "bearer_auth": []
  781. },
  782. {
  783. "basic_auth": []
  784. }
  785. ],
  786. "parameters": [
  787. {
  788. "name": "messageId",
  789. "in": "query",
  790. "description": "ID of the predefined message",
  791. "required": true,
  792. "schema": {
  793. "type": "string"
  794. }
  795. },
  796. {
  797. "name": "clearAt",
  798. "in": "query",
  799. "description": "When the message should be cleared",
  800. "schema": {
  801. "type": "integer",
  802. "format": "int64",
  803. "nullable": true
  804. }
  805. },
  806. {
  807. "name": "OCS-APIRequest",
  808. "in": "header",
  809. "description": "Required to be true for the API request to pass",
  810. "required": true,
  811. "schema": {
  812. "type": "boolean",
  813. "default": true
  814. }
  815. }
  816. ],
  817. "responses": {
  818. "200": {
  819. "description": "The message was updated successfully",
  820. "content": {
  821. "application/json": {
  822. "schema": {
  823. "type": "object",
  824. "required": [
  825. "ocs"
  826. ],
  827. "properties": {
  828. "ocs": {
  829. "type": "object",
  830. "required": [
  831. "meta",
  832. "data"
  833. ],
  834. "properties": {
  835. "meta": {
  836. "$ref": "#/components/schemas/OCSMeta"
  837. },
  838. "data": {
  839. "$ref": "#/components/schemas/Private"
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. }
  847. },
  848. "400": {
  849. "description": "The clearAt or message-id is invalid",
  850. "content": {
  851. "application/json": {
  852. "schema": {
  853. "type": "object",
  854. "required": [
  855. "ocs"
  856. ],
  857. "properties": {
  858. "ocs": {
  859. "type": "object",
  860. "required": [
  861. "meta",
  862. "data"
  863. ],
  864. "properties": {
  865. "meta": {
  866. "$ref": "#/components/schemas/OCSMeta"
  867. },
  868. "data": {}
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. }
  877. }
  878. },
  879. "/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom": {
  880. "put": {
  881. "operationId": "user_status-set-custom-message",
  882. "summary": "Set the message to a custom message for the current user",
  883. "tags": [
  884. "user_status"
  885. ],
  886. "security": [
  887. {
  888. "bearer_auth": []
  889. },
  890. {
  891. "basic_auth": []
  892. }
  893. ],
  894. "parameters": [
  895. {
  896. "name": "statusIcon",
  897. "in": "query",
  898. "description": "Icon of the status",
  899. "schema": {
  900. "type": "string",
  901. "nullable": true
  902. }
  903. },
  904. {
  905. "name": "message",
  906. "in": "query",
  907. "description": "Message of the status",
  908. "schema": {
  909. "type": "string",
  910. "nullable": true
  911. }
  912. },
  913. {
  914. "name": "clearAt",
  915. "in": "query",
  916. "description": "When the message should be cleared",
  917. "schema": {
  918. "type": "integer",
  919. "format": "int64",
  920. "nullable": true
  921. }
  922. },
  923. {
  924. "name": "OCS-APIRequest",
  925. "in": "header",
  926. "description": "Required to be true for the API request to pass",
  927. "required": true,
  928. "schema": {
  929. "type": "boolean",
  930. "default": true
  931. }
  932. }
  933. ],
  934. "responses": {
  935. "200": {
  936. "description": "The message was updated successfully",
  937. "content": {
  938. "application/json": {
  939. "schema": {
  940. "type": "object",
  941. "required": [
  942. "ocs"
  943. ],
  944. "properties": {
  945. "ocs": {
  946. "type": "object",
  947. "required": [
  948. "meta",
  949. "data"
  950. ],
  951. "properties": {
  952. "meta": {
  953. "$ref": "#/components/schemas/OCSMeta"
  954. },
  955. "data": {
  956. "$ref": "#/components/schemas/Private"
  957. }
  958. }
  959. }
  960. }
  961. }
  962. }
  963. }
  964. },
  965. "400": {
  966. "description": "The clearAt or icon is invalid or the message is too long",
  967. "content": {
  968. "application/json": {
  969. "schema": {
  970. "type": "object",
  971. "required": [
  972. "ocs"
  973. ],
  974. "properties": {
  975. "ocs": {
  976. "type": "object",
  977. "required": [
  978. "meta",
  979. "data"
  980. ],
  981. "properties": {
  982. "meta": {
  983. "$ref": "#/components/schemas/OCSMeta"
  984. },
  985. "data": {}
  986. }
  987. }
  988. }
  989. }
  990. }
  991. }
  992. }
  993. }
  994. }
  995. },
  996. "/ocs/v2.php/apps/user_status/api/v1/user_status/message": {
  997. "delete": {
  998. "operationId": "user_status-clear-message",
  999. "summary": "Clear the message of the current user",
  1000. "tags": [
  1001. "user_status"
  1002. ],
  1003. "security": [
  1004. {
  1005. "bearer_auth": []
  1006. },
  1007. {
  1008. "basic_auth": []
  1009. }
  1010. ],
  1011. "parameters": [
  1012. {
  1013. "name": "OCS-APIRequest",
  1014. "in": "header",
  1015. "description": "Required to be true for the API request to pass",
  1016. "required": true,
  1017. "schema": {
  1018. "type": "boolean",
  1019. "default": true
  1020. }
  1021. }
  1022. ],
  1023. "responses": {
  1024. "200": {
  1025. "description": "Message cleared successfully",
  1026. "content": {
  1027. "application/json": {
  1028. "schema": {
  1029. "type": "object",
  1030. "required": [
  1031. "ocs"
  1032. ],
  1033. "properties": {
  1034. "ocs": {
  1035. "type": "object",
  1036. "required": [
  1037. "meta",
  1038. "data"
  1039. ],
  1040. "properties": {
  1041. "meta": {
  1042. "$ref": "#/components/schemas/OCSMeta"
  1043. },
  1044. "data": {}
  1045. }
  1046. }
  1047. }
  1048. }
  1049. }
  1050. }
  1051. }
  1052. }
  1053. }
  1054. },
  1055. "/ocs/v2.php/apps/user_status/api/v1/user_status/revert/{messageId}": {
  1056. "delete": {
  1057. "operationId": "user_status-revert-status",
  1058. "summary": "Revert the status to the previous status",
  1059. "tags": [
  1060. "user_status"
  1061. ],
  1062. "security": [
  1063. {
  1064. "bearer_auth": []
  1065. },
  1066. {
  1067. "basic_auth": []
  1068. }
  1069. ],
  1070. "parameters": [
  1071. {
  1072. "name": "messageId",
  1073. "in": "path",
  1074. "description": "ID of the message to delete",
  1075. "required": true,
  1076. "schema": {
  1077. "type": "string"
  1078. }
  1079. },
  1080. {
  1081. "name": "OCS-APIRequest",
  1082. "in": "header",
  1083. "description": "Required to be true for the API request to pass",
  1084. "required": true,
  1085. "schema": {
  1086. "type": "boolean",
  1087. "default": true
  1088. }
  1089. }
  1090. ],
  1091. "responses": {
  1092. "200": {
  1093. "description": "Status reverted",
  1094. "content": {
  1095. "application/json": {
  1096. "schema": {
  1097. "type": "object",
  1098. "required": [
  1099. "ocs"
  1100. ],
  1101. "properties": {
  1102. "ocs": {
  1103. "type": "object",
  1104. "required": [
  1105. "meta",
  1106. "data"
  1107. ],
  1108. "properties": {
  1109. "meta": {
  1110. "$ref": "#/components/schemas/OCSMeta"
  1111. },
  1112. "data": {
  1113. "anyOf": [
  1114. {
  1115. "$ref": "#/components/schemas/Private"
  1116. },
  1117. {
  1118. "type": "array",
  1119. "maxItems": 0
  1120. }
  1121. ]
  1122. }
  1123. }
  1124. }
  1125. }
  1126. }
  1127. }
  1128. }
  1129. }
  1130. }
  1131. }
  1132. }
  1133. },
  1134. "tags": []
  1135. }