@budibase/server 1.0.79 → 1.0.80-alpha.2

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