openapi-administration.json 75 KB

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