1
0

openapi-administration.json 73 KB

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