You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3456 lines
144 KiB

  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "provisioning_api",
  5. "version": "0.0.1",
  6. "description": "This application enables a set of APIs that external systems can use to manage accounts, groups and apps.",
  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. "provisioning_api"
  27. ],
  28. "properties": {
  29. "provisioning_api": {
  30. "type": "object",
  31. "required": [
  32. "version",
  33. "AccountPropertyScopesVersion",
  34. "AccountPropertyScopesFederatedEnabled",
  35. "AccountPropertyScopesPublishedEnabled"
  36. ],
  37. "properties": {
  38. "version": {
  39. "type": "string"
  40. },
  41. "AccountPropertyScopesVersion": {
  42. "type": "integer",
  43. "format": "int64"
  44. },
  45. "AccountPropertyScopesFederatedEnabled": {
  46. "type": "boolean"
  47. },
  48. "AccountPropertyScopesPublishedEnabled": {
  49. "type": "boolean"
  50. }
  51. }
  52. }
  53. }
  54. },
  55. "GroupDetails": {
  56. "type": "object",
  57. "required": [
  58. "id",
  59. "displayname",
  60. "usercount",
  61. "disabled",
  62. "canAdd",
  63. "canRemove"
  64. ],
  65. "properties": {
  66. "id": {
  67. "type": "string"
  68. },
  69. "displayname": {
  70. "type": "string"
  71. },
  72. "usercount": {
  73. "oneOf": [
  74. {
  75. "type": "boolean"
  76. },
  77. {
  78. "type": "integer",
  79. "format": "int64"
  80. }
  81. ]
  82. },
  83. "disabled": {
  84. "oneOf": [
  85. {
  86. "type": "boolean"
  87. },
  88. {
  89. "type": "integer",
  90. "format": "int64"
  91. }
  92. ]
  93. },
  94. "canAdd": {
  95. "type": "boolean"
  96. },
  97. "canRemove": {
  98. "type": "boolean"
  99. }
  100. }
  101. },
  102. "OCSMeta": {
  103. "type": "object",
  104. "required": [
  105. "status",
  106. "statuscode"
  107. ],
  108. "properties": {
  109. "status": {
  110. "type": "string"
  111. },
  112. "statuscode": {
  113. "type": "integer"
  114. },
  115. "message": {
  116. "type": "string"
  117. },
  118. "totalitems": {
  119. "type": "string"
  120. },
  121. "itemsperpage": {
  122. "type": "string"
  123. }
  124. }
  125. },
  126. "UserDetails": {
  127. "type": "object",
  128. "required": [
  129. "additional_mail",
  130. "address",
  131. "backend",
  132. "backendCapabilities",
  133. "biography",
  134. "display-name",
  135. "displayname",
  136. "email",
  137. "fediverse",
  138. "groups",
  139. "headline",
  140. "id",
  141. "language",
  142. "firstLoginTimestamp",
  143. "lastLoginTimestamp",
  144. "lastLogin",
  145. "locale",
  146. "manager",
  147. "notify_email",
  148. "organisation",
  149. "phone",
  150. "profile_enabled",
  151. "pronouns",
  152. "quota",
  153. "role",
  154. "subadmin",
  155. "twitter",
  156. "website"
  157. ],
  158. "properties": {
  159. "additional_mail": {
  160. "type": "array",
  161. "items": {
  162. "type": "string"
  163. }
  164. },
  165. "additional_mailScope": {
  166. "type": "array",
  167. "items": {
  168. "$ref": "#/components/schemas/UserDetailsScope"
  169. }
  170. },
  171. "address": {
  172. "type": "string"
  173. },
  174. "addressScope": {
  175. "$ref": "#/components/schemas/UserDetailsScope"
  176. },
  177. "avatarScope": {
  178. "$ref": "#/components/schemas/UserDetailsScope"
  179. },
  180. "backend": {
  181. "type": "string"
  182. },
  183. "backendCapabilities": {
  184. "type": "object",
  185. "required": [
  186. "setDisplayName",
  187. "setPassword"
  188. ],
  189. "properties": {
  190. "setDisplayName": {
  191. "type": "boolean"
  192. },
  193. "setPassword": {
  194. "type": "boolean"
  195. }
  196. }
  197. },
  198. "biography": {
  199. "type": "string"
  200. },
  201. "biographyScope": {
  202. "$ref": "#/components/schemas/UserDetailsScope"
  203. },
  204. "display-name": {
  205. "type": "string"
  206. },
  207. "displayname": {
  208. "type": "string"
  209. },
  210. "displaynameScope": {
  211. "$ref": "#/components/schemas/UserDetailsScope"
  212. },
  213. "email": {
  214. "type": "string",
  215. "nullable": true
  216. },
  217. "emailScope": {
  218. "$ref": "#/components/schemas/UserDetailsScope"
  219. },
  220. "enabled": {
  221. "type": "boolean"
  222. },
  223. "fediverse": {
  224. "type": "string"
  225. },
  226. "fediverseScope": {
  227. "$ref": "#/components/schemas/UserDetailsScope"
  228. },
  229. "groups": {
  230. "type": "array",
  231. "items": {
  232. "type": "string"
  233. }
  234. },
  235. "headline": {
  236. "type": "string"
  237. },
  238. "headlineScope": {
  239. "$ref": "#/components/schemas/UserDetailsScope"
  240. },
  241. "id": {
  242. "type": "string"
  243. },
  244. "language": {
  245. "type": "string"
  246. },
  247. "firstLoginTimestamp": {
  248. "type": "integer",
  249. "format": "int64"
  250. },
  251. "lastLoginTimestamp": {
  252. "type": "integer",
  253. "format": "int64"
  254. },
  255. "lastLogin": {
  256. "type": "integer",
  257. "format": "int64"
  258. },
  259. "locale": {
  260. "type": "string"
  261. },
  262. "manager": {
  263. "type": "string"
  264. },
  265. "notify_email": {
  266. "type": "string",
  267. "nullable": true
  268. },
  269. "organisation": {
  270. "type": "string"
  271. },
  272. "organisationScope": {
  273. "$ref": "#/components/schemas/UserDetailsScope"
  274. },
  275. "phone": {
  276. "type": "string"
  277. },
  278. "phoneScope": {
  279. "$ref": "#/components/schemas/UserDetailsScope"
  280. },
  281. "profile_enabled": {
  282. "type": "string"
  283. },
  284. "profile_enabledScope": {
  285. "$ref": "#/components/schemas/UserDetailsScope"
  286. },
  287. "pronouns": {
  288. "type": "string"
  289. },
  290. "pronounsScope": {
  291. "$ref": "#/components/schemas/UserDetailsScope"
  292. },
  293. "quota": {
  294. "$ref": "#/components/schemas/UserDetailsQuota"
  295. },
  296. "role": {
  297. "type": "string"
  298. },
  299. "roleScope": {
  300. "$ref": "#/components/schemas/UserDetailsScope"
  301. },
  302. "storageLocation": {
  303. "type": "string"
  304. },
  305. "subadmin": {
  306. "type": "array",
  307. "items": {
  308. "type": "string"
  309. }
  310. },
  311. "twitter": {
  312. "type": "string"
  313. },
  314. "twitterScope": {
  315. "$ref": "#/components/schemas/UserDetailsScope"
  316. },
  317. "website": {
  318. "type": "string"
  319. },
  320. "websiteScope": {
  321. "$ref": "#/components/schemas/UserDetailsScope"
  322. }
  323. }
  324. },
  325. "UserDetailsQuota": {
  326. "type": "object",
  327. "properties": {
  328. "free": {
  329. "anyOf": [
  330. {
  331. "type": "number",
  332. "format": "double"
  333. },
  334. {
  335. "type": "integer",
  336. "format": "int64"
  337. }
  338. ]
  339. },
  340. "quota": {
  341. "anyOf": [
  342. {
  343. "type": "number",
  344. "format": "double"
  345. },
  346. {
  347. "type": "integer",
  348. "format": "int64"
  349. },
  350. {
  351. "type": "string"
  352. }
  353. ]
  354. },
  355. "relative": {
  356. "anyOf": [
  357. {
  358. "type": "number",
  359. "format": "double"
  360. },
  361. {
  362. "type": "integer",
  363. "format": "int64"
  364. }
  365. ]
  366. },
  367. "total": {
  368. "anyOf": [
  369. {
  370. "type": "number",
  371. "format": "double"
  372. },
  373. {
  374. "type": "integer",
  375. "format": "int64"
  376. }
  377. ]
  378. },
  379. "used": {
  380. "anyOf": [
  381. {
  382. "type": "number",
  383. "format": "double"
  384. },
  385. {
  386. "type": "integer",
  387. "format": "int64"
  388. }
  389. ]
  390. }
  391. }
  392. },
  393. "UserDetailsScope": {
  394. "type": "string",
  395. "enum": [
  396. "v2-private",
  397. "v2-local",
  398. "v2-federated",
  399. "v2-published",
  400. "private",
  401. "contacts",
  402. "public"
  403. ]
  404. }
  405. }
  406. },
  407. "paths": {
  408. "/ocs/v2.php/cloud/groups": {
  409. "get": {
  410. "operationId": "groups-get-groups",
  411. "summary": "Get a list of groups",
  412. "tags": [
  413. "groups"
  414. ],
  415. "security": [
  416. {
  417. "bearer_auth": []
  418. },
  419. {
  420. "basic_auth": []
  421. }
  422. ],
  423. "parameters": [
  424. {
  425. "name": "search",
  426. "in": "query",
  427. "description": "Text to search for",
  428. "schema": {
  429. "type": "string",
  430. "default": ""
  431. }
  432. },
  433. {
  434. "name": "limit",
  435. "in": "query",
  436. "description": "Limit the amount of groups returned",
  437. "schema": {
  438. "type": "integer",
  439. "format": "int64",
  440. "nullable": true,
  441. "default": null
  442. }
  443. },
  444. {
  445. "name": "offset",
  446. "in": "query",
  447. "description": "Offset for searching for groups",
  448. "schema": {
  449. "type": "integer",
  450. "format": "int64",
  451. "default": 0
  452. }
  453. },
  454. {
  455. "name": "OCS-APIRequest",
  456. "in": "header",
  457. "description": "Required to be true for the API request to pass",
  458. "required": true,
  459. "schema": {
  460. "type": "boolean",
  461. "default": true
  462. }
  463. }
  464. ],
  465. "responses": {
  466. "200": {
  467. "description": "Groups returned",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "type": "object",
  472. "required": [
  473. "ocs"
  474. ],
  475. "properties": {
  476. "ocs": {
  477. "type": "object",
  478. "required": [
  479. "meta",
  480. "data"
  481. ],
  482. "properties": {
  483. "meta": {
  484. "$ref": "#/components/schemas/OCSMeta"
  485. },
  486. "data": {
  487. "type": "object",
  488. "required": [
  489. "groups"
  490. ],
  491. "properties": {
  492. "groups": {
  493. "type": "array",
  494. "items": {
  495. "type": "string"
  496. }
  497. }
  498. }
  499. }
  500. }
  501. }
  502. }
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. },
  510. "/ocs/v2.php/cloud/groups/details": {
  511. "get": {
  512. "operationId": "groups-get-groups-details",
  513. "summary": "Get a list of groups details",
  514. "tags": [
  515. "groups"
  516. ],
  517. "security": [
  518. {
  519. "bearer_auth": []
  520. },
  521. {
  522. "basic_auth": []
  523. }
  524. ],
  525. "parameters": [
  526. {
  527. "name": "search",
  528. "in": "query",
  529. "description": "Text to search for",
  530. "schema": {
  531. "type": "string",
  532. "default": ""
  533. }
  534. },
  535. {
  536. "name": "limit",
  537. "in": "query",
  538. "description": "Limit the amount of groups returned",
  539. "schema": {
  540. "type": "integer",
  541. "format": "int64",
  542. "nullable": true,
  543. "default": null
  544. }
  545. },
  546. {
  547. "name": "offset",
  548. "in": "query",
  549. "description": "Offset for searching for groups",
  550. "schema": {
  551. "type": "integer",
  552. "format": "int64",
  553. "default": 0
  554. }
  555. },
  556. {
  557. "name": "OCS-APIRequest",
  558. "in": "header",
  559. "description": "Required to be true for the API request to pass",
  560. "required": true,
  561. "schema": {
  562. "type": "boolean",
  563. "default": true
  564. }
  565. }
  566. ],
  567. "responses": {
  568. "200": {
  569. "description": "Groups details returned",
  570. "content": {
  571. "application/json": {
  572. "schema": {
  573. "type": "object",
  574. "required": [
  575. "ocs"
  576. ],
  577. "properties": {
  578. "ocs": {
  579. "type": "object",
  580. "required": [
  581. "meta",
  582. "data"
  583. ],
  584. "properties": {
  585. "meta": {
  586. "$ref": "#/components/schemas/OCSMeta"
  587. },
  588. "data": {
  589. "type": "object",
  590. "required": [
  591. "groups"
  592. ],
  593. "properties": {
  594. "groups": {
  595. "type": "array",
  596. "items": {
  597. "$ref": "#/components/schemas/GroupDetails"
  598. }
  599. }
  600. }
  601. }
  602. }
  603. }
  604. }
  605. }
  606. }
  607. }
  608. }
  609. }
  610. }
  611. },
  612. "/ocs/v2.php/cloud/groups/{groupId}/users": {
  613. "get": {
  614. "operationId": "groups-get-group-users",
  615. "summary": "Get a list of users in the specified group",
  616. "tags": [
  617. "groups"
  618. ],
  619. "security": [
  620. {
  621. "bearer_auth": []
  622. },
  623. {
  624. "basic_auth": []
  625. }
  626. ],
  627. "parameters": [
  628. {
  629. "name": "groupId",
  630. "in": "path",
  631. "description": "ID of the group",
  632. "required": true,
  633. "schema": {
  634. "type": "string",
  635. "pattern": "^.+$"
  636. }
  637. },
  638. {
  639. "name": "OCS-APIRequest",
  640. "in": "header",
  641. "description": "Required to be true for the API request to pass",
  642. "required": true,
  643. "schema": {
  644. "type": "boolean",
  645. "default": true
  646. }
  647. }
  648. ],
  649. "responses": {
  650. "200": {
  651. "description": "User IDs returned",
  652. "content": {
  653. "application/json": {
  654. "schema": {
  655. "type": "object",
  656. "required": [
  657. "ocs"
  658. ],
  659. "properties": {
  660. "ocs": {
  661. "type": "object",
  662. "required": [
  663. "meta",
  664. "data"
  665. ],
  666. "properties": {
  667. "meta": {
  668. "$ref": "#/components/schemas/OCSMeta"
  669. },
  670. "data": {
  671. "type": "object",
  672. "required": [
  673. "users"
  674. ],
  675. "properties": {
  676. "users": {
  677. "type": "array",
  678. "items": {
  679. "type": "string"
  680. }
  681. }
  682. }
  683. }
  684. }
  685. }
  686. }
  687. }
  688. }
  689. }
  690. },
  691. "404": {
  692. "description": "Group not found",
  693. "content": {
  694. "application/json": {
  695. "schema": {
  696. "type": "object",
  697. "required": [
  698. "ocs"
  699. ],
  700. "properties": {
  701. "ocs": {
  702. "type": "object",
  703. "required": [
  704. "meta",
  705. "data"
  706. ],
  707. "properties": {
  708. "meta": {
  709. "$ref": "#/components/schemas/OCSMeta"
  710. },
  711. "data": {}
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. },
  719. "403": {
  720. "description": "Missing permissions to get users in the group",
  721. "content": {
  722. "application/json": {
  723. "schema": {
  724. "type": "object",
  725. "required": [
  726. "ocs"
  727. ],
  728. "properties": {
  729. "ocs": {
  730. "type": "object",
  731. "required": [
  732. "meta",
  733. "data"
  734. ],
  735. "properties": {
  736. "meta": {
  737. "$ref": "#/components/schemas/OCSMeta"
  738. },
  739. "data": {}
  740. }
  741. }
  742. }
  743. }
  744. }
  745. }
  746. }
  747. }
  748. }
  749. },
  750. "/ocs/v2.php/cloud/groups/{groupId}/users/details": {
  751. "get": {
  752. "operationId": "groups-get-group-users-details",
  753. "summary": "Get a list of users details in the specified group",
  754. "tags": [
  755. "groups"
  756. ],
  757. "security": [
  758. {
  759. "bearer_auth": []
  760. },
  761. {
  762. "basic_auth": []
  763. }
  764. ],
  765. "parameters": [
  766. {
  767. "name": "groupId",
  768. "in": "path",
  769. "description": "ID of the group",
  770. "required": true,
  771. "schema": {
  772. "type": "string",
  773. "pattern": "^.+$"
  774. }
  775. },
  776. {
  777. "name": "search",
  778. "in": "query",
  779. "description": "Text to search for",
  780. "schema": {
  781. "type": "string",
  782. "default": ""
  783. }
  784. },
  785. {
  786. "name": "limit",
  787. "in": "query",
  788. "description": "Limit the amount of groups returned",
  789. "schema": {
  790. "type": "integer",
  791. "format": "int64",
  792. "nullable": true,
  793. "default": null
  794. }
  795. },
  796. {
  797. "name": "offset",
  798. "in": "query",
  799. "description": "Offset for searching for groups",
  800. "schema": {
  801. "type": "integer",
  802. "format": "int64",
  803. "default": 0
  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": "Group users details returned",
  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. "type": "object",
  840. "required": [
  841. "users"
  842. ],
  843. "properties": {
  844. "users": {
  845. "type": "object",
  846. "additionalProperties": {
  847. "anyOf": [
  848. {
  849. "$ref": "#/components/schemas/UserDetails"
  850. },
  851. {
  852. "type": "object",
  853. "required": [
  854. "id"
  855. ],
  856. "properties": {
  857. "id": {
  858. "type": "string"
  859. }
  860. }
  861. }
  862. ]
  863. }
  864. }
  865. }
  866. }
  867. }
  868. }
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. },
  877. "/ocs/v2.php/cloud/groups/{groupId}": {
  878. "get": {
  879. "operationId": "groups-get-group",
  880. "summary": "Get a list of users in the specified group",
  881. "deprecated": true,
  882. "tags": [
  883. "groups"
  884. ],
  885. "security": [
  886. {
  887. "bearer_auth": []
  888. },
  889. {
  890. "basic_auth": []
  891. }
  892. ],
  893. "parameters": [
  894. {
  895. "name": "groupId",
  896. "in": "path",
  897. "description": "ID of the group",
  898. "required": true,
  899. "schema": {
  900. "type": "string",
  901. "pattern": "^.+$"
  902. }
  903. },
  904. {
  905. "name": "OCS-APIRequest",
  906. "in": "header",
  907. "description": "Required to be true for the API request to pass",
  908. "required": true,
  909. "schema": {
  910. "type": "boolean",
  911. "default": true
  912. }
  913. }
  914. ],
  915. "responses": {
  916. "200": {
  917. "description": "Group users returned",
  918. "content": {
  919. "application/json": {
  920. "schema": {
  921. "type": "object",
  922. "required": [
  923. "ocs"
  924. ],
  925. "properties": {
  926. "ocs": {
  927. "type": "object",
  928. "required": [
  929. "meta",
  930. "data"
  931. ],
  932. "properties": {
  933. "meta": {
  934. "$ref": "#/components/schemas/OCSMeta"
  935. },
  936. "data": {
  937. "type": "object",
  938. "required": [
  939. "users"
  940. ],
  941. "properties": {
  942. "users": {
  943. "type": "array",
  944. "items": {
  945. "type": "string"
  946. }
  947. }
  948. }
  949. }
  950. }
  951. }
  952. }
  953. }
  954. }
  955. }
  956. }
  957. }
  958. }
  959. },
  960. "/ocs/v2.php/cloud/users": {
  961. "get": {
  962. "operationId": "users-get-users",
  963. "summary": "Get a list of users",
  964. "tags": [
  965. "users"
  966. ],
  967. "security": [
  968. {
  969. "bearer_auth": []
  970. },
  971. {
  972. "basic_auth": []
  973. }
  974. ],
  975. "parameters": [
  976. {
  977. "name": "search",
  978. "in": "query",
  979. "description": "Text to search for",
  980. "schema": {
  981. "type": "string",
  982. "default": ""
  983. }
  984. },
  985. {
  986. "name": "limit",
  987. "in": "query",
  988. "description": "Limit the amount of groups returned",
  989. "schema": {
  990. "type": "integer",
  991. "format": "int64",
  992. "nullable": true,
  993. "default": null
  994. }
  995. },
  996. {
  997. "name": "offset",
  998. "in": "query",
  999. "description": "Offset for searching for groups",
  1000. "schema": {
  1001. "type": "integer",
  1002. "format": "int64",
  1003. "default": 0
  1004. }
  1005. },
  1006. {
  1007. "name": "OCS-APIRequest",
  1008. "in": "header",
  1009. "description": "Required to be true for the API request to pass",
  1010. "required": true,
  1011. "schema": {
  1012. "type": "boolean",
  1013. "default": true
  1014. }
  1015. }
  1016. ],
  1017. "responses": {
  1018. "200": {
  1019. "description": "Users returned",
  1020. "content": {
  1021. "application/json": {
  1022. "schema": {
  1023. "type": "object",
  1024. "required": [
  1025. "ocs"
  1026. ],
  1027. "properties": {
  1028. "ocs": {
  1029. "type": "object",
  1030. "required": [
  1031. "meta",
  1032. "data"
  1033. ],
  1034. "properties": {
  1035. "meta": {
  1036. "$ref": "#/components/schemas/OCSMeta"
  1037. },
  1038. "data": {
  1039. "type": "object",
  1040. "required": [
  1041. "users"
  1042. ],
  1043. "properties": {
  1044. "users": {
  1045. "type": "array",
  1046. "items": {
  1047. "type": "string"
  1048. }
  1049. }
  1050. }
  1051. }
  1052. }
  1053. }
  1054. }
  1055. }
  1056. }
  1057. }
  1058. }
  1059. }
  1060. },
  1061. "post": {
  1062. "operationId": "users-add-user",
  1063. "summary": "Create a new user",
  1064. "description": "This endpoint requires password confirmation",
  1065. "tags": [
  1066. "users"
  1067. ],
  1068. "security": [
  1069. {
  1070. "bearer_auth": []
  1071. },
  1072. {
  1073. "basic_auth": []
  1074. }
  1075. ],
  1076. "requestBody": {
  1077. "required": true,
  1078. "content": {
  1079. "application/json": {
  1080. "schema": {
  1081. "type": "object",
  1082. "required": [
  1083. "userid"
  1084. ],
  1085. "properties": {
  1086. "userid": {
  1087. "type": "string",
  1088. "description": "ID of the user"
  1089. },
  1090. "password": {
  1091. "type": "string",
  1092. "default": "",
  1093. "description": "Password of the user"
  1094. },
  1095. "displayName": {
  1096. "type": "string",
  1097. "default": "",
  1098. "description": "Display name of the user"
  1099. },
  1100. "email": {
  1101. "type": "string",
  1102. "default": "",
  1103. "description": "Email of the user"
  1104. },
  1105. "groups": {
  1106. "type": "array",
  1107. "default": [],
  1108. "description": "Groups of the user",
  1109. "items": {
  1110. "type": "string"
  1111. }
  1112. },
  1113. "subadmin": {
  1114. "type": "array",
  1115. "default": [],
  1116. "description": "Groups where the user is subadmin",
  1117. "items": {
  1118. "type": "string"
  1119. }
  1120. },
  1121. "quota": {
  1122. "type": "string",
  1123. "default": "",
  1124. "description": "Quota of the user"
  1125. },
  1126. "language": {
  1127. "type": "string",
  1128. "default": "",
  1129. "description": "Language of the user"
  1130. },
  1131. "manager": {
  1132. "type": "string",
  1133. "nullable": true,
  1134. "default": null,
  1135. "description": "Manager of the user"
  1136. }
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "parameters": [
  1143. {
  1144. "name": "OCS-APIRequest",
  1145. "in": "header",
  1146. "description": "Required to be true for the API request to pass",
  1147. "required": true,
  1148. "schema": {
  1149. "type": "boolean",
  1150. "default": true
  1151. }
  1152. }
  1153. ],
  1154. "responses": {
  1155. "200": {
  1156. "description": "User added successfully",
  1157. "content": {
  1158. "application/json": {
  1159. "schema": {
  1160. "type": "object",
  1161. "required": [
  1162. "ocs"
  1163. ],
  1164. "properties": {
  1165. "ocs": {
  1166. "type": "object",
  1167. "required": [
  1168. "meta",
  1169. "data"
  1170. ],
  1171. "properties": {
  1172. "meta": {
  1173. "$ref": "#/components/schemas/OCSMeta"
  1174. },
  1175. "data": {
  1176. "type": "object",
  1177. "required": [
  1178. "id"
  1179. ],
  1180. "properties": {
  1181. "id": {
  1182. "type": "string"
  1183. }
  1184. }
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. }
  1191. }
  1192. },
  1193. "403": {
  1194. "description": "Missing permissions to make user subadmin",
  1195. "content": {
  1196. "application/json": {
  1197. "schema": {
  1198. "type": "object",
  1199. "required": [
  1200. "ocs"
  1201. ],
  1202. "properties": {
  1203. "ocs": {
  1204. "type": "object",
  1205. "required": [
  1206. "meta",
  1207. "data"
  1208. ],
  1209. "properties": {
  1210. "meta": {
  1211. "$ref": "#/components/schemas/OCSMeta"
  1212. },
  1213. "data": {}
  1214. }
  1215. }
  1216. }
  1217. }
  1218. }
  1219. }
  1220. }
  1221. }
  1222. }
  1223. },
  1224. "/ocs/v2.php/cloud/users/details": {
  1225. "get": {
  1226. "operationId": "users-get-users-details",
  1227. "summary": "Get a list of users and their details",
  1228. "tags": [
  1229. "users"
  1230. ],
  1231. "security": [
  1232. {
  1233. "bearer_auth": []
  1234. },
  1235. {
  1236. "basic_auth": []
  1237. }
  1238. ],
  1239. "parameters": [
  1240. {
  1241. "name": "search",
  1242. "in": "query",
  1243. "description": "Text to search for",
  1244. "schema": {
  1245. "type": "string",
  1246. "default": ""
  1247. }
  1248. },
  1249. {
  1250. "name": "limit",
  1251. "in": "query",
  1252. "description": "Limit the amount of groups returned",
  1253. "schema": {
  1254. "type": "integer",
  1255. "format": "int64",
  1256. "nullable": true,
  1257. "default": null
  1258. }
  1259. },
  1260. {
  1261. "name": "offset",
  1262. "in": "query",
  1263. "description": "Offset for searching for groups",
  1264. "schema": {
  1265. "type": "integer",
  1266. "format": "int64",
  1267. "default": 0
  1268. }
  1269. },
  1270. {
  1271. "name": "OCS-APIRequest",
  1272. "in": "header",
  1273. "description": "Required to be true for the API request to pass",
  1274. "required": true,
  1275. "schema": {
  1276. "type": "boolean",
  1277. "default": true
  1278. }
  1279. }
  1280. ],
  1281. "responses": {
  1282. "200": {
  1283. "description": "Users details returned",
  1284. "content": {
  1285. "application/json": {
  1286. "schema": {
  1287. "type": "object",
  1288. "required": [
  1289. "ocs"
  1290. ],
  1291. "properties": {
  1292. "ocs": {
  1293. "type": "object",
  1294. "required": [
  1295. "meta",
  1296. "data"
  1297. ],
  1298. "properties": {
  1299. "meta": {
  1300. "$ref": "#/components/schemas/OCSMeta"
  1301. },
  1302. "data": {
  1303. "type": "object",
  1304. "required": [
  1305. "users"
  1306. ],
  1307. "properties": {
  1308. "users": {
  1309. "type": "object",
  1310. "additionalProperties": {
  1311. "anyOf": [
  1312. {
  1313. "$ref": "#/components/schemas/UserDetails"
  1314. },
  1315. {
  1316. "type": "object",
  1317. "required": [
  1318. "id"
  1319. ],
  1320. "properties": {
  1321. "id": {
  1322. "type": "string"
  1323. }
  1324. }
  1325. }
  1326. ]
  1327. }
  1328. }
  1329. }
  1330. }
  1331. }
  1332. }
  1333. }
  1334. }
  1335. }
  1336. }
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "/ocs/v2.php/cloud/users/disabled": {
  1342. "get": {
  1343. "operationId": "users-get-disabled-users-details",
  1344. "summary": "Get the list of disabled users and their details",
  1345. "tags": [
  1346. "users"
  1347. ],
  1348. "security": [
  1349. {
  1350. "bearer_auth": []
  1351. },
  1352. {
  1353. "basic_auth": []
  1354. }
  1355. ],
  1356. "parameters": [
  1357. {
  1358. "name": "search",
  1359. "in": "query",
  1360. "description": "Text to search for",
  1361. "schema": {
  1362. "type": "string",
  1363. "default": ""
  1364. }
  1365. },
  1366. {
  1367. "name": "limit",
  1368. "in": "query",
  1369. "description": "Limit the amount of users returned",
  1370. "schema": {
  1371. "type": "integer",
  1372. "format": "int64",
  1373. "nullable": true,
  1374. "default": null
  1375. }
  1376. },
  1377. {
  1378. "name": "offset",
  1379. "in": "query",
  1380. "description": "Offset",
  1381. "schema": {
  1382. "type": "integer",
  1383. "format": "int64",
  1384. "default": 0
  1385. }
  1386. },
  1387. {
  1388. "name": "OCS-APIRequest",
  1389. "in": "header",
  1390. "description": "Required to be true for the API request to pass",
  1391. "required": true,
  1392. "schema": {
  1393. "type": "boolean",
  1394. "default": true
  1395. }
  1396. }
  1397. ],
  1398. "responses": {
  1399. "200": {
  1400. "description": "Disabled users details returned",
  1401. "content": {
  1402. "application/json": {
  1403. "schema": {
  1404. "type": "object",
  1405. "required": [
  1406. "ocs"
  1407. ],
  1408. "properties": {
  1409. "ocs": {
  1410. "type": "object",
  1411. "required": [
  1412. "meta",
  1413. "data"
  1414. ],
  1415. "properties": {
  1416. "meta": {
  1417. "$ref": "#/components/schemas/OCSMeta"
  1418. },
  1419. "data": {
  1420. "type": "object",
  1421. "required": [
  1422. "users"
  1423. ],
  1424. "properties": {
  1425. "users": {
  1426. "type": "object",
  1427. "additionalProperties": {
  1428. "anyOf": [
  1429. {
  1430. "$ref": "#/components/schemas/UserDetails"
  1431. },
  1432. {
  1433. "type": "object",
  1434. "required": [
  1435. "id"
  1436. ],
  1437. "properties": {
  1438. "id": {
  1439. "type": "string"
  1440. }
  1441. }
  1442. }
  1443. ]
  1444. }
  1445. }
  1446. }
  1447. }
  1448. }
  1449. }
  1450. }
  1451. }
  1452. }
  1453. }
  1454. }
  1455. }
  1456. }
  1457. },
  1458. "/ocs/v2.php/cloud/users/search/by-phone": {
  1459. "post": {
  1460. "operationId": "users-search-by-phone-numbers",
  1461. "summary": "Search users by their phone numbers",
  1462. "tags": [
  1463. "users"
  1464. ],
  1465. "security": [
  1466. {
  1467. "bearer_auth": []
  1468. },
  1469. {
  1470. "basic_auth": []
  1471. }
  1472. ],
  1473. "requestBody": {
  1474. "required": true,
  1475. "content": {
  1476. "application/json": {
  1477. "schema": {
  1478. "type": "object",
  1479. "required": [
  1480. "location",
  1481. "search"
  1482. ],
  1483. "properties": {
  1484. "location": {
  1485. "type": "string",
  1486. "description": "Location of the phone number (for country code)"
  1487. },
  1488. "search": {
  1489. "type": "object",
  1490. "description": "Phone numbers to search for",
  1491. "additionalProperties": {
  1492. "type": "array",
  1493. "items": {
  1494. "type": "string"
  1495. }
  1496. }
  1497. }
  1498. }
  1499. }
  1500. }
  1501. }
  1502. },
  1503. "parameters": [
  1504. {
  1505. "name": "OCS-APIRequest",
  1506. "in": "header",
  1507. "description": "Required to be true for the API request to pass",
  1508. "required": true,
  1509. "schema": {
  1510. "type": "boolean",
  1511. "default": true
  1512. }
  1513. }
  1514. ],
  1515. "responses": {
  1516. "200": {
  1517. "description": "Users returned",
  1518. "content": {
  1519. "application/json": {
  1520. "schema": {
  1521. "type": "object",
  1522. "required": [
  1523. "ocs"
  1524. ],
  1525. "properties": {
  1526. "ocs": {
  1527. "type": "object",
  1528. "required": [
  1529. "meta",
  1530. "data"
  1531. ],
  1532. "properties": {
  1533. "meta": {
  1534. "$ref": "#/components/schemas/OCSMeta"
  1535. },
  1536. "data": {
  1537. "type": "object",
  1538. "additionalProperties": {
  1539. "type": "string"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. }
  1545. }
  1546. }
  1547. }
  1548. },
  1549. "400": {
  1550. "description": "Invalid location",
  1551. "content": {
  1552. "application/json": {
  1553. "schema": {
  1554. "type": "object",
  1555. "required": [
  1556. "ocs"
  1557. ],
  1558. "properties": {
  1559. "ocs": {
  1560. "type": "object",
  1561. "required": [
  1562. "meta",
  1563. "data"
  1564. ],
  1565. "properties": {
  1566. "meta": {
  1567. "$ref": "#/components/schemas/OCSMeta"
  1568. },
  1569. "data": {}
  1570. }
  1571. }
  1572. }
  1573. }
  1574. }
  1575. }
  1576. }
  1577. }
  1578. }
  1579. },
  1580. "/ocs/v2.php/cloud/users/{userId}": {
  1581. "get": {
  1582. "operationId": "users-get-user",
  1583. "summary": "Get the details of a user",
  1584. "tags": [
  1585. "users"
  1586. ],
  1587. "security": [
  1588. {
  1589. "bearer_auth": []
  1590. },
  1591. {
  1592. "basic_auth": []
  1593. }
  1594. ],
  1595. "parameters": [
  1596. {
  1597. "name": "userId",
  1598. "in": "path",
  1599. "description": "ID of the user",
  1600. "required": true,
  1601. "schema": {
  1602. "type": "string"
  1603. }
  1604. },
  1605. {
  1606. "name": "OCS-APIRequest",
  1607. "in": "header",
  1608. "description": "Required to be true for the API request to pass",
  1609. "required": true,
  1610. "schema": {
  1611. "type": "boolean",
  1612. "default": true
  1613. }
  1614. }
  1615. ],
  1616. "responses": {
  1617. "200": {
  1618. "description": "User returned",
  1619. "content": {
  1620. "application/json": {
  1621. "schema": {
  1622. "type": "object",
  1623. "required": [
  1624. "ocs"
  1625. ],
  1626. "properties": {
  1627. "ocs": {
  1628. "type": "object",
  1629. "required": [
  1630. "meta",
  1631. "data"
  1632. ],
  1633. "properties": {
  1634. "meta": {
  1635. "$ref": "#/components/schemas/OCSMeta"
  1636. },
  1637. "data": {
  1638. "$ref": "#/components/schemas/UserDetails"
  1639. }
  1640. }
  1641. }
  1642. }
  1643. }
  1644. }
  1645. }
  1646. }
  1647. }
  1648. },
  1649. "put": {
  1650. "operationId": "users-edit-user",
  1651. "summary": "Update a value of the user's details",
  1652. "description": "This endpoint requires password confirmation",
  1653. "tags": [
  1654. "users"
  1655. ],
  1656. "security": [
  1657. {
  1658. "bearer_auth": []
  1659. },
  1660. {
  1661. "basic_auth": []
  1662. }
  1663. ],
  1664. "requestBody": {
  1665. "required": true,
  1666. "content": {
  1667. "application/json": {
  1668. "schema": {
  1669. "type": "object",
  1670. "required": [
  1671. "key",
  1672. "value"
  1673. ],
  1674. "properties": {
  1675. "key": {
  1676. "type": "string",
  1677. "description": "Key that will be updated"
  1678. },
  1679. "value": {
  1680. "type": "string",
  1681. "description": "New value for the key"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. }
  1687. },
  1688. "parameters": [
  1689. {
  1690. "name": "userId",
  1691. "in": "path",
  1692. "description": "ID of the user",
  1693. "required": true,
  1694. "schema": {
  1695. "type": "string"
  1696. }
  1697. },
  1698. {
  1699. "name": "OCS-APIRequest",
  1700. "in": "header",
  1701. "description": "Required to be true for the API request to pass",
  1702. "required": true,
  1703. "schema": {
  1704. "type": "boolean",
  1705. "default": true
  1706. }
  1707. }
  1708. ],
  1709. "responses": {
  1710. "200": {
  1711. "description": "User value edited successfully",
  1712. "content": {
  1713. "application/json": {
  1714. "schema": {
  1715. "type": "object",
  1716. "required": [
  1717. "ocs"
  1718. ],
  1719. "properties": {
  1720. "ocs": {
  1721. "type": "object",
  1722. "required": [
  1723. "meta",
  1724. "data"
  1725. ],
  1726. "properties": {
  1727. "meta": {
  1728. "$ref": "#/components/schemas/OCSMeta"
  1729. },
  1730. "data": {}
  1731. }
  1732. }
  1733. }
  1734. }
  1735. }
  1736. }
  1737. }
  1738. }
  1739. },
  1740. "delete": {
  1741. "operationId": "users-delete-user",
  1742. "summary": "Delete a user",
  1743. "description": "This endpoint requires password confirmation",
  1744. "tags": [
  1745. "users"
  1746. ],
  1747. "security": [
  1748. {
  1749. "bearer_auth": []
  1750. },
  1751. {
  1752. "basic_auth": []
  1753. }
  1754. ],
  1755. "parameters": [
  1756. {
  1757. "name": "userId",
  1758. "in": "path",
  1759. "description": "ID of the user",
  1760. "required": true,
  1761. "schema": {
  1762. "type": "string"
  1763. }
  1764. },
  1765. {
  1766. "name": "OCS-APIRequest",
  1767. "in": "header",
  1768. "description": "Required to be true for the API request to pass",
  1769. "required": true,
  1770. "schema": {
  1771. "type": "boolean",
  1772. "default": true
  1773. }
  1774. }
  1775. ],
  1776. "responses": {
  1777. "200": {
  1778. "description": "User deleted successfully",
  1779. "content": {
  1780. "application/json": {
  1781. "schema": {
  1782. "type": "object",
  1783. "required": [
  1784. "ocs"
  1785. ],
  1786. "properties": {
  1787. "ocs": {
  1788. "type": "object",
  1789. "required": [
  1790. "meta",
  1791. "data"
  1792. ],
  1793. "properties": {
  1794. "meta": {
  1795. "$ref": "#/components/schemas/OCSMeta"
  1796. },
  1797. "data": {}
  1798. }
  1799. }
  1800. }
  1801. }
  1802. }
  1803. }
  1804. }
  1805. }
  1806. }
  1807. },
  1808. "/ocs/v2.php/cloud/user": {
  1809. "get": {
  1810. "operationId": "users-get-current-user",
  1811. "summary": "Get the details of the current user",
  1812. "tags": [
  1813. "users"
  1814. ],
  1815. "security": [
  1816. {
  1817. "bearer_auth": []
  1818. },
  1819. {
  1820. "basic_auth": []
  1821. }
  1822. ],
  1823. "parameters": [
  1824. {
  1825. "name": "OCS-APIRequest",
  1826. "in": "header",
  1827. "description": "Required to be true for the API request to pass",
  1828. "required": true,
  1829. "schema": {
  1830. "type": "boolean",
  1831. "default": true
  1832. }
  1833. }
  1834. ],
  1835. "responses": {
  1836. "200": {
  1837. "description": "Current user returned",
  1838. "content": {
  1839. "application/json": {
  1840. "schema": {
  1841. "type": "object",
  1842. "required": [
  1843. "ocs"
  1844. ],
  1845. "properties": {
  1846. "ocs": {
  1847. "type": "object",
  1848. "required": [
  1849. "meta",
  1850. "data"
  1851. ],
  1852. "properties": {
  1853. "meta": {
  1854. "$ref": "#/components/schemas/OCSMeta"
  1855. },
  1856. "data": {
  1857. "$ref": "#/components/schemas/UserDetails"
  1858. }
  1859. }
  1860. }
  1861. }
  1862. }
  1863. }
  1864. }
  1865. }
  1866. }
  1867. }
  1868. },
  1869. "/ocs/v2.php/cloud/user/fields": {
  1870. "get": {
  1871. "operationId": "users-get-editable-fields",
  1872. "summary": "Get a list of fields that are editable for the current user",
  1873. "tags": [
  1874. "users"
  1875. ],
  1876. "security": [
  1877. {
  1878. "bearer_auth": []
  1879. },
  1880. {
  1881. "basic_auth": []
  1882. }
  1883. ],
  1884. "parameters": [
  1885. {
  1886. "name": "OCS-APIRequest",
  1887. "in": "header",
  1888. "description": "Required to be true for the API request to pass",
  1889. "required": true,
  1890. "schema": {
  1891. "type": "boolean",
  1892. "default": true
  1893. }
  1894. }
  1895. ],
  1896. "responses": {
  1897. "200": {
  1898. "description": "Editable fields returned",
  1899. "content": {
  1900. "application/json": {
  1901. "schema": {
  1902. "type": "object",
  1903. "required": [
  1904. "ocs"
  1905. ],
  1906. "properties": {
  1907. "ocs": {
  1908. "type": "object",
  1909. "required": [
  1910. "meta",
  1911. "data"
  1912. ],
  1913. "properties": {
  1914. "meta": {
  1915. "$ref": "#/components/schemas/OCSMeta"
  1916. },
  1917. "data": {
  1918. "type": "array",
  1919. "items": {
  1920. "type": "string"
  1921. }
  1922. }
  1923. }
  1924. }
  1925. }
  1926. }
  1927. }
  1928. }
  1929. }
  1930. }
  1931. }
  1932. },
  1933. "/ocs/v2.php/cloud/user/fields/{userId}": {
  1934. "get": {
  1935. "operationId": "users-get-editable-fields-for-user",
  1936. "summary": "Get a list of fields that are editable for a user",
  1937. "tags": [
  1938. "users"
  1939. ],
  1940. "security": [
  1941. {
  1942. "bearer_auth": []
  1943. },
  1944. {
  1945. "basic_auth": []
  1946. }
  1947. ],
  1948. "parameters": [
  1949. {
  1950. "name": "userId",
  1951. "in": "path",
  1952. "description": "ID of the user",
  1953. "required": true,
  1954. "schema": {
  1955. "type": "string"
  1956. }
  1957. },
  1958. {
  1959. "name": "OCS-APIRequest",
  1960. "in": "header",
  1961. "description": "Required to be true for the API request to pass",
  1962. "required": true,
  1963. "schema": {
  1964. "type": "boolean",
  1965. "default": true
  1966. }
  1967. }
  1968. ],
  1969. "responses": {
  1970. "200": {
  1971. "description": "Editable fields for user returned",
  1972. "content": {
  1973. "application/json": {
  1974. "schema": {
  1975. "type": "object",
  1976. "required": [
  1977. "ocs"
  1978. ],
  1979. "properties": {
  1980. "ocs": {
  1981. "type": "object",
  1982. "required": [
  1983. "meta",
  1984. "data"
  1985. ],
  1986. "properties": {
  1987. "meta": {
  1988. "$ref": "#/components/schemas/OCSMeta"
  1989. },
  1990. "data": {
  1991. "type": "array",
  1992. "items": {
  1993. "type": "string"
  1994. }
  1995. }
  1996. }
  1997. }
  1998. }
  1999. }
  2000. }
  2001. }
  2002. }
  2003. }
  2004. }
  2005. },
  2006. "/ocs/v2.php/cloud/user/apps": {
  2007. "get": {
  2008. "operationId": "users-get-enabled-apps",
  2009. "summary": "Get a list of enabled apps for the current user",
  2010. "tags": [
  2011. "users"
  2012. ],
  2013. "security": [
  2014. {
  2015. "bearer_auth": []
  2016. },
  2017. {
  2018. "basic_auth": []
  2019. }
  2020. ],
  2021. "parameters": [
  2022. {
  2023. "name": "OCS-APIRequest",
  2024. "in": "header",
  2025. "description": "Required to be true for the API request to pass",
  2026. "required": true,
  2027. "schema": {
  2028. "type": "boolean",
  2029. "default": true
  2030. }
  2031. }
  2032. ],
  2033. "responses": {
  2034. "200": {
  2035. "description": "Enabled apps returned",
  2036. "content": {
  2037. "application/json": {
  2038. "schema": {
  2039. "type": "object",
  2040. "required": [
  2041. "ocs"
  2042. ],
  2043. "properties": {
  2044. "ocs": {
  2045. "type": "object",
  2046. "required": [
  2047. "meta",
  2048. "data"
  2049. ],
  2050. "properties": {
  2051. "meta": {
  2052. "$ref": "#/components/schemas/OCSMeta"
  2053. },
  2054. "data": {
  2055. "type": "object",
  2056. "required": [
  2057. "apps"
  2058. ],
  2059. "properties": {
  2060. "apps": {
  2061. "type": "array",
  2062. "items": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. }
  2069. }
  2070. }
  2071. }
  2072. }
  2073. }
  2074. }
  2075. }
  2076. }
  2077. },
  2078. "/ocs/v2.php/cloud/users/{userId}/{collectionName}": {
  2079. "put": {
  2080. "operationId": "users-edit-user-multi-value",
  2081. "summary": "Update multiple values of the user's details",
  2082. "description": "This endpoint requires password confirmation",
  2083. "tags": [
  2084. "users"
  2085. ],
  2086. "security": [
  2087. {
  2088. "bearer_auth": []
  2089. },
  2090. {
  2091. "basic_auth": []
  2092. }
  2093. ],
  2094. "requestBody": {
  2095. "required": true,
  2096. "content": {
  2097. "application/json": {
  2098. "schema": {
  2099. "type": "object",
  2100. "required": [
  2101. "key",
  2102. "value"
  2103. ],
  2104. "properties": {
  2105. "key": {
  2106. "type": "string",
  2107. "description": "Key that will be updated"
  2108. },
  2109. "value": {
  2110. "type": "string",
  2111. "description": "New value for the key"
  2112. }
  2113. }
  2114. }
  2115. }
  2116. }
  2117. },
  2118. "parameters": [
  2119. {
  2120. "name": "userId",
  2121. "in": "path",
  2122. "description": "ID of the user",
  2123. "required": true,
  2124. "schema": {
  2125. "type": "string"
  2126. }
  2127. },
  2128. {
  2129. "name": "collectionName",
  2130. "in": "path",
  2131. "description": "Collection to update",
  2132. "required": true,
  2133. "schema": {
  2134. "type": "string",
  2135. "pattern": "^(?!enable$|disable$)[a-zA-Z0-9_]*$"
  2136. }
  2137. },
  2138. {
  2139. "name": "OCS-APIRequest",
  2140. "in": "header",
  2141. "description": "Required to be true for the API request to pass",
  2142. "required": true,
  2143. "schema": {
  2144. "type": "boolean",
  2145. "default": true
  2146. }
  2147. }
  2148. ],
  2149. "responses": {
  2150. "200": {
  2151. "description": "User values edited successfully",
  2152. "content": {
  2153. "application/json": {
  2154. "schema": {
  2155. "type": "object",
  2156. "required": [
  2157. "ocs"
  2158. ],
  2159. "properties": {
  2160. "ocs": {
  2161. "type": "object",
  2162. "required": [
  2163. "meta",
  2164. "data"
  2165. ],
  2166. "properties": {
  2167. "meta": {
  2168. "$ref": "#/components/schemas/OCSMeta"
  2169. },
  2170. "data": {}
  2171. }
  2172. }
  2173. }
  2174. }
  2175. }
  2176. }
  2177. }
  2178. }
  2179. }
  2180. },
  2181. "/ocs/v2.php/cloud/users/{userId}/wipe": {
  2182. "post": {
  2183. "operationId": "users-wipe-user-devices",
  2184. "summary": "Wipe all devices of a user",
  2185. "description": "This endpoint requires password confirmation",
  2186. "tags": [
  2187. "users"
  2188. ],
  2189. "security": [
  2190. {
  2191. "bearer_auth": []
  2192. },
  2193. {
  2194. "basic_auth": []
  2195. }
  2196. ],
  2197. "parameters": [
  2198. {
  2199. "name": "userId",
  2200. "in": "path",
  2201. "description": "ID of the user",
  2202. "required": true,
  2203. "schema": {
  2204. "type": "string"
  2205. }
  2206. },
  2207. {
  2208. "name": "OCS-APIRequest",
  2209. "in": "header",
  2210. "description": "Required to be true for the API request to pass",
  2211. "required": true,
  2212. "schema": {
  2213. "type": "boolean",
  2214. "default": true
  2215. }
  2216. }
  2217. ],
  2218. "responses": {
  2219. "200": {
  2220. "description": "Wiped all user devices successfully",
  2221. "content": {
  2222. "application/json": {
  2223. "schema": {
  2224. "type": "object",
  2225. "required": [
  2226. "ocs"
  2227. ],
  2228. "properties": {
  2229. "ocs": {
  2230. "type": "object",
  2231. "required": [
  2232. "meta",
  2233. "data"
  2234. ],
  2235. "properties": {
  2236. "meta": {
  2237. "$ref": "#/components/schemas/OCSMeta"
  2238. },
  2239. "data": {}
  2240. }
  2241. }
  2242. }
  2243. }
  2244. }
  2245. }
  2246. }
  2247. }
  2248. }
  2249. },
  2250. "/ocs/v2.php/cloud/users/{userId}/enable": {
  2251. "put": {
  2252. "operationId": "users-enable-user",
  2253. "summary": "Enable a user",
  2254. "description": "This endpoint requires password confirmation",
  2255. "tags": [
  2256. "users"
  2257. ],
  2258. "security": [
  2259. {
  2260. "bearer_auth": []
  2261. },
  2262. {
  2263. "basic_auth": []
  2264. }
  2265. ],
  2266. "parameters": [
  2267. {
  2268. "name": "userId",
  2269. "in": "path",
  2270. "description": "ID of the user",
  2271. "required": true,
  2272. "schema": {
  2273. "type": "string"
  2274. }
  2275. },
  2276. {
  2277. "name": "OCS-APIRequest",
  2278. "in": "header",
  2279. "description": "Required to be true for the API request to pass",
  2280. "required": true,
  2281. "schema": {
  2282. "type": "boolean",
  2283. "default": true
  2284. }
  2285. }
  2286. ],
  2287. "responses": {
  2288. "200": {
  2289. "description": "User enabled successfully",
  2290. "content": {
  2291. "application/json": {
  2292. "schema": {
  2293. "type": "object",
  2294. "required": [
  2295. "ocs"
  2296. ],
  2297. "properties": {
  2298. "ocs": {
  2299. "type": "object",
  2300. "required": [
  2301. "meta",
  2302. "data"
  2303. ],
  2304. "properties": {
  2305. "meta": {
  2306. "$ref": "#/components/schemas/OCSMeta"
  2307. },
  2308. "data": {}
  2309. }
  2310. }
  2311. }
  2312. }
  2313. }
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "/ocs/v2.php/cloud/users/{userId}/disable": {
  2320. "put": {
  2321. "operationId": "users-disable-user",
  2322. "summary": "Disable a user",
  2323. "description": "This endpoint requires password confirmation",
  2324. "tags": [
  2325. "users"
  2326. ],
  2327. "security": [
  2328. {
  2329. "bearer_auth": []
  2330. },
  2331. {
  2332. "basic_auth": []
  2333. }
  2334. ],
  2335. "parameters": [
  2336. {
  2337. "name": "userId",
  2338. "in": "path",
  2339. "description": "ID of the user",
  2340. "required": true,
  2341. "schema": {
  2342. "type": "string"
  2343. }
  2344. },
  2345. {
  2346. "name": "OCS-APIRequest",
  2347. "in": "header",
  2348. "description": "Required to be true for the API request to pass",
  2349. "required": true,
  2350. "schema": {
  2351. "type": "boolean",
  2352. "default": true
  2353. }
  2354. }
  2355. ],
  2356. "responses": {
  2357. "200": {
  2358. "description": "User disabled successfully",
  2359. "content": {
  2360. "application/json": {
  2361. "schema": {
  2362. "type": "object",
  2363. "required": [
  2364. "ocs"
  2365. ],
  2366. "properties": {
  2367. "ocs": {
  2368. "type": "object",
  2369. "required": [
  2370. "meta",
  2371. "data"
  2372. ],
  2373. "properties": {
  2374. "meta": {
  2375. "$ref": "#/components/schemas/OCSMeta"
  2376. },
  2377. "data": {}
  2378. }
  2379. }
  2380. }
  2381. }
  2382. }
  2383. }
  2384. }
  2385. }
  2386. }
  2387. },
  2388. "/ocs/v2.php/cloud/users/{userId}/groups": {
  2389. "get": {
  2390. "operationId": "users-get-users-groups",
  2391. "summary": "Get a list of groups the user belongs to",
  2392. "tags": [
  2393. "users"
  2394. ],
  2395. "security": [
  2396. {
  2397. "bearer_auth": []
  2398. },
  2399. {
  2400. "basic_auth": []
  2401. }
  2402. ],
  2403. "parameters": [
  2404. {
  2405. "name": "userId",
  2406. "in": "path",
  2407. "description": "ID of the user",
  2408. "required": true,
  2409. "schema": {
  2410. "type": "string"
  2411. }
  2412. },
  2413. {
  2414. "name": "OCS-APIRequest",
  2415. "in": "header",
  2416. "description": "Required to be true for the API request to pass",
  2417. "required": true,
  2418. "schema": {
  2419. "type": "boolean",
  2420. "default": true
  2421. }
  2422. }
  2423. ],
  2424. "responses": {
  2425. "200": {
  2426. "description": "Users groups returned",
  2427. "content": {
  2428. "application/json": {
  2429. "schema": {
  2430. "type": "object",
  2431. "required": [
  2432. "ocs"
  2433. ],
  2434. "properties": {
  2435. "ocs": {
  2436. "type": "object",
  2437. "required": [
  2438. "meta",
  2439. "data"
  2440. ],
  2441. "properties": {
  2442. "meta": {
  2443. "$ref": "#/components/schemas/OCSMeta"
  2444. },
  2445. "data": {
  2446. "type": "object",
  2447. "required": [
  2448. "groups"
  2449. ],
  2450. "properties": {
  2451. "groups": {
  2452. "type": "array",
  2453. "items": {
  2454. "type": "string"
  2455. }
  2456. }
  2457. }
  2458. }
  2459. }
  2460. }
  2461. }
  2462. }
  2463. }
  2464. }
  2465. }
  2466. }
  2467. },
  2468. "post": {
  2469. "operationId": "users-add-to-group",
  2470. "summary": "Add a user to a group",
  2471. "description": "This endpoint requires password confirmation",
  2472. "tags": [
  2473. "users"
  2474. ],
  2475. "security": [
  2476. {
  2477. "bearer_auth": []
  2478. },
  2479. {
  2480. "basic_auth": []
  2481. }
  2482. ],
  2483. "requestBody": {
  2484. "required": false,
  2485. "content": {
  2486. "application/json": {
  2487. "schema": {
  2488. "type": "object",
  2489. "properties": {
  2490. "groupid": {
  2491. "type": "string",
  2492. "default": "",
  2493. "description": "ID of the group"
  2494. }
  2495. }
  2496. }
  2497. }
  2498. }
  2499. },
  2500. "parameters": [
  2501. {
  2502. "name": "userId",
  2503. "in": "path",
  2504. "description": "ID of the user",
  2505. "required": true,
  2506. "schema": {
  2507. "type": "string"
  2508. }
  2509. },
  2510. {
  2511. "name": "OCS-APIRequest",
  2512. "in": "header",
  2513. "description": "Required to be true for the API request to pass",
  2514. "required": true,
  2515. "schema": {
  2516. "type": "boolean",
  2517. "default": true
  2518. }
  2519. }
  2520. ],
  2521. "responses": {
  2522. "200": {
  2523. "description": "User added to group successfully",
  2524. "content": {
  2525. "application/json": {
  2526. "schema": {
  2527. "type": "object",
  2528. "required": [
  2529. "ocs"
  2530. ],
  2531. "properties": {
  2532. "ocs": {
  2533. "type": "object",
  2534. "required": [
  2535. "meta",
  2536. "data"
  2537. ],
  2538. "properties": {
  2539. "meta": {
  2540. "$ref": "#/components/schemas/OCSMeta"
  2541. },
  2542. "data": {}
  2543. }
  2544. }
  2545. }
  2546. }
  2547. }
  2548. }
  2549. }
  2550. }
  2551. },
  2552. "delete": {
  2553. "operationId": "users-remove-from-group",
  2554. "summary": "Remove a user from a group",
  2555. "description": "This endpoint requires password confirmation",
  2556. "tags": [
  2557. "users"
  2558. ],
  2559. "security": [
  2560. {
  2561. "bearer_auth": []
  2562. },
  2563. {
  2564. "basic_auth": []
  2565. }
  2566. ],
  2567. "parameters": [
  2568. {
  2569. "name": "userId",
  2570. "in": "path",
  2571. "description": "ID of the user",
  2572. "required": true,
  2573. "schema": {
  2574. "type": "string"
  2575. }
  2576. },
  2577. {
  2578. "name": "groupid",
  2579. "in": "query",
  2580. "description": "ID of the group",
  2581. "required": true,
  2582. "schema": {
  2583. "type": "string"
  2584. }
  2585. },
  2586. {
  2587. "name": "OCS-APIRequest",
  2588. "in": "header",
  2589. "description": "Required to be true for the API request to pass",
  2590. "required": true,
  2591. "schema": {
  2592. "type": "boolean",
  2593. "default": true
  2594. }
  2595. }
  2596. ],
  2597. "responses": {
  2598. "200": {
  2599. "description": "User removed from group successfully",
  2600. "content": {
  2601. "application/json": {
  2602. "schema": {
  2603. "type": "object",
  2604. "required": [
  2605. "ocs"
  2606. ],
  2607. "properties": {
  2608. "ocs": {
  2609. "type": "object",
  2610. "required": [
  2611. "meta",
  2612. "data"
  2613. ],
  2614. "properties": {
  2615. "meta": {
  2616. "$ref": "#/components/schemas/OCSMeta"
  2617. },
  2618. "data": {}
  2619. }
  2620. }
  2621. }
  2622. }
  2623. }
  2624. }
  2625. }
  2626. }
  2627. }
  2628. },
  2629. "/ocs/v2.php/cloud/users/{userId}/groups/details": {
  2630. "get": {
  2631. "operationId": "users-get-users-groups-details",
  2632. "summary": "Get a list of groups with details",
  2633. "tags": [
  2634. "users"
  2635. ],
  2636. "security": [
  2637. {
  2638. "bearer_auth": []
  2639. },
  2640. {
  2641. "basic_auth": []
  2642. }
  2643. ],
  2644. "parameters": [
  2645. {
  2646. "name": "userId",
  2647. "in": "path",
  2648. "description": "ID of the user",
  2649. "required": true,
  2650. "schema": {
  2651. "type": "string"
  2652. }
  2653. },
  2654. {
  2655. "name": "OCS-APIRequest",
  2656. "in": "header",
  2657. "description": "Required to be true for the API request to pass",
  2658. "required": true,
  2659. "schema": {
  2660. "type": "boolean",
  2661. "default": true
  2662. }
  2663. }
  2664. ],
  2665. "responses": {
  2666. "200": {
  2667. "description": "Users groups returned",
  2668. "content": {
  2669. "application/json": {
  2670. "schema": {
  2671. "type": "object",
  2672. "required": [
  2673. "ocs"
  2674. ],
  2675. "properties": {
  2676. "ocs": {
  2677. "type": "object",
  2678. "required": [
  2679. "meta",
  2680. "data"
  2681. ],
  2682. "properties": {
  2683. "meta": {
  2684. "$ref": "#/components/schemas/OCSMeta"
  2685. },
  2686. "data": {
  2687. "type": "object",
  2688. "required": [
  2689. "groups"
  2690. ],
  2691. "properties": {
  2692. "groups": {
  2693. "type": "array",
  2694. "items": {
  2695. "$ref": "#/components/schemas/GroupDetails"
  2696. }
  2697. }
  2698. }
  2699. }
  2700. }
  2701. }
  2702. }
  2703. }
  2704. }
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "/ocs/v2.php/cloud/users/{userId}/subadmins/details": {
  2711. "get": {
  2712. "operationId": "users-get-user-sub-admin-groups-details",
  2713. "summary": "Get a list of the groups the user is a subadmin of, with details",
  2714. "tags": [
  2715. "users"
  2716. ],
  2717. "security": [
  2718. {
  2719. "bearer_auth": []
  2720. },
  2721. {
  2722. "basic_auth": []
  2723. }
  2724. ],
  2725. "parameters": [
  2726. {
  2727. "name": "userId",
  2728. "in": "path",
  2729. "description": "ID of the user",
  2730. "required": true,
  2731. "schema": {
  2732. "type": "string"
  2733. }
  2734. },
  2735. {
  2736. "name": "OCS-APIRequest",
  2737. "in": "header",
  2738. "description": "Required to be true for the API request to pass",
  2739. "required": true,
  2740. "schema": {
  2741. "type": "boolean",
  2742. "default": true
  2743. }
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "Users subadmin groups returned",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "object",
  2753. "required": [
  2754. "ocs"
  2755. ],
  2756. "properties": {
  2757. "ocs": {
  2758. "type": "object",
  2759. "required": [
  2760. "meta",
  2761. "data"
  2762. ],
  2763. "properties": {
  2764. "meta": {
  2765. "$ref": "#/components/schemas/OCSMeta"
  2766. },
  2767. "data": {
  2768. "type": "object",
  2769. "required": [
  2770. "groups"
  2771. ],
  2772. "properties": {
  2773. "groups": {
  2774. "type": "array",
  2775. "items": {
  2776. "$ref": "#/components/schemas/GroupDetails"
  2777. }
  2778. }
  2779. }
  2780. }
  2781. }
  2782. }
  2783. }
  2784. }
  2785. }
  2786. }
  2787. }
  2788. }
  2789. }
  2790. },
  2791. "/ocs/v2.php/cloud/users/{userId}/welcome": {
  2792. "post": {
  2793. "operationId": "users-resend-welcome-message",
  2794. "summary": "Resend the welcome message",
  2795. "description": "This endpoint requires password confirmation",
  2796. "tags": [
  2797. "users"
  2798. ],
  2799. "security": [
  2800. {
  2801. "bearer_auth": []
  2802. },
  2803. {
  2804. "basic_auth": []
  2805. }
  2806. ],
  2807. "parameters": [
  2808. {
  2809. "name": "userId",
  2810. "in": "path",
  2811. "description": "ID if the user",
  2812. "required": true,
  2813. "schema": {
  2814. "type": "string"
  2815. }
  2816. },
  2817. {
  2818. "name": "OCS-APIRequest",
  2819. "in": "header",
  2820. "description": "Required to be true for the API request to pass",
  2821. "required": true,
  2822. "schema": {
  2823. "type": "boolean",
  2824. "default": true
  2825. }
  2826. }
  2827. ],
  2828. "responses": {
  2829. "200": {
  2830. "description": "Resent welcome message successfully",
  2831. "content": {
  2832. "application/json": {
  2833. "schema": {
  2834. "type": "object",
  2835. "required": [
  2836. "ocs"
  2837. ],
  2838. "properties": {
  2839. "ocs": {
  2840. "type": "object",
  2841. "required": [
  2842. "meta",
  2843. "data"
  2844. ],
  2845. "properties": {
  2846. "meta": {
  2847. "$ref": "#/components/schemas/OCSMeta"
  2848. },
  2849. "data": {}
  2850. }
  2851. }
  2852. }
  2853. }
  2854. }
  2855. }
  2856. }
  2857. }
  2858. }
  2859. },
  2860. "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}": {
  2861. "post": {
  2862. "operationId": "app_config-set-value",
  2863. "summary": "Update the config value of an app",
  2864. "description": "This endpoint requires password confirmation",
  2865. "tags": [
  2866. "app_config"
  2867. ],
  2868. "security": [
  2869. {
  2870. "bearer_auth": []
  2871. },
  2872. {
  2873. "basic_auth": []
  2874. }
  2875. ],
  2876. "requestBody": {
  2877. "required": true,
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "type": "object",
  2882. "required": [
  2883. "value"
  2884. ],
  2885. "properties": {
  2886. "value": {
  2887. "type": "string",
  2888. "description": "New value for the key"
  2889. }
  2890. }
  2891. }
  2892. }
  2893. }
  2894. },
  2895. "parameters": [
  2896. {
  2897. "name": "app",
  2898. "in": "path",
  2899. "description": "ID of the app",
  2900. "required": true,
  2901. "schema": {
  2902. "type": "string"
  2903. }
  2904. },
  2905. {
  2906. "name": "key",
  2907. "in": "path",
  2908. "description": "Key to update",
  2909. "required": true,
  2910. "schema": {
  2911. "type": "string"
  2912. }
  2913. },
  2914. {
  2915. "name": "OCS-APIRequest",
  2916. "in": "header",
  2917. "description": "Required to be true for the API request to pass",
  2918. "required": true,
  2919. "schema": {
  2920. "type": "boolean",
  2921. "default": true
  2922. }
  2923. }
  2924. ],
  2925. "responses": {
  2926. "200": {
  2927. "description": "Value updated successfully",
  2928. "content": {
  2929. "application/json": {
  2930. "schema": {
  2931. "type": "object",
  2932. "required": [
  2933. "ocs"
  2934. ],
  2935. "properties": {
  2936. "ocs": {
  2937. "type": "object",
  2938. "required": [
  2939. "meta",
  2940. "data"
  2941. ],
  2942. "properties": {
  2943. "meta": {
  2944. "$ref": "#/components/schemas/OCSMeta"
  2945. },
  2946. "data": {}
  2947. }
  2948. }
  2949. }
  2950. }
  2951. }
  2952. }
  2953. },
  2954. "403": {
  2955. "description": "App or key is not allowed",
  2956. "content": {
  2957. "application/json": {
  2958. "schema": {
  2959. "type": "object",
  2960. "required": [
  2961. "ocs"
  2962. ],
  2963. "properties": {
  2964. "ocs": {
  2965. "type": "object",
  2966. "required": [
  2967. "meta",
  2968. "data"
  2969. ],
  2970. "properties": {
  2971. "meta": {
  2972. "$ref": "#/components/schemas/OCSMeta"
  2973. },
  2974. "data": {
  2975. "type": "object",
  2976. "required": [
  2977. "data"
  2978. ],
  2979. "properties": {
  2980. "data": {
  2981. "type": "object",
  2982. "required": [
  2983. "message"
  2984. ],
  2985. "properties": {
  2986. "message": {
  2987. "type": "string"
  2988. }
  2989. }
  2990. }
  2991. }
  2992. }
  2993. }
  2994. }
  2995. }
  2996. }
  2997. }
  2998. }
  2999. }
  3000. }
  3001. }
  3002. },
  3003. "/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}": {
  3004. "post": {
  3005. "operationId": "preferences-set-preference",
  3006. "summary": "Update a preference value of an app",
  3007. "tags": [
  3008. "preferences"
  3009. ],
  3010. "security": [
  3011. {
  3012. "bearer_auth": []
  3013. },
  3014. {
  3015. "basic_auth": []
  3016. }
  3017. ],
  3018. "requestBody": {
  3019. "required": true,
  3020. "content": {
  3021. "application/json": {
  3022. "schema": {
  3023. "type": "object",
  3024. "required": [
  3025. "configValue"
  3026. ],
  3027. "properties": {
  3028. "configValue": {
  3029. "type": "string",
  3030. "description": "New value"
  3031. }
  3032. }
  3033. }
  3034. }
  3035. }
  3036. },
  3037. "parameters": [
  3038. {
  3039. "name": "appId",
  3040. "in": "path",
  3041. "description": "ID of the app",
  3042. "required": true,
  3043. "schema": {
  3044. "type": "string"
  3045. }
  3046. },
  3047. {
  3048. "name": "configKey",
  3049. "in": "path",
  3050. "description": "Key of the preference",
  3051. "required": true,
  3052. "schema": {
  3053. "type": "string"
  3054. }
  3055. },
  3056. {
  3057. "name": "OCS-APIRequest",
  3058. "in": "header",
  3059. "description": "Required to be true for the API request to pass",
  3060. "required": true,
  3061. "schema": {
  3062. "type": "boolean",
  3063. "default": true
  3064. }
  3065. }
  3066. ],
  3067. "responses": {
  3068. "200": {
  3069. "description": "Preference updated successfully",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "type": "object",
  3074. "required": [
  3075. "ocs"
  3076. ],
  3077. "properties": {
  3078. "ocs": {
  3079. "type": "object",
  3080. "required": [
  3081. "meta",
  3082. "data"
  3083. ],
  3084. "properties": {
  3085. "meta": {
  3086. "$ref": "#/components/schemas/OCSMeta"
  3087. },
  3088. "data": {}
  3089. }
  3090. }
  3091. }
  3092. }
  3093. }
  3094. }
  3095. },
  3096. "400": {
  3097. "description": "Preference invalid",
  3098. "content": {
  3099. "application/json": {
  3100. "schema": {
  3101. "type": "object",
  3102. "required": [
  3103. "ocs"
  3104. ],
  3105. "properties": {
  3106. "ocs": {
  3107. "type": "object",
  3108. "required": [
  3109. "meta",
  3110. "data"
  3111. ],
  3112. "properties": {
  3113. "meta": {
  3114. "$ref": "#/components/schemas/OCSMeta"
  3115. },
  3116. "data": {}
  3117. }
  3118. }
  3119. }
  3120. }
  3121. }
  3122. }
  3123. }
  3124. }
  3125. },
  3126. "delete": {
  3127. "operationId": "preferences-delete-preference",
  3128. "summary": "Delete a preference for an app",
  3129. "tags": [
  3130. "preferences"
  3131. ],
  3132. "security": [
  3133. {
  3134. "bearer_auth": []
  3135. },
  3136. {
  3137. "basic_auth": []
  3138. }
  3139. ],
  3140. "parameters": [
  3141. {
  3142. "name": "appId",
  3143. "in": "path",
  3144. "description": "ID of the app",
  3145. "required": true,
  3146. "schema": {
  3147. "type": "string"
  3148. }
  3149. },
  3150. {
  3151. "name": "configKey",
  3152. "in": "path",
  3153. "description": "Key to delete",
  3154. "required": true,
  3155. "schema": {
  3156. "type": "string"
  3157. }
  3158. },
  3159. {
  3160. "name": "OCS-APIRequest",
  3161. "in": "header",
  3162. "description": "Required to be true for the API request to pass",
  3163. "required": true,
  3164. "schema": {
  3165. "type": "boolean",
  3166. "default": true
  3167. }
  3168. }
  3169. ],
  3170. "responses": {
  3171. "200": {
  3172. "description": "Preference deleted successfully",
  3173. "content": {
  3174. "application/json": {
  3175. "schema": {
  3176. "type": "object",
  3177. "required": [
  3178. "ocs"
  3179. ],
  3180. "properties": {
  3181. "ocs": {
  3182. "type": "object",
  3183. "required": [
  3184. "meta",
  3185. "data"
  3186. ],
  3187. "properties": {
  3188. "meta": {
  3189. "$ref": "#/components/schemas/OCSMeta"
  3190. },
  3191. "data": {}
  3192. }
  3193. }
  3194. }
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Preference invalid",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "type": "object",
  3205. "required": [
  3206. "ocs"
  3207. ],
  3208. "properties": {
  3209. "ocs": {
  3210. "type": "object",
  3211. "required": [
  3212. "meta",
  3213. "data"
  3214. ],
  3215. "properties": {
  3216. "meta": {
  3217. "$ref": "#/components/schemas/OCSMeta"
  3218. },
  3219. "data": {}
  3220. }
  3221. }
  3222. }
  3223. }
  3224. }
  3225. }
  3226. }
  3227. }
  3228. }
  3229. },
  3230. "/ocs/v2.php/apps/provisioning_api/api/v1/config/users/{appId}": {
  3231. "post": {
  3232. "operationId": "preferences-set-multiple-preferences",
  3233. "summary": "Update multiple preference values of an app",
  3234. "tags": [
  3235. "preferences"
  3236. ],
  3237. "security": [
  3238. {
  3239. "bearer_auth": []
  3240. },
  3241. {
  3242. "basic_auth": []
  3243. }
  3244. ],
  3245. "requestBody": {
  3246. "required": true,
  3247. "content": {
  3248. "application/json": {
  3249. "schema": {
  3250. "type": "object",
  3251. "required": [
  3252. "configs"
  3253. ],
  3254. "properties": {
  3255. "configs": {
  3256. "type": "object",
  3257. "description": "Key-value pairs of the preferences",
  3258. "additionalProperties": {
  3259. "type": "string"
  3260. }
  3261. }
  3262. }
  3263. }
  3264. }
  3265. }
  3266. },
  3267. "parameters": [
  3268. {
  3269. "name": "appId",
  3270. "in": "path",
  3271. "description": "ID of the app",
  3272. "required": true,
  3273. "schema": {
  3274. "type": "string"
  3275. }
  3276. },
  3277. {
  3278. "name": "OCS-APIRequest",
  3279. "in": "header",
  3280. "description": "Required to be true for the API request to pass",
  3281. "required": true,
  3282. "schema": {
  3283. "type": "boolean",
  3284. "default": true
  3285. }
  3286. }
  3287. ],
  3288. "responses": {
  3289. "200": {
  3290. "description": "Preferences updated successfully",
  3291. "content": {
  3292. "application/json": {
  3293. "schema": {
  3294. "type": "object",
  3295. "required": [
  3296. "ocs"
  3297. ],
  3298. "properties": {
  3299. "ocs": {
  3300. "type": "object",
  3301. "required": [
  3302. "meta",
  3303. "data"
  3304. ],
  3305. "properties": {
  3306. "meta": {
  3307. "$ref": "#/components/schemas/OCSMeta"
  3308. },
  3309. "data": {}
  3310. }
  3311. }
  3312. }
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "400": {
  3318. "description": "Preference invalid",
  3319. "content": {
  3320. "application/json": {
  3321. "schema": {
  3322. "type": "object",
  3323. "required": [
  3324. "ocs"
  3325. ],
  3326. "properties": {
  3327. "ocs": {
  3328. "type": "object",
  3329. "required": [
  3330. "meta",
  3331. "data"
  3332. ],
  3333. "properties": {
  3334. "meta": {
  3335. "$ref": "#/components/schemas/OCSMeta"
  3336. },
  3337. "data": {}
  3338. }
  3339. }
  3340. }
  3341. }
  3342. }
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "delete": {
  3348. "operationId": "preferences-delete-multiple-preference",
  3349. "summary": "Delete multiple preferences for an app",
  3350. "tags": [
  3351. "preferences"
  3352. ],
  3353. "security": [
  3354. {
  3355. "bearer_auth": []
  3356. },
  3357. {
  3358. "basic_auth": []
  3359. }
  3360. ],
  3361. "parameters": [
  3362. {
  3363. "name": "appId",
  3364. "in": "path",
  3365. "description": "ID of the app",
  3366. "required": true,
  3367. "schema": {
  3368. "type": "string"
  3369. }
  3370. },
  3371. {
  3372. "name": "configKeys[]",
  3373. "in": "query",
  3374. "description": "Keys to delete",
  3375. "required": true,
  3376. "schema": {
  3377. "type": "array",
  3378. "items": {
  3379. "type": "string"
  3380. }
  3381. }
  3382. },
  3383. {
  3384. "name": "OCS-APIRequest",
  3385. "in": "header",
  3386. "description": "Required to be true for the API request to pass",
  3387. "required": true,
  3388. "schema": {
  3389. "type": "boolean",
  3390. "default": true
  3391. }
  3392. }
  3393. ],
  3394. "responses": {
  3395. "200": {
  3396. "description": "Preferences deleted successfully",
  3397. "content": {
  3398. "application/json": {
  3399. "schema": {
  3400. "type": "object",
  3401. "required": [
  3402. "ocs"
  3403. ],
  3404. "properties": {
  3405. "ocs": {
  3406. "type": "object",
  3407. "required": [
  3408. "meta",
  3409. "data"
  3410. ],
  3411. "properties": {
  3412. "meta": {
  3413. "$ref": "#/components/schemas/OCSMeta"
  3414. },
  3415. "data": {}
  3416. }
  3417. }
  3418. }
  3419. }
  3420. }
  3421. }
  3422. },
  3423. "400": {
  3424. "description": "Preference invalid",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "type": "object",
  3429. "required": [
  3430. "ocs"
  3431. ],
  3432. "properties": {
  3433. "ocs": {
  3434. "type": "object",
  3435. "required": [
  3436. "meta",
  3437. "data"
  3438. ],
  3439. "properties": {
  3440. "meta": {
  3441. "$ref": "#/components/schemas/OCSMeta"
  3442. },
  3443. "data": {}
  3444. }
  3445. }
  3446. }
  3447. }
  3448. }
  3449. }
  3450. }
  3451. }
  3452. }
  3453. }
  3454. },
  3455. "tags": []
  3456. }