@budibase/server 1.0.80 → 1.0.81-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/__mocks__/node-fetch.ts +1 -0
  2. package/builder/assets/index.57958259.js +1290 -0
  3. package/builder/assets/{index.c8d1e8f0.css → index.dd19c61c.css} +2 -2
  4. package/builder/assets/{vendor.20f80cec.js → vendor.a7c6ad0a.js} +190 -216
  5. package/builder/index.html +3 -3
  6. package/coverage/clover.xml +2531 -2440
  7. package/coverage/coverage-final.json +138 -137
  8. package/coverage/lcov-report/api/controllers/analytics.js.html +6 -6
  9. package/coverage/lcov-report/api/controllers/apikeys.js.html +6 -6
  10. package/coverage/lcov-report/api/controllers/application.js.html +152 -149
  11. package/coverage/lcov-report/api/controllers/auth.js.html +7 -7
  12. package/coverage/lcov-report/api/controllers/automation.js.html +21 -21
  13. package/coverage/lcov-report/api/controllers/backup.js.html +3 -3
  14. package/coverage/lcov-report/api/controllers/cloud.js.html +11 -11
  15. package/coverage/lcov-report/api/controllers/component.js.html +5 -5
  16. package/coverage/lcov-report/api/controllers/datasource.js.html +16 -16
  17. package/coverage/lcov-report/api/controllers/dev.js.html +19 -19
  18. package/coverage/lcov-report/api/controllers/index.html +16 -16
  19. package/coverage/lcov-report/api/controllers/integration.js.html +4 -4
  20. package/coverage/lcov-report/api/controllers/layout.js.html +6 -6
  21. package/coverage/lcov-report/api/controllers/metadata.js.html +9 -9
  22. package/coverage/lcov-report/api/controllers/migrations.js.html +4 -4
  23. package/coverage/lcov-report/api/controllers/permission.js.html +15 -15
  24. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/query/index.js.html +26 -26
  26. package/coverage/lcov-report/api/controllers/query/validation.js.html +10 -10
  27. package/coverage/lcov-report/api/controllers/role.js.html +9 -9
  28. package/coverage/lcov-report/api/controllers/routing.js.html +9 -9
  29. package/coverage/lcov-report/api/controllers/row/external.js.html +86 -23
  30. package/coverage/lcov-report/api/controllers/row/index.html +46 -46
  31. package/coverage/lcov-report/api/controllers/row/index.js.html +76 -49
  32. package/coverage/lcov-report/api/controllers/row/internal.js.html +144 -84
  33. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +204 -204
  34. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +24 -24
  35. package/coverage/lcov-report/api/controllers/row/utils.js.html +29 -29
  36. package/coverage/lcov-report/api/controllers/screen.js.html +7 -7
  37. package/coverage/lcov-report/api/controllers/script.js.html +4 -4
  38. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +49 -49
  39. package/coverage/lcov-report/api/controllers/table/external.js.html +62 -20
  40. package/coverage/lcov-report/api/controllers/table/index.html +20 -20
  41. package/coverage/lcov-report/api/controllers/table/index.js.html +47 -44
  42. package/coverage/lcov-report/api/controllers/table/internal.js.html +50 -50
  43. package/coverage/lcov-report/api/controllers/table/utils.js.html +80 -80
  44. package/coverage/lcov-report/api/controllers/templates.js.html +5 -5
  45. package/coverage/lcov-report/api/controllers/user.js.html +19 -19
  46. package/coverage/lcov-report/api/controllers/view/exporters.js.html +4 -4
  47. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  48. package/coverage/lcov-report/api/controllers/view/index.js.html +14 -14
  49. package/coverage/lcov-report/api/controllers/view/utils.js.html +12 -12
  50. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +7 -7
  51. package/coverage/lcov-report/api/controllers/webhook.js.html +18 -27
  52. package/coverage/lcov-report/api/index.html +10 -10
  53. package/coverage/lcov-report/api/index.js.html +37 -28
  54. package/coverage/lcov-report/api/routes/analytics.js.html +6 -6
  55. package/coverage/lcov-report/api/routes/apikeys.js.html +8 -8
  56. package/coverage/lcov-report/api/routes/application.js.html +9 -9
  57. package/coverage/lcov-report/api/routes/auth.js.html +6 -6
  58. package/coverage/lcov-report/api/routes/automation.js.html +19 -109
  59. package/coverage/lcov-report/api/routes/backup.js.html +8 -8
  60. package/coverage/lcov-report/api/routes/cloud.js.html +8 -8
  61. package/coverage/lcov-report/api/routes/component.js.html +8 -8
  62. package/coverage/lcov-report/api/routes/datasource.js.html +18 -156
  63. package/coverage/lcov-report/api/routes/deploy.js.html +8 -8
  64. package/coverage/lcov-report/api/routes/dev.js.html +13 -13
  65. package/coverage/lcov-report/api/routes/index.html +35 -35
  66. package/coverage/lcov-report/api/routes/index.js.html +38 -32
  67. package/coverage/lcov-report/api/routes/integration.js.html +8 -8
  68. package/coverage/lcov-report/api/routes/layout.js.html +8 -8
  69. package/coverage/lcov-report/api/routes/metadata.js.html +9 -9
  70. package/coverage/lcov-report/api/routes/migrations.js.html +7 -7
  71. package/coverage/lcov-report/api/routes/permission.js.html +16 -58
  72. package/coverage/lcov-report/api/routes/query.js.html +10 -10
  73. package/coverage/lcov-report/api/routes/role.js.html +15 -78
  74. package/coverage/lcov-report/api/routes/routing.js.html +8 -8
  75. package/coverage/lcov-report/api/routes/row.js.html +80 -14
  76. package/coverage/lcov-report/api/routes/screen.js.html +14 -95
  77. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  78. package/coverage/lcov-report/api/routes/static.js.html +13 -13
  79. package/coverage/lcov-report/api/routes/table.js.html +17 -62
  80. package/coverage/lcov-report/api/routes/templates.js.html +8 -8
  81. package/coverage/lcov-report/api/routes/user.js.html +8 -8
  82. package/coverage/lcov-report/api/routes/utils/index.html +111 -0
  83. package/coverage/lcov-report/api/routes/utils/validators.js.html +737 -0
  84. package/coverage/lcov-report/api/routes/view.js.html +10 -10
  85. package/coverage/lcov-report/api/routes/webhook.js.html +14 -62
  86. package/coverage/lcov-report/automations/actions.js.html +24 -24
  87. package/coverage/lcov-report/automations/automationUtils.js.html +5 -5
  88. package/coverage/lcov-report/automations/bullboard.js.html +16 -16
  89. package/coverage/lcov-report/automations/index.html +1 -1
  90. package/coverage/lcov-report/automations/index.js.html +7 -7
  91. package/coverage/lcov-report/automations/steps/bash.js.html +6 -6
  92. package/coverage/lcov-report/automations/steps/createRow.js.html +7 -7
  93. package/coverage/lcov-report/automations/steps/delay.js.html +4 -4
  94. package/coverage/lcov-report/automations/steps/deleteRow.js.html +7 -7
  95. package/coverage/lcov-report/automations/steps/discord.js.html +7 -7
  96. package/coverage/lcov-report/automations/steps/executeQuery.js.html +6 -6
  97. package/coverage/lcov-report/automations/steps/executeScript.js.html +6 -6
  98. package/coverage/lcov-report/automations/steps/filter.js.html +12 -9
  99. package/coverage/lcov-report/automations/steps/index.html +1 -1
  100. package/coverage/lcov-report/automations/steps/integromat.js.html +5 -5
  101. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +8 -8
  102. package/coverage/lcov-report/automations/steps/queryRows.js.html +11 -11
  103. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +5 -5
  104. package/coverage/lcov-report/automations/steps/serverLog.js.html +3 -3
  105. package/coverage/lcov-report/automations/steps/slack.js.html +5 -5
  106. package/coverage/lcov-report/automations/steps/updateRow.js.html +6 -6
  107. package/coverage/lcov-report/automations/steps/utils.js.html +3 -3
  108. package/coverage/lcov-report/automations/steps/zapier.js.html +5 -5
  109. package/coverage/lcov-report/automations/triggerInfo/app.js.html +2 -2
  110. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +2 -2
  111. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  112. package/coverage/lcov-report/automations/triggerInfo/index.js.html +8 -8
  113. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +2 -2
  114. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +2 -2
  115. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +2 -2
  116. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +2 -2
  117. package/coverage/lcov-report/automations/triggers.js.html +26 -26
  118. package/coverage/lcov-report/automations/utils.js.html +35 -35
  119. package/coverage/lcov-report/constants/index.html +5 -5
  120. package/coverage/lcov-report/constants/index.js.html +40 -28
  121. package/coverage/lcov-report/constants/layouts.js.html +5 -5
  122. package/coverage/lcov-report/constants/screens.js.html +4 -4
  123. package/coverage/lcov-report/db/client.js.html +18 -18
  124. package/coverage/lcov-report/db/inMemoryView.js.html +7 -7
  125. package/coverage/lcov-report/db/index.html +15 -15
  126. package/coverage/lcov-report/db/index.js.html +3 -3
  127. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +21 -21
  128. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  129. package/coverage/lcov-report/db/linkedRows/index.js.html +36 -36
  130. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +30 -30
  131. package/coverage/lcov-report/db/newid.js.html +4 -4
  132. package/coverage/lcov-report/db/utils.js.html +123 -87
  133. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  134. package/coverage/lcov-report/events/index.html +1 -1
  135. package/coverage/lcov-report/events/index.js.html +8 -8
  136. package/coverage/lcov-report/events/utils.js.html +18 -18
  137. package/coverage/lcov-report/index.html +91 -76
  138. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  139. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  140. package/coverage/lcov-report/middleware/appInfo.js.html +5 -5
  141. package/coverage/lcov-report/middleware/authorized.js.html +29 -29
  142. package/coverage/lcov-report/middleware/builder.js.html +16 -16
  143. package/coverage/lcov-report/middleware/currentapp.js.html +44 -44
  144. package/coverage/lcov-report/middleware/index.html +1 -1
  145. package/coverage/lcov-report/middleware/joi-validator.js.html +14 -14
  146. package/coverage/lcov-report/middleware/resourceId.js.html +29 -29
  147. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  148. package/coverage/lcov-report/middleware/usageQuota.js.html +17 -17
  149. package/coverage/lcov-report/middleware/utils.js.html +4 -4
  150. package/coverage/lcov-report/threads/automation.js.html +1 -1
  151. package/coverage/lcov-report/threads/index.html +19 -19
  152. package/coverage/lcov-report/threads/index.js.html +10 -10
  153. package/coverage/lcov-report/threads/query.js.html +123 -39
  154. package/coverage/lcov-report/threads/utils.js.html +14 -14
  155. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  156. package/coverage/lcov-report/utilities/budibaseDir.js.html +7 -7
  157. package/coverage/lcov-report/utilities/centralPath.js.html +4 -4
  158. package/coverage/lcov-report/utilities/csvParser.js.html +6 -6
  159. package/coverage/lcov-report/utilities/global.js.html +28 -28
  160. package/coverage/lcov-report/utilities/index.html +18 -18
  161. package/coverage/lcov-report/utilities/index.js.html +24 -24
  162. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +9 -9
  163. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  164. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  165. package/coverage/lcov-report/utilities/routing/index.js.html +6 -6
  166. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  167. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +60 -60
  168. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +13 -13
  169. package/coverage/lcov-report/utilities/scriptRunner.js.html +5 -5
  170. package/coverage/lcov-report/utilities/security.js.html +8 -8
  171. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  172. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  173. package/coverage/lcov-report/utilities/usageQuota/index.js.html +12 -12
  174. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +8 -8
  175. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  176. package/coverage/lcov-report/utilities/users.js.html +5 -5
  177. package/coverage/lcov-report/utilities/workerRequests.js.html +200 -53
  178. package/coverage/lcov.info +3555 -3411
  179. package/dist/api/controllers/application.js +1 -0
  180. package/dist/api/controllers/public/applications.js +94 -0
  181. package/dist/api/controllers/public/mapping/applications.js +29 -0
  182. package/dist/api/controllers/public/mapping/index.js +11 -0
  183. package/dist/api/controllers/public/mapping/queries.js +36 -0
  184. package/dist/api/controllers/public/mapping/rows.js +24 -0
  185. package/dist/api/controllers/public/mapping/tables.js +23 -0
  186. package/dist/api/controllers/public/mapping/types.js +2 -0
  187. package/dist/api/controllers/public/mapping/users.js +29 -0
  188. package/dist/api/controllers/public/queries.js +38 -0
  189. package/dist/api/controllers/public/rows.js +97 -0
  190. package/dist/api/controllers/public/tables.js +75 -0
  191. package/dist/api/controllers/public/users.js +95 -0
  192. package/dist/api/controllers/public/utils.js +49 -0
  193. package/dist/api/controllers/row/external.js +18 -0
  194. package/dist/api/controllers/row/index.js +11 -0
  195. package/dist/api/controllers/row/internal.js +15 -1
  196. package/dist/api/controllers/table/external.js +8 -2
  197. package/dist/api/controllers/table/index.js +2 -1
  198. package/dist/api/controllers/webhook.js +3 -5
  199. package/dist/api/index.js +3 -1
  200. package/dist/api/routes/automation.js +3 -31
  201. package/dist/api/routes/datasource.js +3 -50
  202. package/dist/api/routes/index.js +2 -0
  203. package/dist/api/routes/permission.js +4 -14
  204. package/dist/api/routes/public/applications.js +141 -0
  205. package/dist/api/routes/public/index.js +101 -0
  206. package/dist/api/routes/public/middleware/mapper.js +94 -0
  207. package/dist/api/routes/public/queries.js +77 -0
  208. package/dist/api/routes/public/rows.js +229 -0
  209. package/dist/api/routes/public/tables.js +154 -0
  210. package/dist/api/routes/public/users.js +137 -0
  211. package/dist/api/routes/public/utils/Endpoint.js +36 -0
  212. package/dist/api/routes/role.js +3 -19
  213. package/dist/api/routes/row.js +18 -5
  214. package/dist/api/routes/screen.js +2 -23
  215. package/dist/api/routes/table.js +3 -17
  216. package/dist/api/routes/tests/utilities/index.js +23 -0
  217. package/dist/api/routes/utils/validators.js +200 -0
  218. package/dist/api/routes/webhook.js +2 -17
  219. package/dist/automations/steps/filter.js +2 -2
  220. package/dist/automations/steps/queryRows.js +1 -1
  221. package/dist/automations/utils.js +2 -2
  222. package/dist/constants/index.js +3 -0
  223. package/dist/db/utils.js +11 -0
  224. package/dist/definitions/openapi.js +6 -0
  225. package/dist/environment.js +1 -0
  226. package/dist/integrations/base/sql.js +16 -1
  227. package/dist/integrations/base/sqlTable.js +21 -9
  228. package/dist/integrations/googlesheets.js +3 -0
  229. package/dist/integrations/microsoftSqlServer.js +60 -43
  230. package/dist/integrations/mysql.js +3 -0
  231. package/dist/integrations/oracle.js +14 -19
  232. package/dist/integrations/postgres.js +34 -28
  233. package/dist/integrations/utils.js +32 -15
  234. package/dist/package.json +11 -7
  235. package/dist/tests/utilities/TestConfiguration.js +25 -8
  236. package/dist/threads/query.js +33 -8
  237. package/dist/tsconfig.tsbuildinfo +1 -1
  238. package/dist/utilities/workerRequests.js +50 -15
  239. package/package.json +12 -8
  240. package/scripts/integrations/mssql/data/setup.sql +18 -1
  241. package/scripts/integrations/oracle/oracle.md +2 -2
  242. package/scripts/integrations/postgres/init.sql +11 -3
  243. package/scripts/likeCypress.ts +9 -6
  244. package/specs/generate.js +94 -0
  245. package/specs/openapi.json +2232 -0
  246. package/specs/openapi.yaml +1538 -0
  247. package/specs/parameters.js +59 -0
  248. package/specs/resources/application.js +101 -0
  249. package/specs/resources/index.js +24 -0
  250. package/specs/resources/misc.js +12 -0
  251. package/specs/resources/query.js +189 -0
  252. package/specs/resources/row.js +125 -0
  253. package/specs/resources/table.js +191 -0
  254. package/specs/resources/user.js +126 -0
  255. package/specs/resources/utils/Resource.js +26 -0
  256. package/specs/resources/utils/index.js +11 -0
  257. package/specs/security.js +7 -0
  258. package/src/api/controllers/application.js +1 -0
  259. package/src/api/controllers/public/applications.ts +74 -0
  260. package/src/api/controllers/public/mapping/applications.ts +32 -0
  261. package/src/api/controllers/public/mapping/index.ts +13 -0
  262. package/src/api/controllers/public/mapping/queries.ts +39 -0
  263. package/src/api/controllers/public/mapping/rows.ts +31 -0
  264. package/src/api/controllers/public/mapping/tables.ts +26 -0
  265. package/src/api/controllers/public/mapping/types.ts +13 -0
  266. package/src/api/controllers/public/mapping/users.ts +32 -0
  267. package/src/api/controllers/public/queries.ts +20 -0
  268. package/src/api/controllers/public/rows.ts +77 -0
  269. package/src/api/controllers/public/tables.ts +56 -0
  270. package/src/api/controllers/public/users.ts +82 -0
  271. package/src/api/controllers/public/utils.ts +38 -0
  272. package/src/api/controllers/row/ExternalRequest.ts +1 -1
  273. package/src/api/controllers/row/external.js +21 -0
  274. package/src/api/controllers/row/index.js +9 -0
  275. package/src/api/controllers/row/internal.js +20 -0
  276. package/src/api/controllers/table/external.js +16 -2
  277. package/src/api/controllers/table/index.js +2 -1
  278. package/src/api/controllers/webhook.js +3 -6
  279. package/src/api/index.js +4 -1
  280. package/src/api/routes/automation.js +3 -33
  281. package/src/api/routes/datasource.js +6 -52
  282. package/src/api/routes/index.js +2 -0
  283. package/src/api/routes/permission.js +4 -18
  284. package/src/api/routes/public/applications.ts +156 -0
  285. package/src/api/routes/public/index.ts +118 -0
  286. package/src/api/routes/public/middleware/mapper.ts +81 -0
  287. package/src/api/routes/public/queries.ts +81 -0
  288. package/src/api/routes/public/rows.ts +242 -0
  289. package/src/api/routes/public/tables.ts +169 -0
  290. package/src/api/routes/public/tests/compare.spec.js +184 -0
  291. package/src/api/routes/public/users.ts +144 -0
  292. package/src/api/routes/public/utils/Endpoint.ts +51 -0
  293. package/src/api/routes/role.js +3 -24
  294. package/src/api/routes/row.js +24 -2
  295. package/src/api/routes/screen.js +2 -29
  296. package/src/api/routes/table.js +4 -19
  297. package/src/api/routes/tests/utilities/index.js +24 -0
  298. package/src/api/routes/utils/validators.js +219 -0
  299. package/src/api/routes/webhook.js +2 -18
  300. package/src/automations/steps/filter.js +3 -2
  301. package/src/automations/steps/queryRows.js +1 -1
  302. package/src/automations/utils.js +2 -2
  303. package/src/constants/index.js +4 -0
  304. package/src/db/utils.js +12 -0
  305. package/src/definitions/common.ts +4 -0
  306. package/src/definitions/datasource.ts +7 -0
  307. package/src/definitions/openapi.ts +943 -0
  308. package/src/environment.js +1 -0
  309. package/src/integrations/base/datasourcePlus.ts +3 -0
  310. package/src/integrations/base/sql.ts +16 -1
  311. package/src/integrations/base/sqlTable.ts +35 -13
  312. package/src/integrations/googlesheets.ts +5 -2
  313. package/src/integrations/microsoftSqlServer.ts +86 -61
  314. package/src/integrations/mysql.ts +4 -0
  315. package/src/integrations/oracle.ts +27 -35
  316. package/src/integrations/postgres.ts +33 -26
  317. package/src/integrations/utils.ts +43 -15
  318. package/src/tests/utilities/TestConfiguration.js +23 -2
  319. package/src/threads/query.js +37 -9
  320. package/src/utilities/workerRequests.js +65 -16
  321. package/builder/assets/index.22a39cc9.js +0 -1352
  322. package/scripts/proxy/generateProxyConfig.js +0 -70
@@ -0,0 +1,1538 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Budibase API
4
+ description: The public API for Budibase apps and its services.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://budibase.app/api/public/v1
8
+ description: Budibase Cloud API
9
+ - url: "{protocol}://{hostname}/api/public/v1"
10
+ description: Budibase self hosted API
11
+ variables:
12
+ protocol:
13
+ default: http
14
+ description: Whether HTTP or HTTPS should be used to communicate with your
15
+ Budibase instance.
16
+ hostname:
17
+ default: localhost:10000
18
+ description: The URL of your Budibase instance.
19
+ components:
20
+ parameters:
21
+ tableId:
22
+ in: path
23
+ name: tableId
24
+ required: true
25
+ description: The ID of the table which this request is targeting.
26
+ schema:
27
+ type: string
28
+ rowId:
29
+ in: path
30
+ name: rowId
31
+ required: true
32
+ description: The ID of the row which this request is targeting.
33
+ schema:
34
+ type: string
35
+ appId:
36
+ in: header
37
+ name: x-budibase-app-id
38
+ required: true
39
+ description: The ID of the app which this request is targeting.
40
+ schema:
41
+ type: string
42
+ appIdUrl:
43
+ in: path
44
+ name: appId
45
+ required: true
46
+ description: The ID of the app which this request is targeting.
47
+ schema:
48
+ type: string
49
+ queryId:
50
+ in: path
51
+ name: queryId
52
+ required: true
53
+ description: The ID of the query which this request is targeting.
54
+ schema:
55
+ type: string
56
+ userId:
57
+ in: path
58
+ name: userId
59
+ required: true
60
+ description: The ID of the user which this request is targeting.
61
+ schema:
62
+ type: string
63
+ examples:
64
+ application:
65
+ value:
66
+ data:
67
+ _id: app_metadata
68
+ appId: app_dev_957b12f943d348faa61db7e18e088d0f
69
+ version: 1.0.58-alpha.0
70
+ name: App name
71
+ url: /app-url
72
+ tenantId: default
73
+ updatedAt: 2022-02-22T13:00:54.035Z
74
+ createdAt: 2022-02-11T18:02:26.961Z
75
+ status: development
76
+ applications:
77
+ value:
78
+ data:
79
+ - _id: app_metadata
80
+ appId: app_dev_957b12f943d348faa61db7e18e088d0f
81
+ version: 1.0.58-alpha.0
82
+ name: App name
83
+ url: /app-url
84
+ tenantId: default
85
+ updatedAt: 2022-02-22T13:00:54.035Z
86
+ createdAt: 2022-02-11T18:02:26.961Z
87
+ status: development
88
+ inputRow:
89
+ value:
90
+ _id: ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4
91
+ type: row
92
+ tableId: ta_5b1649e42a5b41dea4ef7742a36a7a70
93
+ name: Mike
94
+ age: 30
95
+ relationship:
96
+ - ro_ta_...
97
+ row:
98
+ value:
99
+ data:
100
+ _id: ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4
101
+ type: row
102
+ tableId: ta_5b1649e42a5b41dea4ef7742a36a7a70
103
+ name: Mike
104
+ age: 30
105
+ relationship:
106
+ - primaryDisplay: Joe
107
+ _id: ro_ta_...
108
+ enrichedRow:
109
+ value:
110
+ data:
111
+ _id: ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4
112
+ name: eg
113
+ tableId: ta_5b1649e42a5b41dea4ef7742a36a7a70
114
+ type: row
115
+ relationship:
116
+ - _id: ro_ta_users_us_8f3d717147d74d759d8cef5b6712062f
117
+ name: Joe
118
+ tableId: ta_users
119
+ internal:
120
+ - _id: ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4
121
+ primaryDisplay: eg
122
+ rows:
123
+ value:
124
+ data:
125
+ - _id: ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4
126
+ type: row
127
+ tableId: ta_5b1649e42a5b41dea4ef7742a36a7a70
128
+ name: Mike
129
+ age: 30
130
+ relationship:
131
+ - primaryDisplay: Joe
132
+ _id: ro_ta_...
133
+ hasNextPage: true
134
+ bookmark: 10
135
+ table:
136
+ value:
137
+ data:
138
+ _id: ta_5b1649e42a5b41dea4ef7742a36a7a70
139
+ name: People
140
+ schema:
141
+ name:
142
+ type: string
143
+ name: name
144
+ age:
145
+ type: number
146
+ name: age
147
+ relationship:
148
+ type: link
149
+ name: relationship
150
+ tableId: ta_...
151
+ fieldName: relatedColumn
152
+ relationshipType: many-to-many
153
+ tables:
154
+ value:
155
+ data:
156
+ - _id: ta_5b1649e42a5b41dea4ef7742a36a7a70
157
+ name: People
158
+ schema:
159
+ name:
160
+ type: string
161
+ name: name
162
+ age:
163
+ type: number
164
+ name: age
165
+ relationship:
166
+ type: link
167
+ name: relationship
168
+ tableId: ta_...
169
+ fieldName: relatedColumn
170
+ relationshipType: many-to-many
171
+ query:
172
+ value:
173
+ data:
174
+ _id: query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e
175
+ datasourceId: datasource_plus_4d8be0c506b9465daf4bf84d890fdab6
176
+ parameters: []
177
+ fields:
178
+ sql: select * from persons
179
+ queryVerb: read
180
+ name: Help
181
+ schema:
182
+ personid:
183
+ name: personid
184
+ type: string
185
+ lastname:
186
+ name: lastname
187
+ type: string
188
+ firstname:
189
+ name: firstname
190
+ type: string
191
+ address:
192
+ name: address
193
+ type: string
194
+ city:
195
+ name: city
196
+ type: string
197
+ transformer: return data
198
+ readable: true
199
+ queries:
200
+ value:
201
+ data:
202
+ - _id: query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e
203
+ datasourceId: datasource_plus_4d8be0c506b9465daf4bf84d890fdab6
204
+ parameters: []
205
+ fields:
206
+ sql: select * from persons
207
+ queryVerb: read
208
+ name: Help
209
+ schema:
210
+ personid:
211
+ name: personid
212
+ type: string
213
+ lastname:
214
+ name: lastname
215
+ type: string
216
+ firstname:
217
+ name: firstname
218
+ type: string
219
+ address:
220
+ name: address
221
+ type: string
222
+ city:
223
+ name: city
224
+ type: string
225
+ transformer: return data
226
+ readable: true
227
+ restResponse:
228
+ value:
229
+ data:
230
+ - value: <html lang='en-GB'></html>
231
+ pagination:
232
+ cursor: "2"
233
+ raw: <html lang='en-GB'></html>
234
+ headers:
235
+ content-type: text/html; charset=ISO-8859-1
236
+ sqlResponse:
237
+ value:
238
+ data:
239
+ - personid: 1
240
+ lastname: Hughes
241
+ firstname: Mike
242
+ address: 123 Fake Street
243
+ city: Belfast
244
+ - personid: 2
245
+ lastname: Smith
246
+ firstname: John
247
+ address: 64 Updown Road
248
+ city: Dublin
249
+ user:
250
+ value:
251
+ data:
252
+ _id: us_693a73206518477283a8d5ae31103252
253
+ email: test@test.com
254
+ roles:
255
+ app_957b12f943d348faa61db7e18e088d0f: BASIC
256
+ builder:
257
+ global: false
258
+ admin:
259
+ global: true
260
+ tenantId: default
261
+ status: active
262
+ budibaseAccess: true
263
+ csrfToken: 9c70291d-7137-48f9-9166-99ab5473a3d4
264
+ userId: us_693a73206518477283a8d5ae31103252
265
+ roleId: ADMIN
266
+ role:
267
+ _id: ADMIN
268
+ name: Admin
269
+ permissionId: admin
270
+ inherits: POWER
271
+ users:
272
+ value:
273
+ data:
274
+ - _id: us_693a73206518477283a8d5ae31103252
275
+ email: test@test.com
276
+ roles:
277
+ app_957b12f943d348faa61db7e18e088d0f: BASIC
278
+ builder:
279
+ global: false
280
+ admin:
281
+ global: true
282
+ tenantId: default
283
+ status: active
284
+ budibaseAccess: true
285
+ csrfToken: 9c70291d-7137-48f9-9166-99ab5473a3d4
286
+ userId: us_693a73206518477283a8d5ae31103252
287
+ roleId: ADMIN
288
+ role:
289
+ _id: ADMIN
290
+ name: Admin
291
+ permissionId: admin
292
+ inherits: POWER
293
+ securitySchemes:
294
+ ApiKeyAuth:
295
+ type: apiKey
296
+ in: header
297
+ name: x-budibase-api-key
298
+ description: Your individual API key, this will provide access based on the
299
+ configured RBAC settings of your user.
300
+ schemas:
301
+ application:
302
+ type: object
303
+ properties:
304
+ name:
305
+ description: The name of the app.
306
+ type: string
307
+ url:
308
+ description: The URL by which the app is accessed, this must be URL encoded.
309
+ type: string
310
+ required:
311
+ - name
312
+ - url
313
+ applicationOutput:
314
+ type: object
315
+ properties:
316
+ data:
317
+ type: object
318
+ properties:
319
+ name:
320
+ description: The name of the app.
321
+ type: string
322
+ url:
323
+ description: The URL by which the app is accessed, this must be URL encoded.
324
+ type: string
325
+ _id:
326
+ description: The ID of the app.
327
+ type: string
328
+ status:
329
+ description: The status of the app, stating it if is the development or
330
+ published version.
331
+ type: string
332
+ enum:
333
+ - development
334
+ - published
335
+ createdAt:
336
+ description: States when the app was created, will be constant. Stored in ISO
337
+ format.
338
+ type: string
339
+ updatedAt:
340
+ description: States the last time the app was updated - stored in ISO format.
341
+ type: string
342
+ version:
343
+ description: States the version of the Budibase client this app is currently
344
+ based on.
345
+ type: string
346
+ tenantId:
347
+ description: In a multi-tenant environment this will state the tenant this app
348
+ is within.
349
+ type: string
350
+ lockedBy:
351
+ description: The user this app is currently being built by.
352
+ type: object
353
+ required:
354
+ - _id
355
+ - name
356
+ - url
357
+ - status
358
+ - createdAt
359
+ - updatedAt
360
+ - version
361
+ required:
362
+ - data
363
+ row:
364
+ description: The row to be created/updated, based on the table schema.
365
+ type: object
366
+ additionalProperties:
367
+ description: Key value properties of any type, depending on the table schema.
368
+ searchOutput:
369
+ type: object
370
+ required:
371
+ - data
372
+ properties:
373
+ data:
374
+ description: An array of rows, these will each contain an _id field which can be
375
+ used to update or delete them.
376
+ type: array
377
+ items:
378
+ type: object
379
+ bookmark:
380
+ description: If pagination in use, this should be provided.
381
+ oneOf:
382
+ - type: string
383
+ - type: integer
384
+ hasNextPage:
385
+ description: If pagination in use, this will determine if there is another page
386
+ to fetch.
387
+ type: boolean
388
+ rowOutput:
389
+ type: object
390
+ properties:
391
+ data:
392
+ description: The row to be created/updated, based on the table schema.
393
+ type: object
394
+ additionalProperties:
395
+ description: Key value properties of any type, depending on the table schema.
396
+ properties:
397
+ _id:
398
+ description: The ID of the row.
399
+ type: string
400
+ tableId:
401
+ description: The ID of the table this row comes from.
402
+ type: string
403
+ required:
404
+ - tableId
405
+ - _id
406
+ required:
407
+ - data
408
+ table:
409
+ description: The table to be created/updated.
410
+ type: object
411
+ required:
412
+ - name
413
+ - schema
414
+ properties:
415
+ name:
416
+ description: The name of the table.
417
+ type: string
418
+ primaryDisplay:
419
+ type: string
420
+ description: The name of the column which should be used in relationship tags
421
+ when relating to this table.
422
+ schema:
423
+ type: object
424
+ additionalProperties:
425
+ oneOf:
426
+ - type: object
427
+ properties:
428
+ type:
429
+ type: string
430
+ enum:
431
+ - link
432
+ description: A relationship column.
433
+ constraints:
434
+ type: object
435
+ description: A constraint can be applied to the column which will be validated
436
+ against when a row is saved.
437
+ properties:
438
+ type:
439
+ type: string
440
+ enum:
441
+ - string
442
+ - number
443
+ - object
444
+ - boolean
445
+ presence:
446
+ type: boolean
447
+ description: Defines whether the column is required or not.
448
+ name:
449
+ type: string
450
+ description: The name of the column.
451
+ autocolumn:
452
+ type: boolean
453
+ description: Defines whether the column is automatically generated.
454
+ fieldName:
455
+ type: string
456
+ description: The name of the column which a relationship column is related to in
457
+ another table.
458
+ tableId:
459
+ type: string
460
+ description: The ID of the table which a relationship column is related to.
461
+ relationshipType:
462
+ type: string
463
+ enum:
464
+ - one-to-many
465
+ - many-to-one
466
+ - many-to-many
467
+ description: Defines the type of relationship that this column will be used for.
468
+ through:
469
+ type: string
470
+ description: When using a SQL table that contains many to many relationships
471
+ this defines the table the relationships are linked
472
+ through.
473
+ foreignKey:
474
+ type: string
475
+ description: When using a SQL table that contains a one to many relationship
476
+ this defines the foreign key.
477
+ throughFrom:
478
+ type: string
479
+ description: When using a SQL table that utilises a through table, this defines
480
+ the primary key in the through table for this table.
481
+ throughTo:
482
+ type: string
483
+ description: When using a SQL table that utilises a through table, this defines
484
+ the primary key in the through table for the related
485
+ table.
486
+ - type: object
487
+ properties:
488
+ type:
489
+ type: string
490
+ enum:
491
+ - formula
492
+ description: A formula column.
493
+ constraints:
494
+ type: object
495
+ description: A constraint can be applied to the column which will be validated
496
+ against when a row is saved.
497
+ properties:
498
+ type:
499
+ type: string
500
+ enum:
501
+ - string
502
+ - number
503
+ - object
504
+ - boolean
505
+ presence:
506
+ type: boolean
507
+ description: Defines whether the column is required or not.
508
+ name:
509
+ type: string
510
+ description: The name of the column.
511
+ autocolumn:
512
+ type: boolean
513
+ description: Defines whether the column is automatically generated.
514
+ formula:
515
+ type: string
516
+ description: Defines a Handlebars or JavaScript formula to use, note that
517
+ Javascript formulas are expected to be provided in the
518
+ base64 format.
519
+ formulaType:
520
+ type: string
521
+ enum:
522
+ - static
523
+ - dynamic
524
+ description: Defines whether this is a static or dynamic formula.
525
+ - type: object
526
+ properties:
527
+ type:
528
+ type: string
529
+ enum:
530
+ - string
531
+ - longform
532
+ - options
533
+ - number
534
+ - boolean
535
+ - array
536
+ - datetime
537
+ - attachment
538
+ - link
539
+ - formula
540
+ - auto
541
+ - json
542
+ - internal
543
+ description: Defines the type of the column, most explain themselves, a link
544
+ column is a relationship.
545
+ constraints:
546
+ type: object
547
+ description: A constraint can be applied to the column which will be validated
548
+ against when a row is saved.
549
+ properties:
550
+ type:
551
+ type: string
552
+ enum:
553
+ - string
554
+ - number
555
+ - object
556
+ - boolean
557
+ presence:
558
+ type: boolean
559
+ description: Defines whether the column is required or not.
560
+ name:
561
+ type: string
562
+ description: The name of the column.
563
+ autocolumn:
564
+ type: boolean
565
+ description: Defines whether the column is automatically generated.
566
+ tableOutput:
567
+ type: object
568
+ properties:
569
+ data:
570
+ description: The table to be created/updated.
571
+ type: object
572
+ required:
573
+ - name
574
+ - schema
575
+ - _id
576
+ properties:
577
+ name:
578
+ description: The name of the table.
579
+ type: string
580
+ primaryDisplay:
581
+ type: string
582
+ description: The name of the column which should be used in relationship tags
583
+ when relating to this table.
584
+ schema:
585
+ type: object
586
+ additionalProperties:
587
+ oneOf:
588
+ - type: object
589
+ properties:
590
+ type:
591
+ type: string
592
+ enum:
593
+ - link
594
+ description: A relationship column.
595
+ constraints:
596
+ type: object
597
+ description: A constraint can be applied to the column which will be validated
598
+ against when a row is saved.
599
+ properties:
600
+ type:
601
+ type: string
602
+ enum:
603
+ - string
604
+ - number
605
+ - object
606
+ - boolean
607
+ presence:
608
+ type: boolean
609
+ description: Defines whether the column is required or not.
610
+ name:
611
+ type: string
612
+ description: The name of the column.
613
+ autocolumn:
614
+ type: boolean
615
+ description: Defines whether the column is automatically generated.
616
+ fieldName:
617
+ type: string
618
+ description: The name of the column which a relationship column is related to in
619
+ another table.
620
+ tableId:
621
+ type: string
622
+ description: The ID of the table which a relationship column is related to.
623
+ relationshipType:
624
+ type: string
625
+ enum:
626
+ - one-to-many
627
+ - many-to-one
628
+ - many-to-many
629
+ description: Defines the type of relationship that this column will be used for.
630
+ through:
631
+ type: string
632
+ description: When using a SQL table that contains many to many relationships
633
+ this defines the table the relationships are linked
634
+ through.
635
+ foreignKey:
636
+ type: string
637
+ description: When using a SQL table that contains a one to many relationship
638
+ this defines the foreign key.
639
+ throughFrom:
640
+ type: string
641
+ description: When using a SQL table that utilises a through table, this defines
642
+ the primary key in the through table for this table.
643
+ throughTo:
644
+ type: string
645
+ description: When using a SQL table that utilises a through table, this defines
646
+ the primary key in the through table for the related
647
+ table.
648
+ - type: object
649
+ properties:
650
+ type:
651
+ type: string
652
+ enum:
653
+ - formula
654
+ description: A formula column.
655
+ constraints:
656
+ type: object
657
+ description: A constraint can be applied to the column which will be validated
658
+ against when a row is saved.
659
+ properties:
660
+ type:
661
+ type: string
662
+ enum:
663
+ - string
664
+ - number
665
+ - object
666
+ - boolean
667
+ presence:
668
+ type: boolean
669
+ description: Defines whether the column is required or not.
670
+ name:
671
+ type: string
672
+ description: The name of the column.
673
+ autocolumn:
674
+ type: boolean
675
+ description: Defines whether the column is automatically generated.
676
+ formula:
677
+ type: string
678
+ description: Defines a Handlebars or JavaScript formula to use, note that
679
+ Javascript formulas are expected to be provided in the
680
+ base64 format.
681
+ formulaType:
682
+ type: string
683
+ enum:
684
+ - static
685
+ - dynamic
686
+ description: Defines whether this is a static or dynamic formula.
687
+ - type: object
688
+ properties:
689
+ type:
690
+ type: string
691
+ enum:
692
+ - string
693
+ - longform
694
+ - options
695
+ - number
696
+ - boolean
697
+ - array
698
+ - datetime
699
+ - attachment
700
+ - link
701
+ - formula
702
+ - auto
703
+ - json
704
+ - internal
705
+ description: Defines the type of the column, most explain themselves, a link
706
+ column is a relationship.
707
+ constraints:
708
+ type: object
709
+ description: A constraint can be applied to the column which will be validated
710
+ against when a row is saved.
711
+ properties:
712
+ type:
713
+ type: string
714
+ enum:
715
+ - string
716
+ - number
717
+ - object
718
+ - boolean
719
+ presence:
720
+ type: boolean
721
+ description: Defines whether the column is required or not.
722
+ name:
723
+ type: string
724
+ description: The name of the column.
725
+ autocolumn:
726
+ type: boolean
727
+ description: Defines whether the column is automatically generated.
728
+ _id:
729
+ description: The ID of the table.
730
+ type: string
731
+ required:
732
+ - data
733
+ executeQuery:
734
+ description: The query body must contain the required parameters for the query,
735
+ this depends on query type, setup and bindings.
736
+ type: object
737
+ additionalProperties:
738
+ description: Key value properties of any type, depending on the query output schema.
739
+ executeQueryOutput:
740
+ type: object
741
+ properties:
742
+ data:
743
+ description: The data response from the query.
744
+ type: array
745
+ items:
746
+ type: object
747
+ extra:
748
+ description: Extra information that is not part of the main data, e.g. headers.
749
+ type: object
750
+ properties:
751
+ headers:
752
+ description: If carrying out a REST request, this will contain the response
753
+ headers.
754
+ type: object
755
+ raw:
756
+ description: The raw query response, as a string.
757
+ type: string
758
+ pagination:
759
+ description: If pagination is supported, this will contain the bookmark/anchor
760
+ information for it.
761
+ type: object
762
+ required:
763
+ - data
764
+ query:
765
+ type: object
766
+ properties:
767
+ _id:
768
+ description: The ID of the query.
769
+ type: string
770
+ datasourceId:
771
+ description: The ID of the data source the query belongs to.
772
+ type: string
773
+ parameters:
774
+ description: The bindings which are required to perform this query.
775
+ type: array
776
+ items:
777
+ type: string
778
+ fields:
779
+ description: The fields that are used to perform this query, e.g. the sql
780
+ statement
781
+ type: object
782
+ queryVerb:
783
+ description: The verb that describes this query.
784
+ enum:
785
+ - create
786
+ - read
787
+ - update
788
+ - delete
789
+ name:
790
+ description: The name of the query.
791
+ type: string
792
+ schema:
793
+ description: The schema of the data returned when the query is executed.
794
+ type: object
795
+ transformer:
796
+ description: The JavaScript transformer function, applied after the query
797
+ responds with data.
798
+ type: string
799
+ readable:
800
+ description: Whether the query has readable data.
801
+ type: boolean
802
+ required:
803
+ - name
804
+ - schema
805
+ - _id
806
+ user:
807
+ type: object
808
+ properties:
809
+ email:
810
+ description: The email address of the user, this must be unique.
811
+ type: string
812
+ password:
813
+ description: The password of the user if using password based login - this will
814
+ never be returned. This can be left out of subsequent requests
815
+ (updates) and will be enriched back into the user structure.
816
+ type: string
817
+ status:
818
+ description: The status of the user, if they are active.
819
+ type: string
820
+ enum:
821
+ - active
822
+ firstName:
823
+ description: The first name of the user
824
+ type: string
825
+ lastName:
826
+ description: The last name of the user
827
+ type: string
828
+ forceResetPassword:
829
+ description: If set to true forces the user to reset their password on first
830
+ login.
831
+ type: boolean
832
+ builder:
833
+ description: Describes if the user is a builder user or not.
834
+ type: object
835
+ properties:
836
+ global:
837
+ description: If set to true the user will be able to build any app in the
838
+ system.
839
+ type: boolean
840
+ admin:
841
+ description: Describes if the user is an admin user or not.
842
+ type: object
843
+ properties:
844
+ global:
845
+ description: If set to true the user will be able to administrate the system.
846
+ type: boolean
847
+ roles:
848
+ description: Contains the roles of the user per app (assuming they are not a
849
+ builder user).
850
+ type: object
851
+ additionalProperties:
852
+ type: string
853
+ description: A map of app ID (production app ID, minus the _dev component) to a
854
+ role ID, e.g. ADMIN.
855
+ required:
856
+ - email
857
+ - roles
858
+ userOutput:
859
+ type: object
860
+ properties:
861
+ data:
862
+ type: object
863
+ properties:
864
+ email:
865
+ description: The email address of the user, this must be unique.
866
+ type: string
867
+ password:
868
+ description: The password of the user if using password based login - this will
869
+ never be returned. This can be left out of subsequent requests
870
+ (updates) and will be enriched back into the user structure.
871
+ type: string
872
+ status:
873
+ description: The status of the user, if they are active.
874
+ type: string
875
+ enum:
876
+ - active
877
+ firstName:
878
+ description: The first name of the user
879
+ type: string
880
+ lastName:
881
+ description: The last name of the user
882
+ type: string
883
+ forceResetPassword:
884
+ description: If set to true forces the user to reset their password on first
885
+ login.
886
+ type: boolean
887
+ builder:
888
+ description: Describes if the user is a builder user or not.
889
+ type: object
890
+ properties:
891
+ global:
892
+ description: If set to true the user will be able to build any app in the
893
+ system.
894
+ type: boolean
895
+ admin:
896
+ description: Describes if the user is an admin user or not.
897
+ type: object
898
+ properties:
899
+ global:
900
+ description: If set to true the user will be able to administrate the system.
901
+ type: boolean
902
+ roles:
903
+ description: Contains the roles of the user per app (assuming they are not a
904
+ builder user).
905
+ type: object
906
+ additionalProperties:
907
+ type: string
908
+ description: A map of app ID (production app ID, minus the _dev component) to a
909
+ role ID, e.g. ADMIN.
910
+ _id:
911
+ description: The ID of the user.
912
+ type: string
913
+ required:
914
+ - email
915
+ - roles
916
+ - _id
917
+ required:
918
+ - data
919
+ nameSearch:
920
+ type: object
921
+ properties:
922
+ name:
923
+ type: string
924
+ description: The name to be used when searching - this will be used in a case
925
+ insensitive starts with match.
926
+ required:
927
+ - name
928
+ security:
929
+ - ApiKeyAuth: []
930
+ paths:
931
+ /applications:
932
+ post:
933
+ summary: Create an application
934
+ tags:
935
+ - applications
936
+ parameters:
937
+ - $ref: "#/components/parameters/appId"
938
+ requestBody:
939
+ required: true
940
+ content:
941
+ application/json:
942
+ schema:
943
+ $ref: "#/components/schemas/application"
944
+ responses:
945
+ "200":
946
+ description: Returns the created application.
947
+ content:
948
+ application/json:
949
+ schema:
950
+ $ref: "#/components/schemas/applicationOutput"
951
+ examples:
952
+ application:
953
+ $ref: "#/components/examples/application"
954
+ "/applications/{appId}":
955
+ put:
956
+ summary: Update an application
957
+ tags:
958
+ - applications
959
+ parameters:
960
+ - $ref: "#/components/parameters/appIdUrl"
961
+ requestBody:
962
+ required: true
963
+ content:
964
+ application/json:
965
+ schema:
966
+ $ref: "#/components/schemas/application"
967
+ responses:
968
+ "200":
969
+ description: Returns the updated application.
970
+ content:
971
+ application/json:
972
+ schema:
973
+ $ref: "#/components/schemas/applicationOutput"
974
+ examples:
975
+ application:
976
+ $ref: "#/components/examples/application"
977
+ delete:
978
+ summary: Delete an application
979
+ tags:
980
+ - applications
981
+ parameters:
982
+ - $ref: "#/components/parameters/appIdUrl"
983
+ responses:
984
+ "200":
985
+ description: Returns the deleted application.
986
+ content:
987
+ application/json:
988
+ schema:
989
+ $ref: "#/components/schemas/applicationOutput"
990
+ examples:
991
+ application:
992
+ $ref: "#/components/examples/application"
993
+ get:
994
+ summary: Retrieve an application
995
+ tags:
996
+ - applications
997
+ parameters:
998
+ - $ref: "#/components/parameters/appIdUrl"
999
+ responses:
1000
+ "200":
1001
+ description: Returns the retrieved application.
1002
+ content:
1003
+ application/json:
1004
+ schema:
1005
+ $ref: "#/components/schemas/applicationOutput"
1006
+ examples:
1007
+ application:
1008
+ $ref: "#/components/examples/application"
1009
+ /applications/search:
1010
+ post:
1011
+ summary: Search for applications
1012
+ description: Based on application properties (currently only name) search for
1013
+ applications.
1014
+ tags:
1015
+ - applications
1016
+ parameters:
1017
+ - $ref: "#/components/parameters/appId"
1018
+ requestBody:
1019
+ required: true
1020
+ content:
1021
+ application/json:
1022
+ schema:
1023
+ $ref: "#/components/schemas/nameSearch"
1024
+ responses:
1025
+ "200":
1026
+ description: Returns the applications that were found based on the search
1027
+ parameters.
1028
+ content:
1029
+ application/json:
1030
+ schema:
1031
+ type: object
1032
+ required:
1033
+ - data
1034
+ properties:
1035
+ data:
1036
+ type: array
1037
+ items:
1038
+ $ref: "#/components/schemas/application"
1039
+ examples:
1040
+ applications:
1041
+ $ref: "#/components/examples/applications"
1042
+ "/queries/{queryId}":
1043
+ post:
1044
+ summary: Execute a query
1045
+ description: Queries which have been created within a Budibase app can be
1046
+ executed using this,
1047
+ tags:
1048
+ - queries
1049
+ parameters:
1050
+ - $ref: "#/components/parameters/queryId"
1051
+ - $ref: "#/components/parameters/appId"
1052
+ requestBody:
1053
+ required: true
1054
+ content:
1055
+ application/json:
1056
+ schema:
1057
+ $ref: "#/components/schemas/executeQuery"
1058
+ responses:
1059
+ "200":
1060
+ description: Returns the result of the query execution.
1061
+ content:
1062
+ application/json:
1063
+ schema:
1064
+ $ref: "#/components/schemas/executeQueryOutput"
1065
+ examples:
1066
+ REST:
1067
+ $ref: "#/components/examples/restResponse"
1068
+ SQL:
1069
+ $ref: "#/components/examples/sqlResponse"
1070
+ /queries/search:
1071
+ post:
1072
+ summary: Search for queries
1073
+ description: Based on query properties (currently only name) search for queries.
1074
+ tags:
1075
+ - queries
1076
+ parameters:
1077
+ - $ref: "#/components/parameters/appId"
1078
+ requestBody:
1079
+ required: true
1080
+ content:
1081
+ application/json:
1082
+ schema:
1083
+ $ref: "#/components/schemas/nameSearch"
1084
+ responses:
1085
+ "200":
1086
+ description: Returns the queries found based on the search parameters.
1087
+ content:
1088
+ application/json:
1089
+ schema:
1090
+ type: object
1091
+ required:
1092
+ - data
1093
+ properties:
1094
+ data:
1095
+ type: array
1096
+ items:
1097
+ $ref: "#/components/schemas/query"
1098
+ examples:
1099
+ queries:
1100
+ $ref: "#/components/examples/queries"
1101
+ "/tables/{tableId}/rows":
1102
+ post:
1103
+ summary: Create a row
1104
+ description: Creates a row within the specified table.
1105
+ tags:
1106
+ - rows
1107
+ parameters:
1108
+ - $ref: "#/components/parameters/tableId"
1109
+ - $ref: "#/components/parameters/appId"
1110
+ requestBody:
1111
+ required: true
1112
+ content:
1113
+ application/json:
1114
+ schema:
1115
+ $ref: "#/components/schemas/row"
1116
+ examples:
1117
+ row:
1118
+ $ref: "#/components/examples/inputRow"
1119
+ responses:
1120
+ "200":
1121
+ description: Returns the created row, including the ID which has been generated
1122
+ for it. This can be found in the Budibase portal, viewed under the
1123
+ developer information.
1124
+ content:
1125
+ application/json:
1126
+ schema:
1127
+ $ref: "#/components/schemas/rowOutput"
1128
+ examples:
1129
+ row:
1130
+ $ref: "#/components/examples/row"
1131
+ "/tables/{tableId}/rows/{rowId}":
1132
+ put:
1133
+ summary: Update a row
1134
+ description: Updates a row within the specified table.
1135
+ tags:
1136
+ - rows
1137
+ parameters:
1138
+ - $ref: "#/components/parameters/tableId"
1139
+ - $ref: "#/components/parameters/rowId"
1140
+ - $ref: "#/components/parameters/appId"
1141
+ requestBody:
1142
+ required: true
1143
+ content:
1144
+ application/json:
1145
+ schema:
1146
+ $ref: "#/components/schemas/row"
1147
+ examples:
1148
+ row:
1149
+ $ref: "#/components/examples/inputRow"
1150
+ responses:
1151
+ "200":
1152
+ description: Returns the created row, including the ID which has been generated
1153
+ for it.
1154
+ content:
1155
+ application/json:
1156
+ schema:
1157
+ $ref: "#/components/schemas/rowOutput"
1158
+ examples:
1159
+ row:
1160
+ $ref: "#/components/examples/row"
1161
+ delete:
1162
+ summary: Delete a row
1163
+ description: Deletes a row within the specified table.
1164
+ tags:
1165
+ - rows
1166
+ parameters:
1167
+ - $ref: "#/components/parameters/tableId"
1168
+ - $ref: "#/components/parameters/rowId"
1169
+ - $ref: "#/components/parameters/appId"
1170
+ responses:
1171
+ "200":
1172
+ description: Returns the deleted row, including the ID which has been generated
1173
+ for it.
1174
+ content:
1175
+ application/json:
1176
+ schema:
1177
+ $ref: "#/components/schemas/rowOutput"
1178
+ examples:
1179
+ row:
1180
+ $ref: "#/components/examples/row"
1181
+ get:
1182
+ summary: Retrieve a row
1183
+ description: This gets a single row, it will be enriched with the full related
1184
+ rows, rather than the squashed "primaryDisplay" format returned by the
1185
+ search endpoint.
1186
+ tags:
1187
+ - rows
1188
+ parameters:
1189
+ - $ref: "#/components/parameters/tableId"
1190
+ - $ref: "#/components/parameters/rowId"
1191
+ - $ref: "#/components/parameters/appId"
1192
+ responses:
1193
+ "200":
1194
+ description: Returns the retrieved row.
1195
+ content:
1196
+ application/json:
1197
+ schema:
1198
+ $ref: "#/components/schemas/rowOutput"
1199
+ examples:
1200
+ enrichedRow:
1201
+ $ref: "#/components/examples/enrichedRow"
1202
+ "/tables/{tableId}/rows/search":
1203
+ post:
1204
+ summary: Search for rows
1205
+ tags:
1206
+ - rows
1207
+ parameters:
1208
+ - $ref: "#/components/parameters/tableId"
1209
+ - $ref: "#/components/parameters/appId"
1210
+ requestBody:
1211
+ required: true
1212
+ content:
1213
+ application/json:
1214
+ schema:
1215
+ type: object
1216
+ required:
1217
+ - query
1218
+ properties:
1219
+ query:
1220
+ type: object
1221
+ properties:
1222
+ string:
1223
+ type: object
1224
+ example:
1225
+ columnName1: value
1226
+ columnName2: value
1227
+ description: A map of field name to the string to search for, this will look for
1228
+ rows that have a value starting with the string value.
1229
+ additionalProperties:
1230
+ type: string
1231
+ description: The value to search for in the column.
1232
+ fuzzy:
1233
+ type: object
1234
+ description: A fuzzy search, only supported by internal tables.
1235
+ range:
1236
+ type: object
1237
+ description: Searches within a range, the format of this must be columnName ->
1238
+ [low, high].
1239
+ example:
1240
+ columnName1:
1241
+ - 10
1242
+ - 20
1243
+ equal:
1244
+ type: object
1245
+ description: Searches for rows that have a column value that is exactly the
1246
+ value set.
1247
+ notEqual:
1248
+ type: object
1249
+ description: Searches for any row which does not contain the specified column
1250
+ value.
1251
+ empty:
1252
+ type: object
1253
+ description: Searches for rows which do not contain the specified column. The
1254
+ object should simply contain keys of the column names,
1255
+ these can map to any value.
1256
+ example:
1257
+ columnName1: ""
1258
+ notEmpty:
1259
+ type: object
1260
+ description: Searches for rows which have the specified column.
1261
+ oneOf:
1262
+ type: object
1263
+ description: Searches for rows which have a column value that is any of the
1264
+ specified values. The format of this must be columnName
1265
+ -> [value1, value2].
1266
+ paginate:
1267
+ type: boolean
1268
+ description: Enables pagination, by default this is disabled.
1269
+ bookmark:
1270
+ oneOf:
1271
+ - type: string
1272
+ - type: integer
1273
+ description: If retrieving another page, the bookmark from the previous request
1274
+ must be supplied.
1275
+ limit:
1276
+ type: integer
1277
+ description: The maximum number of rows to return, useful when paginating, for
1278
+ internal tables this will be limited to 1000, for SQL tables
1279
+ it will be 5000.
1280
+ sort:
1281
+ type: object
1282
+ description: A set of parameters describing the sort behaviour of the search.
1283
+ properties:
1284
+ order:
1285
+ type: string
1286
+ enum:
1287
+ - ascending
1288
+ - descending
1289
+ description: The order of the sort, by default this is ascending.
1290
+ column:
1291
+ type: string
1292
+ description: The name of the column by which the rows will be sorted.
1293
+ type:
1294
+ type: string
1295
+ enum:
1296
+ - string
1297
+ - number
1298
+ description: Defines whether the column should be treated as a string or as
1299
+ numbers when sorting.
1300
+ responses:
1301
+ "200":
1302
+ description: The response will contain an array of rows that match the search
1303
+ parameters.
1304
+ content:
1305
+ application/json:
1306
+ schema:
1307
+ $ref: "#/components/schemas/searchOutput"
1308
+ examples:
1309
+ search:
1310
+ $ref: "#/components/examples/rows"
1311
+ /tables:
1312
+ post:
1313
+ summary: Create a table
1314
+ description: Create a table, this could be internal or external.
1315
+ tags:
1316
+ - tables
1317
+ parameters:
1318
+ - $ref: "#/components/parameters/appId"
1319
+ requestBody:
1320
+ content:
1321
+ application/json:
1322
+ schema:
1323
+ $ref: "#/components/schemas/table"
1324
+ examples:
1325
+ table:
1326
+ $ref: "#/components/examples/table"
1327
+ responses:
1328
+ "200":
1329
+ description: Returns the created table, including the ID which has been
1330
+ generated for it. This can be internal or external data sources.
1331
+ content:
1332
+ application/json:
1333
+ schema:
1334
+ $ref: "#/components/schemas/tableOutput"
1335
+ examples:
1336
+ table:
1337
+ $ref: "#/components/examples/table"
1338
+ "/tables/{tableId}":
1339
+ put:
1340
+ summary: Update a table
1341
+ description: Update a table, this could be internal or external.
1342
+ tags:
1343
+ - tables
1344
+ parameters:
1345
+ - $ref: "#/components/parameters/tableId"
1346
+ - $ref: "#/components/parameters/appId"
1347
+ requestBody:
1348
+ content:
1349
+ application/json:
1350
+ schema:
1351
+ $ref: "#/components/schemas/table"
1352
+ examples:
1353
+ table:
1354
+ $ref: "#/components/examples/table"
1355
+ responses:
1356
+ "200":
1357
+ description: Returns the updated table.
1358
+ content:
1359
+ application/json:
1360
+ schema:
1361
+ $ref: "#/components/schemas/tableOutput"
1362
+ examples:
1363
+ table:
1364
+ $ref: "#/components/examples/table"
1365
+ delete:
1366
+ summary: Delete a table
1367
+ description: Delete a table, this could be internal or external.
1368
+ tags:
1369
+ - tables
1370
+ parameters:
1371
+ - $ref: "#/components/parameters/tableId"
1372
+ - $ref: "#/components/parameters/appId"
1373
+ responses:
1374
+ "200":
1375
+ description: Returns the deleted table.
1376
+ content:
1377
+ application/json:
1378
+ schema:
1379
+ $ref: "#/components/schemas/tableOutput"
1380
+ examples:
1381
+ table:
1382
+ $ref: "#/components/examples/table"
1383
+ get:
1384
+ summary: Retrieve a table
1385
+ description: Lookup a table, this could be internal or external.
1386
+ tags:
1387
+ - tables
1388
+ parameters:
1389
+ - $ref: "#/components/parameters/tableId"
1390
+ - $ref: "#/components/parameters/appId"
1391
+ responses:
1392
+ "200":
1393
+ description: Returns the retrieved table.
1394
+ content:
1395
+ application/json:
1396
+ schema:
1397
+ $ref: "#/components/schemas/tableOutput"
1398
+ examples:
1399
+ table:
1400
+ $ref: "#/components/examples/table"
1401
+ /tables/search:
1402
+ post:
1403
+ summary: Search for tables
1404
+ description: Based on table properties (currently only name) search for tables.
1405
+ This could be an internal or an external table.
1406
+ tags:
1407
+ - tables
1408
+ parameters:
1409
+ - $ref: "#/components/parameters/appId"
1410
+ requestBody:
1411
+ required: true
1412
+ content:
1413
+ application/json:
1414
+ schema:
1415
+ $ref: "#/components/schemas/nameSearch"
1416
+ responses:
1417
+ "200":
1418
+ description: Returns the found tables, based on the search parameters.
1419
+ content:
1420
+ application/json:
1421
+ schema:
1422
+ type: object
1423
+ required:
1424
+ - data
1425
+ properties:
1426
+ data:
1427
+ type: array
1428
+ items:
1429
+ $ref: "#/components/schemas/table"
1430
+ examples:
1431
+ tables:
1432
+ $ref: "#/components/examples/tables"
1433
+ /users:
1434
+ post:
1435
+ summary: Create a user
1436
+ tags:
1437
+ - users
1438
+ requestBody:
1439
+ required: true
1440
+ content:
1441
+ application/json:
1442
+ schema:
1443
+ $ref: "#/components/schemas/user"
1444
+ responses:
1445
+ "200":
1446
+ description: Returns the created user.
1447
+ content:
1448
+ application/json:
1449
+ schema:
1450
+ $ref: "#/components/schemas/userOutput"
1451
+ examples:
1452
+ user:
1453
+ $ref: "#/components/examples/user"
1454
+ "/users/{userId}":
1455
+ put:
1456
+ summary: Update a user
1457
+ tags:
1458
+ - users
1459
+ parameters:
1460
+ - $ref: "#/components/parameters/userId"
1461
+ requestBody:
1462
+ required: true
1463
+ content:
1464
+ application/json:
1465
+ schema:
1466
+ $ref: "#/components/schemas/user"
1467
+ responses:
1468
+ "200":
1469
+ description: Returns the updated user.
1470
+ content:
1471
+ application/json:
1472
+ schema:
1473
+ $ref: "#/components/schemas/userOutput"
1474
+ examples:
1475
+ user:
1476
+ $ref: "#/components/examples/user"
1477
+ delete:
1478
+ summary: Delete a user
1479
+ tags:
1480
+ - users
1481
+ parameters:
1482
+ - $ref: "#/components/parameters/userId"
1483
+ responses:
1484
+ "200":
1485
+ description: Returns the deleted user.
1486
+ content:
1487
+ application/json:
1488
+ schema:
1489
+ $ref: "#/components/schemas/userOutput"
1490
+ examples:
1491
+ user:
1492
+ $ref: "#/components/examples/user"
1493
+ get:
1494
+ summary: Retrieve a user
1495
+ tags:
1496
+ - users
1497
+ parameters:
1498
+ - $ref: "#/components/parameters/userId"
1499
+ responses:
1500
+ "200":
1501
+ description: Returns the retrieved user.
1502
+ content:
1503
+ application/json:
1504
+ schema:
1505
+ $ref: "#/components/schemas/userOutput"
1506
+ examples:
1507
+ user:
1508
+ $ref: "#/components/examples/user"
1509
+ /users/search:
1510
+ post:
1511
+ summary: Search for users
1512
+ description: Based on user properties (currently only name) search for users.
1513
+ tags:
1514
+ - users
1515
+ requestBody:
1516
+ required: true
1517
+ content:
1518
+ application/json:
1519
+ schema:
1520
+ $ref: "#/components/schemas/nameSearch"
1521
+ responses:
1522
+ "200":
1523
+ description: Returns the found users based on search parameters.
1524
+ content:
1525
+ application/json:
1526
+ schema:
1527
+ type: object
1528
+ required:
1529
+ - data
1530
+ properties:
1531
+ data:
1532
+ type: array
1533
+ items:
1534
+ $ref: "#/components/schemas/user"
1535
+ examples:
1536
+ users:
1537
+ $ref: "#/components/examples/users"
1538
+ tags: []