You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openapi-full.json 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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. "parameters": [
  256. {
  257. "name": "app",
  258. "in": "query",
  259. "description": "ID of the app",
  260. "required": true,
  261. "schema": {
  262. "type": "string"
  263. }
  264. },
  265. {
  266. "name": "formId",
  267. "in": "query",
  268. "description": "ID of the form",
  269. "required": true,
  270. "schema": {
  271. "type": "string"
  272. }
  273. },
  274. {
  275. "name": "fieldId",
  276. "in": "query",
  277. "description": "ID of the field",
  278. "required": true,
  279. "schema": {
  280. "type": "string"
  281. }
  282. },
  283. {
  284. "name": "value",
  285. "in": "query",
  286. "description": "Value to be saved",
  287. "required": true,
  288. "schema": {
  289. "type": "string"
  290. }
  291. },
  292. {
  293. "name": "OCS-APIRequest",
  294. "in": "header",
  295. "description": "Required to be true for the API request to pass",
  296. "required": true,
  297. "schema": {
  298. "type": "boolean",
  299. "default": true
  300. }
  301. }
  302. ],
  303. "responses": {
  304. "200": {
  305. "description": "Value set successfully",
  306. "content": {
  307. "application/json": {
  308. "schema": {
  309. "type": "object",
  310. "required": [
  311. "ocs"
  312. ],
  313. "properties": {
  314. "ocs": {
  315. "type": "object",
  316. "required": [
  317. "meta",
  318. "data"
  319. ],
  320. "properties": {
  321. "meta": {
  322. "$ref": "#/components/schemas/OCSMeta"
  323. },
  324. "data": {
  325. "nullable": true
  326. }
  327. }
  328. }
  329. }
  330. }
  331. }
  332. }
  333. },
  334. "500": {
  335. "description": "Not logged in or not an admin user",
  336. "content": {
  337. "text/plain": {
  338. "schema": {
  339. "type": "string"
  340. }
  341. }
  342. }
  343. },
  344. "400": {
  345. "description": "Invalid arguments to save value",
  346. "content": {
  347. "application/json": {
  348. "schema": {
  349. "type": "object",
  350. "required": [
  351. "ocs"
  352. ],
  353. "properties": {
  354. "ocs": {
  355. "type": "object",
  356. "required": [
  357. "meta",
  358. "data"
  359. ],
  360. "properties": {
  361. "meta": {
  362. "$ref": "#/components/schemas/OCSMeta"
  363. },
  364. "data": {}
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. }
  374. },
  375. "/ocs/v2.php/settings/api/declarative/forms": {
  376. "get": {
  377. "operationId": "declarative_settings-get-forms",
  378. "summary": "Gets all declarative forms with the values prefilled.",
  379. "tags": [
  380. "declarative_settings"
  381. ],
  382. "security": [
  383. {
  384. "bearer_auth": []
  385. },
  386. {
  387. "basic_auth": []
  388. }
  389. ],
  390. "parameters": [
  391. {
  392. "name": "OCS-APIRequest",
  393. "in": "header",
  394. "description": "Required to be true for the API request to pass",
  395. "required": true,
  396. "schema": {
  397. "type": "boolean",
  398. "default": true
  399. }
  400. }
  401. ],
  402. "responses": {
  403. "200": {
  404. "description": "Forms returned",
  405. "content": {
  406. "application/json": {
  407. "schema": {
  408. "type": "object",
  409. "required": [
  410. "ocs"
  411. ],
  412. "properties": {
  413. "ocs": {
  414. "type": "object",
  415. "required": [
  416. "meta",
  417. "data"
  418. ],
  419. "properties": {
  420. "meta": {
  421. "$ref": "#/components/schemas/OCSMeta"
  422. },
  423. "data": {
  424. "type": "array",
  425. "items": {
  426. "$ref": "#/components/schemas/DeclarativeForm"
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }
  435. },
  436. "500": {
  437. "description": "",
  438. "content": {
  439. "text/plain": {
  440. "schema": {
  441. "type": "string"
  442. }
  443. }
  444. }
  445. }
  446. }
  447. }
  448. }
  449. },
  450. "tags": []
  451. }