openapi-administration.json 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "provisioning_api-administration",
  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. "OCSMeta": {
  56. "type": "object",
  57. "required": [
  58. "status",
  59. "statuscode"
  60. ],
  61. "properties": {
  62. "status": {
  63. "type": "string"
  64. },
  65. "statuscode": {
  66. "type": "integer"
  67. },
  68. "message": {
  69. "type": "string"
  70. },
  71. "totalitems": {
  72. "type": "string"
  73. },
  74. "itemsperpage": {
  75. "type": "string"
  76. }
  77. }
  78. },
  79. "UserDetails": {
  80. "type": "object",
  81. "required": [
  82. "additional_mail",
  83. "address",
  84. "backend",
  85. "backendCapabilities",
  86. "biography",
  87. "display-name",
  88. "displayname",
  89. "email",
  90. "fediverse",
  91. "groups",
  92. "headline",
  93. "id",
  94. "language",
  95. "firstLogin",
  96. "lastLogin",
  97. "locale",
  98. "manager",
  99. "notify_email",
  100. "organisation",
  101. "phone",
  102. "profile_enabled",
  103. "pronouns",
  104. "quota",
  105. "role",
  106. "subadmin",
  107. "twitter",
  108. "website"
  109. ],
  110. "properties": {
  111. "additional_mail": {
  112. "type": "array",
  113. "items": {
  114. "type": "string"
  115. }
  116. },
  117. "additional_mailScope": {
  118. "type": "array",
  119. "items": {
  120. "$ref": "#/components/schemas/UserDetailsScope"
  121. }
  122. },
  123. "address": {
  124. "type": "string"
  125. },
  126. "addressScope": {
  127. "$ref": "#/components/schemas/UserDetailsScope"
  128. },
  129. "avatarScope": {
  130. "$ref": "#/components/schemas/UserDetailsScope"
  131. },
  132. "backend": {
  133. "type": "string"
  134. },
  135. "backendCapabilities": {
  136. "type": "object",
  137. "required": [
  138. "setDisplayName",
  139. "setPassword"
  140. ],
  141. "properties": {
  142. "setDisplayName": {
  143. "type": "boolean"
  144. },
  145. "setPassword": {
  146. "type": "boolean"
  147. }
  148. }
  149. },
  150. "biography": {
  151. "type": "string"
  152. },
  153. "biographyScope": {
  154. "$ref": "#/components/schemas/UserDetailsScope"
  155. },
  156. "display-name": {
  157. "type": "string"
  158. },
  159. "displayname": {
  160. "type": "string"
  161. },
  162. "displaynameScope": {
  163. "$ref": "#/components/schemas/UserDetailsScope"
  164. },
  165. "email": {
  166. "type": "string",
  167. "nullable": true
  168. },
  169. "emailScope": {
  170. "$ref": "#/components/schemas/UserDetailsScope"
  171. },
  172. "enabled": {
  173. "type": "boolean"
  174. },
  175. "fediverse": {
  176. "type": "string"
  177. },
  178. "fediverseScope": {
  179. "$ref": "#/components/schemas/UserDetailsScope"
  180. },
  181. "groups": {
  182. "type": "array",
  183. "items": {
  184. "type": "string"
  185. }
  186. },
  187. "headline": {
  188. "type": "string"
  189. },
  190. "headlineScope": {
  191. "$ref": "#/components/schemas/UserDetailsScope"
  192. },
  193. "id": {
  194. "type": "string"
  195. },
  196. "language": {
  197. "type": "string"
  198. },
  199. "firstLogin": {
  200. "type": "integer",
  201. "format": "int64"
  202. },
  203. "lastLogin": {
  204. "type": "integer",
  205. "format": "int64"
  206. },
  207. "locale": {
  208. "type": "string"
  209. },
  210. "manager": {
  211. "type": "string"
  212. },
  213. "notify_email": {
  214. "type": "string",
  215. "nullable": true
  216. },
  217. "organisation": {
  218. "type": "string"
  219. },
  220. "organisationScope": {
  221. "$ref": "#/components/schemas/UserDetailsScope"
  222. },
  223. "phone": {
  224. "type": "string"
  225. },
  226. "phoneScope": {
  227. "$ref": "#/components/schemas/UserDetailsScope"
  228. },
  229. "profile_enabled": {
  230. "type": "string"
  231. },
  232. "profile_enabledScope": {
  233. "$ref": "#/components/schemas/UserDetailsScope"
  234. },
  235. "pronouns": {
  236. "type": "string"
  237. },
  238. "pronounsScope": {
  239. "$ref": "#/components/schemas/UserDetailsScope"
  240. },
  241. "quota": {
  242. "$ref": "#/components/schemas/UserDetailsQuota"
  243. },
  244. "role": {
  245. "type": "string"
  246. },
  247. "roleScope": {
  248. "$ref": "#/components/schemas/UserDetailsScope"
  249. },
  250. "storageLocation": {
  251. "type": "string"
  252. },
  253. "subadmin": {
  254. "type": "array",
  255. "items": {
  256. "type": "string"
  257. }
  258. },
  259. "twitter": {
  260. "type": "string"
  261. },
  262. "twitterScope": {
  263. "$ref": "#/components/schemas/UserDetailsScope"
  264. },
  265. "website": {
  266. "type": "string"
  267. },
  268. "websiteScope": {
  269. "$ref": "#/components/schemas/UserDetailsScope"
  270. }
  271. }
  272. },
  273. "UserDetailsQuota": {
  274. "type": "object",
  275. "properties": {
  276. "free": {
  277. "anyOf": [
  278. {
  279. "type": "number",
  280. "format": "double"
  281. },
  282. {
  283. "type": "integer",
  284. "format": "int64"
  285. }
  286. ]
  287. },
  288. "quota": {
  289. "anyOf": [
  290. {
  291. "type": "number",
  292. "format": "double"
  293. },
  294. {
  295. "type": "integer",
  296. "format": "int64"
  297. },
  298. {
  299. "type": "string"
  300. }
  301. ]
  302. },
  303. "relative": {
  304. "anyOf": [
  305. {
  306. "type": "number",
  307. "format": "double"
  308. },
  309. {
  310. "type": "integer",
  311. "format": "int64"
  312. }
  313. ]
  314. },
  315. "total": {
  316. "anyOf": [
  317. {
  318. "type": "number",
  319. "format": "double"
  320. },
  321. {
  322. "type": "integer",
  323. "format": "int64"
  324. }
  325. ]
  326. },
  327. "used": {
  328. "anyOf": [
  329. {
  330. "type": "number",
  331. "format": "double"
  332. },
  333. {
  334. "type": "integer",
  335. "format": "int64"
  336. }
  337. ]
  338. }
  339. }
  340. },
  341. "UserDetailsScope": {
  342. "type": "string",
  343. "enum": [
  344. "v2-private",
  345. "v2-local",
  346. "v2-federated",
  347. "v2-published",
  348. "private",
  349. "contacts",
  350. "public"
  351. ]
  352. }
  353. }
  354. },
  355. "paths": {
  356. "/ocs/v2.php/cloud/apps": {
  357. "get": {
  358. "operationId": "apps-get-apps",
  359. "summary": "Get a list of installed apps",
  360. "description": "This endpoint requires admin access",
  361. "tags": [
  362. "apps"
  363. ],
  364. "security": [
  365. {
  366. "bearer_auth": []
  367. },
  368. {
  369. "basic_auth": []
  370. }
  371. ],
  372. "parameters": [
  373. {
  374. "name": "filter",
  375. "in": "query",
  376. "description": "Filter for enabled or disabled apps",
  377. "schema": {
  378. "type": "string",
  379. "nullable": true
  380. }
  381. },
  382. {
  383. "name": "OCS-APIRequest",
  384. "in": "header",
  385. "description": "Required to be true for the API request to pass",
  386. "required": true,
  387. "schema": {
  388. "type": "boolean",
  389. "default": true
  390. }
  391. }
  392. ],
  393. "responses": {
  394. "200": {
  395. "description": "Installed apps returned",
  396. "content": {
  397. "application/json": {
  398. "schema": {
  399. "type": "object",
  400. "required": [
  401. "ocs"
  402. ],
  403. "properties": {
  404. "ocs": {
  405. "type": "object",
  406. "required": [
  407. "meta",
  408. "data"
  409. ],
  410. "properties": {
  411. "meta": {
  412. "$ref": "#/components/schemas/OCSMeta"
  413. },
  414. "data": {
  415. "type": "object",
  416. "required": [
  417. "apps"
  418. ],
  419. "properties": {
  420. "apps": {
  421. "type": "array",
  422. "items": {
  423. "type": "string"
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }
  435. }
  436. }
  437. },
  438. "/ocs/v2.php/cloud/apps/{app}": {
  439. "get": {
  440. "operationId": "apps-get-app-info",
  441. "summary": "Get the app info for an app",
  442. "description": "This endpoint requires admin access",
  443. "tags": [
  444. "apps"
  445. ],
  446. "security": [
  447. {
  448. "bearer_auth": []
  449. },
  450. {
  451. "basic_auth": []
  452. }
  453. ],
  454. "parameters": [
  455. {
  456. "name": "app",
  457. "in": "path",
  458. "description": "ID of the app",
  459. "required": true,
  460. "schema": {
  461. "type": "string"
  462. }
  463. },
  464. {
  465. "name": "OCS-APIRequest",
  466. "in": "header",
  467. "description": "Required to be true for the API request to pass",
  468. "required": true,
  469. "schema": {
  470. "type": "boolean",
  471. "default": true
  472. }
  473. }
  474. ],
  475. "responses": {
  476. "200": {
  477. "description": "App info returned",
  478. "content": {
  479. "application/json": {
  480. "schema": {
  481. "type": "object",
  482. "required": [
  483. "ocs"
  484. ],
  485. "properties": {
  486. "ocs": {
  487. "type": "object",
  488. "required": [
  489. "meta",
  490. "data"
  491. ],
  492. "properties": {
  493. "meta": {
  494. "$ref": "#/components/schemas/OCSMeta"
  495. },
  496. "data": {
  497. "type": "object",
  498. "additionalProperties": {
  499. "type": "object",
  500. "nullable": true
  501. }
  502. }
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. },
  512. "post": {
  513. "operationId": "apps-enable",
  514. "summary": "Enable an app",
  515. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  516. "tags": [
  517. "apps"
  518. ],
  519. "security": [
  520. {
  521. "bearer_auth": []
  522. },
  523. {
  524. "basic_auth": []
  525. }
  526. ],
  527. "parameters": [
  528. {
  529. "name": "app",
  530. "in": "path",
  531. "description": "ID of the app",
  532. "required": true,
  533. "schema": {
  534. "type": "string"
  535. }
  536. },
  537. {
  538. "name": "OCS-APIRequest",
  539. "in": "header",
  540. "description": "Required to be true for the API request to pass",
  541. "required": true,
  542. "schema": {
  543. "type": "boolean",
  544. "default": true
  545. }
  546. }
  547. ],
  548. "responses": {
  549. "200": {
  550. "description": "App enabled successfully",
  551. "content": {
  552. "application/json": {
  553. "schema": {
  554. "type": "object",
  555. "required": [
  556. "ocs"
  557. ],
  558. "properties": {
  559. "ocs": {
  560. "type": "object",
  561. "required": [
  562. "meta",
  563. "data"
  564. ],
  565. "properties": {
  566. "meta": {
  567. "$ref": "#/components/schemas/OCSMeta"
  568. },
  569. "data": {}
  570. }
  571. }
  572. }
  573. }
  574. }
  575. }
  576. }
  577. }
  578. },
  579. "delete": {
  580. "operationId": "apps-disable",
  581. "summary": "Disable an app",
  582. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  583. "tags": [
  584. "apps"
  585. ],
  586. "security": [
  587. {
  588. "bearer_auth": []
  589. },
  590. {
  591. "basic_auth": []
  592. }
  593. ],
  594. "parameters": [
  595. {
  596. "name": "app",
  597. "in": "path",
  598. "description": "ID of the app",
  599. "required": true,
  600. "schema": {
  601. "type": "string"
  602. }
  603. },
  604. {
  605. "name": "OCS-APIRequest",
  606. "in": "header",
  607. "description": "Required to be true for the API request to pass",
  608. "required": true,
  609. "schema": {
  610. "type": "boolean",
  611. "default": true
  612. }
  613. }
  614. ],
  615. "responses": {
  616. "200": {
  617. "description": "App disabled successfully",
  618. "content": {
  619. "application/json": {
  620. "schema": {
  621. "type": "object",
  622. "required": [
  623. "ocs"
  624. ],
  625. "properties": {
  626. "ocs": {
  627. "type": "object",
  628. "required": [
  629. "meta",
  630. "data"
  631. ],
  632. "properties": {
  633. "meta": {
  634. "$ref": "#/components/schemas/OCSMeta"
  635. },
  636. "data": {}
  637. }
  638. }
  639. }
  640. }
  641. }
  642. }
  643. }
  644. }
  645. }
  646. },
  647. "/ocs/v2.php/cloud/groups/{groupId}/subadmins": {
  648. "get": {
  649. "operationId": "groups-get-sub-admins-of-group",
  650. "summary": "Get the list of user IDs that are a subadmin of the group",
  651. "description": "This endpoint requires admin access",
  652. "tags": [
  653. "groups"
  654. ],
  655. "security": [
  656. {
  657. "bearer_auth": []
  658. },
  659. {
  660. "basic_auth": []
  661. }
  662. ],
  663. "parameters": [
  664. {
  665. "name": "groupId",
  666. "in": "path",
  667. "description": "ID of the group",
  668. "required": true,
  669. "schema": {
  670. "type": "string",
  671. "pattern": "^.+$"
  672. }
  673. },
  674. {
  675. "name": "OCS-APIRequest",
  676. "in": "header",
  677. "description": "Required to be true for the API request to pass",
  678. "required": true,
  679. "schema": {
  680. "type": "boolean",
  681. "default": true
  682. }
  683. }
  684. ],
  685. "responses": {
  686. "200": {
  687. "description": "Sub admins returned",
  688. "content": {
  689. "application/json": {
  690. "schema": {
  691. "type": "object",
  692. "required": [
  693. "ocs"
  694. ],
  695. "properties": {
  696. "ocs": {
  697. "type": "object",
  698. "required": [
  699. "meta",
  700. "data"
  701. ],
  702. "properties": {
  703. "meta": {
  704. "$ref": "#/components/schemas/OCSMeta"
  705. },
  706. "data": {
  707. "type": "array",
  708. "items": {
  709. "type": "string"
  710. }
  711. }
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. }
  719. }
  720. }
  721. },
  722. "/ocs/v2.php/cloud/groups": {
  723. "post": {
  724. "operationId": "groups-add-group",
  725. "summary": "Create a new group",
  726. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  727. "tags": [
  728. "groups"
  729. ],
  730. "security": [
  731. {
  732. "bearer_auth": []
  733. },
  734. {
  735. "basic_auth": []
  736. }
  737. ],
  738. "requestBody": {
  739. "required": true,
  740. "content": {
  741. "application/json": {
  742. "schema": {
  743. "type": "object",
  744. "required": [
  745. "groupid"
  746. ],
  747. "properties": {
  748. "groupid": {
  749. "type": "string",
  750. "description": "ID of the group"
  751. },
  752. "displayname": {
  753. "type": "string",
  754. "default": "",
  755. "description": "Display name of the group"
  756. }
  757. }
  758. }
  759. }
  760. }
  761. },
  762. "parameters": [
  763. {
  764. "name": "OCS-APIRequest",
  765. "in": "header",
  766. "description": "Required to be true for the API request to pass",
  767. "required": true,
  768. "schema": {
  769. "type": "boolean",
  770. "default": true
  771. }
  772. }
  773. ],
  774. "responses": {
  775. "200": {
  776. "description": "Group created successfully",
  777. "content": {
  778. "application/json": {
  779. "schema": {
  780. "type": "object",
  781. "required": [
  782. "ocs"
  783. ],
  784. "properties": {
  785. "ocs": {
  786. "type": "object",
  787. "required": [
  788. "meta",
  789. "data"
  790. ],
  791. "properties": {
  792. "meta": {
  793. "$ref": "#/components/schemas/OCSMeta"
  794. },
  795. "data": {}
  796. }
  797. }
  798. }
  799. }
  800. }
  801. }
  802. }
  803. }
  804. }
  805. },
  806. "/ocs/v2.php/cloud/groups/{groupId}": {
  807. "put": {
  808. "operationId": "groups-update-group",
  809. "summary": "Update a group",
  810. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  811. "tags": [
  812. "groups"
  813. ],
  814. "security": [
  815. {
  816. "bearer_auth": []
  817. },
  818. {
  819. "basic_auth": []
  820. }
  821. ],
  822. "requestBody": {
  823. "required": true,
  824. "content": {
  825. "application/json": {
  826. "schema": {
  827. "type": "object",
  828. "required": [
  829. "key",
  830. "value"
  831. ],
  832. "properties": {
  833. "key": {
  834. "type": "string",
  835. "description": "Key to update, only 'displayname'"
  836. },
  837. "value": {
  838. "type": "string",
  839. "description": "New value for the key"
  840. }
  841. }
  842. }
  843. }
  844. }
  845. },
  846. "parameters": [
  847. {
  848. "name": "groupId",
  849. "in": "path",
  850. "description": "ID of the group",
  851. "required": true,
  852. "schema": {
  853. "type": "string",
  854. "pattern": "^.+$"
  855. }
  856. },
  857. {
  858. "name": "OCS-APIRequest",
  859. "in": "header",
  860. "description": "Required to be true for the API request to pass",
  861. "required": true,
  862. "schema": {
  863. "type": "boolean",
  864. "default": true
  865. }
  866. }
  867. ],
  868. "responses": {
  869. "200": {
  870. "description": "Group updated successfully",
  871. "content": {
  872. "application/json": {
  873. "schema": {
  874. "type": "object",
  875. "required": [
  876. "ocs"
  877. ],
  878. "properties": {
  879. "ocs": {
  880. "type": "object",
  881. "required": [
  882. "meta",
  883. "data"
  884. ],
  885. "properties": {
  886. "meta": {
  887. "$ref": "#/components/schemas/OCSMeta"
  888. },
  889. "data": {}
  890. }
  891. }
  892. }
  893. }
  894. }
  895. }
  896. }
  897. }
  898. },
  899. "delete": {
  900. "operationId": "groups-delete-group",
  901. "summary": "Delete a group",
  902. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  903. "tags": [
  904. "groups"
  905. ],
  906. "security": [
  907. {
  908. "bearer_auth": []
  909. },
  910. {
  911. "basic_auth": []
  912. }
  913. ],
  914. "parameters": [
  915. {
  916. "name": "groupId",
  917. "in": "path",
  918. "description": "ID of the group",
  919. "required": true,
  920. "schema": {
  921. "type": "string",
  922. "pattern": "^.+$"
  923. }
  924. },
  925. {
  926. "name": "OCS-APIRequest",
  927. "in": "header",
  928. "description": "Required to be true for the API request to pass",
  929. "required": true,
  930. "schema": {
  931. "type": "boolean",
  932. "default": true
  933. }
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Group deleted successfully",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "object",
  943. "required": [
  944. "ocs"
  945. ],
  946. "properties": {
  947. "ocs": {
  948. "type": "object",
  949. "required": [
  950. "meta",
  951. "data"
  952. ],
  953. "properties": {
  954. "meta": {
  955. "$ref": "#/components/schemas/OCSMeta"
  956. },
  957. "data": {}
  958. }
  959. }
  960. }
  961. }
  962. }
  963. }
  964. }
  965. }
  966. }
  967. },
  968. "/ocs/v2.php/cloud/users/recent": {
  969. "get": {
  970. "operationId": "users-get-last-logged-in-users",
  971. "summary": "Gets the list of users sorted by lastLogin, from most recent to least recent",
  972. "description": "This endpoint requires admin access",
  973. "tags": [
  974. "users"
  975. ],
  976. "security": [
  977. {
  978. "bearer_auth": []
  979. },
  980. {
  981. "basic_auth": []
  982. }
  983. ],
  984. "parameters": [
  985. {
  986. "name": "search",
  987. "in": "query",
  988. "description": "Text to search for",
  989. "schema": {
  990. "type": "string",
  991. "default": ""
  992. }
  993. },
  994. {
  995. "name": "limit",
  996. "in": "query",
  997. "description": "Limit the amount of users returned",
  998. "schema": {
  999. "type": "integer",
  1000. "format": "int64",
  1001. "nullable": true
  1002. }
  1003. },
  1004. {
  1005. "name": "offset",
  1006. "in": "query",
  1007. "description": "Offset",
  1008. "schema": {
  1009. "type": "integer",
  1010. "format": "int64",
  1011. "default": 0
  1012. }
  1013. },
  1014. {
  1015. "name": "OCS-APIRequest",
  1016. "in": "header",
  1017. "description": "Required to be true for the API request to pass",
  1018. "required": true,
  1019. "schema": {
  1020. "type": "boolean",
  1021. "default": true
  1022. }
  1023. }
  1024. ],
  1025. "responses": {
  1026. "200": {
  1027. "description": "Users details returned based on last logged in information",
  1028. "content": {
  1029. "application/json": {
  1030. "schema": {
  1031. "type": "object",
  1032. "required": [
  1033. "ocs"
  1034. ],
  1035. "properties": {
  1036. "ocs": {
  1037. "type": "object",
  1038. "required": [
  1039. "meta",
  1040. "data"
  1041. ],
  1042. "properties": {
  1043. "meta": {
  1044. "$ref": "#/components/schemas/OCSMeta"
  1045. },
  1046. "data": {
  1047. "type": "object",
  1048. "required": [
  1049. "users"
  1050. ],
  1051. "properties": {
  1052. "users": {
  1053. "type": "object",
  1054. "additionalProperties": {
  1055. "anyOf": [
  1056. {
  1057. "$ref": "#/components/schemas/UserDetails"
  1058. },
  1059. {
  1060. "type": "object",
  1061. "required": [
  1062. "id"
  1063. ],
  1064. "properties": {
  1065. "id": {
  1066. "type": "string"
  1067. }
  1068. }
  1069. }
  1070. ]
  1071. }
  1072. }
  1073. }
  1074. }
  1075. }
  1076. }
  1077. }
  1078. }
  1079. }
  1080. }
  1081. }
  1082. }
  1083. }
  1084. },
  1085. "/ocs/v2.php/cloud/users/{userId}/subadmins": {
  1086. "get": {
  1087. "operationId": "users-get-user-sub-admin-groups",
  1088. "summary": "Get the groups a user is a subadmin of",
  1089. "description": "This endpoint requires admin access",
  1090. "tags": [
  1091. "users"
  1092. ],
  1093. "security": [
  1094. {
  1095. "bearer_auth": []
  1096. },
  1097. {
  1098. "basic_auth": []
  1099. }
  1100. ],
  1101. "parameters": [
  1102. {
  1103. "name": "userId",
  1104. "in": "path",
  1105. "description": "ID if the user",
  1106. "required": true,
  1107. "schema": {
  1108. "type": "string"
  1109. }
  1110. },
  1111. {
  1112. "name": "OCS-APIRequest",
  1113. "in": "header",
  1114. "description": "Required to be true for the API request to pass",
  1115. "required": true,
  1116. "schema": {
  1117. "type": "boolean",
  1118. "default": true
  1119. }
  1120. }
  1121. ],
  1122. "responses": {
  1123. "200": {
  1124. "description": "User subadmin groups returned",
  1125. "content": {
  1126. "application/json": {
  1127. "schema": {
  1128. "type": "object",
  1129. "required": [
  1130. "ocs"
  1131. ],
  1132. "properties": {
  1133. "ocs": {
  1134. "type": "object",
  1135. "required": [
  1136. "meta",
  1137. "data"
  1138. ],
  1139. "properties": {
  1140. "meta": {
  1141. "$ref": "#/components/schemas/OCSMeta"
  1142. },
  1143. "data": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. }
  1148. }
  1149. }
  1150. }
  1151. }
  1152. }
  1153. }
  1154. }
  1155. }
  1156. }
  1157. },
  1158. "post": {
  1159. "operationId": "users-add-sub-admin",
  1160. "summary": "Make a user a subadmin of a group",
  1161. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  1162. "tags": [
  1163. "users"
  1164. ],
  1165. "security": [
  1166. {
  1167. "bearer_auth": []
  1168. },
  1169. {
  1170. "basic_auth": []
  1171. }
  1172. ],
  1173. "requestBody": {
  1174. "required": true,
  1175. "content": {
  1176. "application/json": {
  1177. "schema": {
  1178. "type": "object",
  1179. "required": [
  1180. "groupid"
  1181. ],
  1182. "properties": {
  1183. "groupid": {
  1184. "type": "string",
  1185. "description": "ID of the group"
  1186. }
  1187. }
  1188. }
  1189. }
  1190. }
  1191. },
  1192. "parameters": [
  1193. {
  1194. "name": "userId",
  1195. "in": "path",
  1196. "description": "ID of the user",
  1197. "required": true,
  1198. "schema": {
  1199. "type": "string"
  1200. }
  1201. },
  1202. {
  1203. "name": "OCS-APIRequest",
  1204. "in": "header",
  1205. "description": "Required to be true for the API request to pass",
  1206. "required": true,
  1207. "schema": {
  1208. "type": "boolean",
  1209. "default": true
  1210. }
  1211. }
  1212. ],
  1213. "responses": {
  1214. "200": {
  1215. "description": "User added as group subadmin successfully",
  1216. "content": {
  1217. "application/json": {
  1218. "schema": {
  1219. "type": "object",
  1220. "required": [
  1221. "ocs"
  1222. ],
  1223. "properties": {
  1224. "ocs": {
  1225. "type": "object",
  1226. "required": [
  1227. "meta",
  1228. "data"
  1229. ],
  1230. "properties": {
  1231. "meta": {
  1232. "$ref": "#/components/schemas/OCSMeta"
  1233. },
  1234. "data": {}
  1235. }
  1236. }
  1237. }
  1238. }
  1239. }
  1240. }
  1241. }
  1242. }
  1243. },
  1244. "delete": {
  1245. "operationId": "users-remove-sub-admin",
  1246. "summary": "Remove a user from the subadmins of a group",
  1247. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  1248. "tags": [
  1249. "users"
  1250. ],
  1251. "security": [
  1252. {
  1253. "bearer_auth": []
  1254. },
  1255. {
  1256. "basic_auth": []
  1257. }
  1258. ],
  1259. "parameters": [
  1260. {
  1261. "name": "userId",
  1262. "in": "path",
  1263. "description": "ID of the user",
  1264. "required": true,
  1265. "schema": {
  1266. "type": "string"
  1267. }
  1268. },
  1269. {
  1270. "name": "groupid",
  1271. "in": "query",
  1272. "description": "ID of the group",
  1273. "required": true,
  1274. "schema": {
  1275. "type": "string"
  1276. }
  1277. },
  1278. {
  1279. "name": "OCS-APIRequest",
  1280. "in": "header",
  1281. "description": "Required to be true for the API request to pass",
  1282. "required": true,
  1283. "schema": {
  1284. "type": "boolean",
  1285. "default": true
  1286. }
  1287. }
  1288. ],
  1289. "responses": {
  1290. "200": {
  1291. "description": "User removed as group subadmin successfully",
  1292. "content": {
  1293. "application/json": {
  1294. "schema": {
  1295. "type": "object",
  1296. "required": [
  1297. "ocs"
  1298. ],
  1299. "properties": {
  1300. "ocs": {
  1301. "type": "object",
  1302. "required": [
  1303. "meta",
  1304. "data"
  1305. ],
  1306. "properties": {
  1307. "meta": {
  1308. "$ref": "#/components/schemas/OCSMeta"
  1309. },
  1310. "data": {}
  1311. }
  1312. }
  1313. }
  1314. }
  1315. }
  1316. }
  1317. }
  1318. }
  1319. }
  1320. },
  1321. "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps": {
  1322. "get": {
  1323. "operationId": "app_config-get-apps",
  1324. "summary": "Get a list of apps",
  1325. "description": "This endpoint requires admin access",
  1326. "tags": [
  1327. "app_config"
  1328. ],
  1329. "security": [
  1330. {
  1331. "bearer_auth": []
  1332. },
  1333. {
  1334. "basic_auth": []
  1335. }
  1336. ],
  1337. "parameters": [
  1338. {
  1339. "name": "OCS-APIRequest",
  1340. "in": "header",
  1341. "description": "Required to be true for the API request to pass",
  1342. "required": true,
  1343. "schema": {
  1344. "type": "boolean",
  1345. "default": true
  1346. }
  1347. }
  1348. ],
  1349. "responses": {
  1350. "200": {
  1351. "description": "Apps returned",
  1352. "content": {
  1353. "application/json": {
  1354. "schema": {
  1355. "type": "object",
  1356. "required": [
  1357. "ocs"
  1358. ],
  1359. "properties": {
  1360. "ocs": {
  1361. "type": "object",
  1362. "required": [
  1363. "meta",
  1364. "data"
  1365. ],
  1366. "properties": {
  1367. "meta": {
  1368. "$ref": "#/components/schemas/OCSMeta"
  1369. },
  1370. "data": {
  1371. "type": "object",
  1372. "required": [
  1373. "data"
  1374. ],
  1375. "properties": {
  1376. "data": {
  1377. "type": "array",
  1378. "items": {
  1379. "type": "string"
  1380. }
  1381. }
  1382. }
  1383. }
  1384. }
  1385. }
  1386. }
  1387. }
  1388. }
  1389. }
  1390. }
  1391. }
  1392. }
  1393. },
  1394. "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}": {
  1395. "get": {
  1396. "operationId": "app_config-get-keys",
  1397. "summary": "Get the config keys of an app",
  1398. "description": "This endpoint requires admin access",
  1399. "tags": [
  1400. "app_config"
  1401. ],
  1402. "security": [
  1403. {
  1404. "bearer_auth": []
  1405. },
  1406. {
  1407. "basic_auth": []
  1408. }
  1409. ],
  1410. "parameters": [
  1411. {
  1412. "name": "app",
  1413. "in": "path",
  1414. "description": "ID of the app",
  1415. "required": true,
  1416. "schema": {
  1417. "type": "string"
  1418. }
  1419. },
  1420. {
  1421. "name": "OCS-APIRequest",
  1422. "in": "header",
  1423. "description": "Required to be true for the API request to pass",
  1424. "required": true,
  1425. "schema": {
  1426. "type": "boolean",
  1427. "default": true
  1428. }
  1429. }
  1430. ],
  1431. "responses": {
  1432. "200": {
  1433. "description": "Keys returned",
  1434. "content": {
  1435. "application/json": {
  1436. "schema": {
  1437. "type": "object",
  1438. "required": [
  1439. "ocs"
  1440. ],
  1441. "properties": {
  1442. "ocs": {
  1443. "type": "object",
  1444. "required": [
  1445. "meta",
  1446. "data"
  1447. ],
  1448. "properties": {
  1449. "meta": {
  1450. "$ref": "#/components/schemas/OCSMeta"
  1451. },
  1452. "data": {
  1453. "type": "object",
  1454. "required": [
  1455. "data"
  1456. ],
  1457. "properties": {
  1458. "data": {
  1459. "type": "array",
  1460. "items": {
  1461. "type": "string"
  1462. }
  1463. }
  1464. }
  1465. }
  1466. }
  1467. }
  1468. }
  1469. }
  1470. }
  1471. }
  1472. },
  1473. "403": {
  1474. "description": "App is not allowed",
  1475. "content": {
  1476. "application/json": {
  1477. "schema": {
  1478. "type": "object",
  1479. "required": [
  1480. "ocs"
  1481. ],
  1482. "properties": {
  1483. "ocs": {
  1484. "type": "object",
  1485. "required": [
  1486. "meta",
  1487. "data"
  1488. ],
  1489. "properties": {
  1490. "meta": {
  1491. "$ref": "#/components/schemas/OCSMeta"
  1492. },
  1493. "data": {
  1494. "type": "object",
  1495. "required": [
  1496. "data"
  1497. ],
  1498. "properties": {
  1499. "data": {
  1500. "type": "object",
  1501. "required": [
  1502. "message"
  1503. ],
  1504. "properties": {
  1505. "message": {
  1506. "type": "string"
  1507. }
  1508. }
  1509. }
  1510. }
  1511. }
  1512. }
  1513. }
  1514. }
  1515. }
  1516. }
  1517. }
  1518. }
  1519. }
  1520. }
  1521. },
  1522. "/ocs/v2.php/apps/provisioning_api/api/v1/config/apps/{app}/{key}": {
  1523. "get": {
  1524. "operationId": "app_config-get-value",
  1525. "summary": "Get a the config value of an app",
  1526. "description": "This endpoint requires admin access",
  1527. "tags": [
  1528. "app_config"
  1529. ],
  1530. "security": [
  1531. {
  1532. "bearer_auth": []
  1533. },
  1534. {
  1535. "basic_auth": []
  1536. }
  1537. ],
  1538. "parameters": [
  1539. {
  1540. "name": "app",
  1541. "in": "path",
  1542. "description": "ID of the app",
  1543. "required": true,
  1544. "schema": {
  1545. "type": "string"
  1546. }
  1547. },
  1548. {
  1549. "name": "key",
  1550. "in": "path",
  1551. "description": "Key",
  1552. "required": true,
  1553. "schema": {
  1554. "type": "string"
  1555. }
  1556. },
  1557. {
  1558. "name": "defaultValue",
  1559. "in": "query",
  1560. "description": "Default returned value if the value is empty",
  1561. "schema": {
  1562. "type": "string",
  1563. "default": ""
  1564. }
  1565. },
  1566. {
  1567. "name": "OCS-APIRequest",
  1568. "in": "header",
  1569. "description": "Required to be true for the API request to pass",
  1570. "required": true,
  1571. "schema": {
  1572. "type": "boolean",
  1573. "default": true
  1574. }
  1575. }
  1576. ],
  1577. "responses": {
  1578. "200": {
  1579. "description": "Value returned",
  1580. "content": {
  1581. "application/json": {
  1582. "schema": {
  1583. "type": "object",
  1584. "required": [
  1585. "ocs"
  1586. ],
  1587. "properties": {
  1588. "ocs": {
  1589. "type": "object",
  1590. "required": [
  1591. "meta",
  1592. "data"
  1593. ],
  1594. "properties": {
  1595. "meta": {
  1596. "$ref": "#/components/schemas/OCSMeta"
  1597. },
  1598. "data": {
  1599. "type": "object",
  1600. "required": [
  1601. "data"
  1602. ],
  1603. "properties": {
  1604. "data": {
  1605. "type": "string"
  1606. }
  1607. }
  1608. }
  1609. }
  1610. }
  1611. }
  1612. }
  1613. }
  1614. }
  1615. },
  1616. "403": {
  1617. "description": "App is not allowed",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "object",
  1622. "required": [
  1623. "ocs"
  1624. ],
  1625. "properties": {
  1626. "ocs": {
  1627. "type": "object",
  1628. "required": [
  1629. "meta",
  1630. "data"
  1631. ],
  1632. "properties": {
  1633. "meta": {
  1634. "$ref": "#/components/schemas/OCSMeta"
  1635. },
  1636. "data": {
  1637. "type": "object",
  1638. "required": [
  1639. "data"
  1640. ],
  1641. "properties": {
  1642. "data": {
  1643. "type": "object",
  1644. "required": [
  1645. "message"
  1646. ],
  1647. "properties": {
  1648. "message": {
  1649. "type": "string"
  1650. }
  1651. }
  1652. }
  1653. }
  1654. }
  1655. }
  1656. }
  1657. }
  1658. }
  1659. }
  1660. }
  1661. }
  1662. }
  1663. },
  1664. "delete": {
  1665. "operationId": "app_config-delete-key",
  1666. "summary": "Delete a config key of an app",
  1667. "description": "This endpoint requires admin access\nThis endpoint requires password confirmation",
  1668. "tags": [
  1669. "app_config"
  1670. ],
  1671. "security": [
  1672. {
  1673. "bearer_auth": []
  1674. },
  1675. {
  1676. "basic_auth": []
  1677. }
  1678. ],
  1679. "parameters": [
  1680. {
  1681. "name": "app",
  1682. "in": "path",
  1683. "description": "ID of the app",
  1684. "required": true,
  1685. "schema": {
  1686. "type": "string"
  1687. }
  1688. },
  1689. {
  1690. "name": "key",
  1691. "in": "path",
  1692. "description": "Key to delete",
  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": "Key deleted 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. "403": {
  1739. "description": "App or key is not allowed",
  1740. "content": {
  1741. "application/json": {
  1742. "schema": {
  1743. "type": "object",
  1744. "required": [
  1745. "ocs"
  1746. ],
  1747. "properties": {
  1748. "ocs": {
  1749. "type": "object",
  1750. "required": [
  1751. "meta",
  1752. "data"
  1753. ],
  1754. "properties": {
  1755. "meta": {
  1756. "$ref": "#/components/schemas/OCSMeta"
  1757. },
  1758. "data": {
  1759. "type": "object",
  1760. "required": [
  1761. "data"
  1762. ],
  1763. "properties": {
  1764. "data": {
  1765. "type": "object",
  1766. "required": [
  1767. "message"
  1768. ],
  1769. "properties": {
  1770. "message": {
  1771. "type": "string"
  1772. }
  1773. }
  1774. }
  1775. }
  1776. }
  1777. }
  1778. }
  1779. }
  1780. }
  1781. }
  1782. }
  1783. }
  1784. }
  1785. }
  1786. }
  1787. },
  1788. "tags": []
  1789. }