1
0

openapi-administration.json 74 KB

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