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.json 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "settings",
  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. "oneOf": [
  151. {
  152. "type": "string"
  153. },
  154. {
  155. "type": "integer",
  156. "format": "int64"
  157. },
  158. {
  159. "type": "number",
  160. "format": "float"
  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. "/ocs/v2.php/settings/api/declarative/value": {
  203. "post": {
  204. "operationId": "declarative_settings-set-value",
  205. "summary": "Sets a declarative settings value",
  206. "tags": [
  207. "declarative_settings"
  208. ],
  209. "security": [
  210. {
  211. "bearer_auth": []
  212. },
  213. {
  214. "basic_auth": []
  215. }
  216. ],
  217. "parameters": [
  218. {
  219. "name": "app",
  220. "in": "query",
  221. "description": "ID of the app",
  222. "required": true,
  223. "schema": {
  224. "type": "string"
  225. }
  226. },
  227. {
  228. "name": "formId",
  229. "in": "query",
  230. "description": "ID of the form",
  231. "required": true,
  232. "schema": {
  233. "type": "string"
  234. }
  235. },
  236. {
  237. "name": "fieldId",
  238. "in": "query",
  239. "description": "ID of the field",
  240. "required": true,
  241. "schema": {
  242. "type": "string"
  243. }
  244. },
  245. {
  246. "name": "value",
  247. "in": "query",
  248. "description": "Value to be saved",
  249. "required": true,
  250. "schema": {
  251. "type": "string"
  252. }
  253. },
  254. {
  255. "name": "OCS-APIRequest",
  256. "in": "header",
  257. "description": "Required to be true for the API request to pass",
  258. "required": true,
  259. "schema": {
  260. "type": "boolean",
  261. "default": true
  262. }
  263. }
  264. ],
  265. "responses": {
  266. "200": {
  267. "description": "Value set successfully",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "type": "object",
  272. "required": [
  273. "ocs"
  274. ],
  275. "properties": {
  276. "ocs": {
  277. "type": "object",
  278. "required": [
  279. "meta",
  280. "data"
  281. ],
  282. "properties": {
  283. "meta": {
  284. "$ref": "#/components/schemas/OCSMeta"
  285. },
  286. "data": {
  287. "nullable": true
  288. }
  289. }
  290. }
  291. }
  292. }
  293. }
  294. }
  295. },
  296. "500": {
  297. "description": "Not logged in or not an admin user",
  298. "content": {
  299. "text/plain": {
  300. "schema": {
  301. "type": "string"
  302. }
  303. }
  304. }
  305. },
  306. "400": {
  307. "description": "Invalid arguments to save value",
  308. "content": {
  309. "text/plain": {
  310. "schema": {
  311. "type": "string"
  312. }
  313. }
  314. }
  315. }
  316. }
  317. }
  318. },
  319. "/ocs/v2.php/settings/api/declarative/forms": {
  320. "get": {
  321. "operationId": "declarative_settings-get-forms",
  322. "summary": "Gets all declarative forms with the values prefilled.",
  323. "tags": [
  324. "declarative_settings"
  325. ],
  326. "security": [
  327. {
  328. "bearer_auth": []
  329. },
  330. {
  331. "basic_auth": []
  332. }
  333. ],
  334. "parameters": [
  335. {
  336. "name": "OCS-APIRequest",
  337. "in": "header",
  338. "description": "Required to be true for the API request to pass",
  339. "required": true,
  340. "schema": {
  341. "type": "boolean",
  342. "default": true
  343. }
  344. }
  345. ],
  346. "responses": {
  347. "200": {
  348. "description": "Forms returned",
  349. "content": {
  350. "application/json": {
  351. "schema": {
  352. "type": "object",
  353. "required": [
  354. "ocs"
  355. ],
  356. "properties": {
  357. "ocs": {
  358. "type": "object",
  359. "required": [
  360. "meta",
  361. "data"
  362. ],
  363. "properties": {
  364. "meta": {
  365. "$ref": "#/components/schemas/OCSMeta"
  366. },
  367. "data": {
  368. "type": "array",
  369. "items": {
  370. "$ref": "#/components/schemas/DeclarativeForm"
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. }
  379. },
  380. "500": {
  381. "description": "",
  382. "content": {
  383. "text/plain": {
  384. "schema": {
  385. "type": "string"
  386. }
  387. }
  388. }
  389. }
  390. }
  391. }
  392. }
  393. },
  394. "tags": []
  395. }