openapi-full.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "settings-full",
  5. "version": "0.0.1",
  6. "description": "Nextcloud settings",
  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. "DeclarativeForm": {
  24. "type": "object",
  25. "required": [
  26. "id",
  27. "priority",
  28. "section_type",
  29. "section_id",
  30. "storage_type",
  31. "title",
  32. "app",
  33. "fields"
  34. ],
  35. "properties": {
  36. "id": {
  37. "type": "string"
  38. },
  39. "priority": {
  40. "type": "integer",
  41. "format": "int64"
  42. },
  43. "section_type": {
  44. "type": "string",
  45. "enum": [
  46. "admin",
  47. "personal"
  48. ]
  49. },
  50. "section_id": {
  51. "type": "string"
  52. },
  53. "storage_type": {
  54. "type": "string",
  55. "enum": [
  56. "internal",
  57. "external"
  58. ]
  59. },
  60. "title": {
  61. "type": "string"
  62. },
  63. "description": {
  64. "type": "string"
  65. },
  66. "doc_url": {
  67. "type": "string"
  68. },
  69. "app": {
  70. "type": "string"
  71. },
  72. "fields": {
  73. "type": "array",
  74. "items": {
  75. "$ref": "#/components/schemas/DeclarativeFormField"
  76. }
  77. }
  78. }
  79. },
  80. "DeclarativeFormField": {
  81. "type": "object",
  82. "required": [
  83. "id",
  84. "title",
  85. "type",
  86. "default",
  87. "value"
  88. ],
  89. "properties": {
  90. "id": {
  91. "type": "string"
  92. },
  93. "title": {
  94. "type": "string"
  95. },
  96. "description": {
  97. "type": "string"
  98. },
  99. "type": {
  100. "type": "string",
  101. "enum": [
  102. "text",
  103. "password",
  104. "email",
  105. "tel",
  106. "url",
  107. "number",
  108. "checkbox",
  109. "multi-checkbox",
  110. "radio",
  111. "select",
  112. "multi-select"
  113. ]
  114. },
  115. "placeholder": {
  116. "type": "string"
  117. },
  118. "label": {
  119. "type": "string"
  120. },
  121. "default": {
  122. "type": "object"
  123. },
  124. "options": {
  125. "type": "array",
  126. "items": {
  127. "oneOf": [
  128. {
  129. "type": "string"
  130. },
  131. {
  132. "type": "object",
  133. "required": [
  134. "name",
  135. "value"
  136. ],
  137. "properties": {
  138. "name": {
  139. "type": "string"
  140. },
  141. "value": {
  142. "type": "object"
  143. }
  144. }
  145. }
  146. ]
  147. }
  148. },
  149. "value": {
  150. "anyOf": [
  151. {
  152. "type": "string"
  153. },
  154. {
  155. "type": "integer",
  156. "format": "int64"
  157. },
  158. {
  159. "type": "number",
  160. "format": "double"
  161. },
  162. {
  163. "type": "boolean"
  164. },
  165. {
  166. "type": "array",
  167. "items": {
  168. "type": "string"
  169. }
  170. }
  171. ]
  172. }
  173. }
  174. },
  175. "OCSMeta": {
  176. "type": "object",
  177. "required": [
  178. "status",
  179. "statuscode"
  180. ],
  181. "properties": {
  182. "status": {
  183. "type": "string"
  184. },
  185. "statuscode": {
  186. "type": "integer"
  187. },
  188. "message": {
  189. "type": "string"
  190. },
  191. "totalitems": {
  192. "type": "string"
  193. },
  194. "itemsperpage": {
  195. "type": "string"
  196. }
  197. }
  198. }
  199. }
  200. },
  201. "paths": {
  202. "/index.php/settings/admin/log/download": {
  203. "get": {
  204. "operationId": "log_settings-download",
  205. "summary": "download logfile",
  206. "description": "This endpoint requires admin access",
  207. "tags": [
  208. "log_settings"
  209. ],
  210. "security": [
  211. {
  212. "bearer_auth": []
  213. },
  214. {
  215. "basic_auth": []
  216. }
  217. ],
  218. "responses": {
  219. "200": {
  220. "description": "Logfile returned",
  221. "headers": {
  222. "Content-Disposition": {
  223. "schema": {
  224. "type": "string"
  225. }
  226. }
  227. },
  228. "content": {
  229. "application/octet-stream": {
  230. "schema": {
  231. "type": "string",
  232. "format": "binary"
  233. }
  234. }
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "/ocs/v2.php/settings/api/declarative/value": {
  241. "post": {
  242. "operationId": "declarative_settings-set-value",
  243. "summary": "Sets a declarative settings value",
  244. "tags": [
  245. "declarative_settings"
  246. ],
  247. "security": [
  248. {
  249. "bearer_auth": []
  250. },
  251. {
  252. "basic_auth": []
  253. }
  254. ],
  255. "requestBody": {
  256. "required": true,
  257. "content": {
  258. "application/json": {
  259. "schema": {
  260. "type": "object",
  261. "required": [
  262. "app",
  263. "formId",
  264. "fieldId",
  265. "value"
  266. ],
  267. "properties": {
  268. "app": {
  269. "type": "string",
  270. "description": "ID of the app"
  271. },
  272. "formId": {
  273. "type": "string",
  274. "description": "ID of the form"
  275. },
  276. "fieldId": {
  277. "type": "string",
  278. "description": "ID of the field"
  279. },
  280. "value": {
  281. "type": "object",
  282. "description": "Value to be saved"
  283. }
  284. }
  285. }
  286. }
  287. }
  288. },
  289. "parameters": [
  290. {
  291. "name": "OCS-APIRequest",
  292. "in": "header",
  293. "description": "Required to be true for the API request to pass",
  294. "required": true,
  295. "schema": {
  296. "type": "boolean",
  297. "default": true
  298. }
  299. }
  300. ],
  301. "responses": {
  302. "200": {
  303. "description": "Value set successfully",
  304. "content": {
  305. "application/json": {
  306. "schema": {
  307. "type": "object",
  308. "required": [
  309. "ocs"
  310. ],
  311. "properties": {
  312. "ocs": {
  313. "type": "object",
  314. "required": [
  315. "meta",
  316. "data"
  317. ],
  318. "properties": {
  319. "meta": {
  320. "$ref": "#/components/schemas/OCSMeta"
  321. },
  322. "data": {
  323. "nullable": true
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. },
  332. "500": {
  333. "description": "Not logged in or not an admin user",
  334. "content": {
  335. "text/plain": {
  336. "schema": {
  337. "type": "string"
  338. }
  339. }
  340. }
  341. },
  342. "400": {
  343. "description": "Invalid arguments to save value",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "type": "object",
  348. "required": [
  349. "ocs"
  350. ],
  351. "properties": {
  352. "ocs": {
  353. "type": "object",
  354. "required": [
  355. "meta",
  356. "data"
  357. ],
  358. "properties": {
  359. "meta": {
  360. "$ref": "#/components/schemas/OCSMeta"
  361. },
  362. "data": {}
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. },
  373. "/ocs/v2.php/settings/api/declarative/forms": {
  374. "get": {
  375. "operationId": "declarative_settings-get-forms",
  376. "summary": "Gets all declarative forms with the values prefilled.",
  377. "tags": [
  378. "declarative_settings"
  379. ],
  380. "security": [
  381. {
  382. "bearer_auth": []
  383. },
  384. {
  385. "basic_auth": []
  386. }
  387. ],
  388. "parameters": [
  389. {
  390. "name": "OCS-APIRequest",
  391. "in": "header",
  392. "description": "Required to be true for the API request to pass",
  393. "required": true,
  394. "schema": {
  395. "type": "boolean",
  396. "default": true
  397. }
  398. }
  399. ],
  400. "responses": {
  401. "200": {
  402. "description": "Forms returned",
  403. "content": {
  404. "application/json": {
  405. "schema": {
  406. "type": "object",
  407. "required": [
  408. "ocs"
  409. ],
  410. "properties": {
  411. "ocs": {
  412. "type": "object",
  413. "required": [
  414. "meta",
  415. "data"
  416. ],
  417. "properties": {
  418. "meta": {
  419. "$ref": "#/components/schemas/OCSMeta"
  420. },
  421. "data": {
  422. "type": "array",
  423. "items": {
  424. "$ref": "#/components/schemas/DeclarativeForm"
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. },
  434. "500": {
  435. "description": "",
  436. "content": {
  437. "text/plain": {
  438. "schema": {
  439. "type": "string"
  440. }
  441. }
  442. }
  443. }
  444. }
  445. }
  446. }
  447. },
  448. "tags": []
  449. }