data
QuickBase Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the QuickBase KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.quickbase.*.
Use lua_read_doc("integrations.quickbase") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
QuickBase workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.quickbase.list_apps({params = "example_params"}))' --json kosmo integrations:lua --eval 'print(docs.read("quickbase"))' --json
kosmo integrations:lua --eval 'print(docs.read("quickbase.list_apps"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local quickbase = app.integrations.quickbase
local result = quickbase.list_apps({params = "example_params"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.quickbase, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.quickbase.default.* or app.integrations.quickbase.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need QuickBase, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Quickbase Lua Reference
Namespace: quickbase
Quickbase tools target the REST API at https://api.quickbase.com/v1. Configure
a user token and realm hostname. The integration sends Authorization: Bearer <token> and QB-Realm-Hostname: <realm>.
Apps
local apps = app.integrations.quickbase.list_apps({
params = { name = "Operations" }
})
local app_meta = app.integrations.quickbase.get_app({ appId = "bqxxx" })
Write tools include create_app, copy_app, and delete_app. Use delete
tools carefully; some realms require the app name as confirmation.
Tables And Fields
local tables = app.integrations.quickbase.list_tables({ appId = "bqxxx" })
local table = app.integrations.quickbase.get_table({ tableId = "brxxx" })
local fields = app.integrations.quickbase.list_fields({
tableId = "brxxx",
params = { includeFieldPerms = true }
})
local field = app.integrations.quickbase.get_field({
tableId = "brxxx",
fieldId = 6
})
Write tools include create_table, update_table, delete_table,
create_field, update_field, and delete_field.
Records
local records = app.integrations.quickbase.list_records({
tableId = "brxxx",
where = "{6.EX.'Open'}",
select = {3, 6, 7},
options = { skip = 0, top = 100 }
})
local created = app.integrations.quickbase.create_record({
tableId = "brxxx",
fields = {
{ fieldId = 6, value = "Open" }
}
})
local upserted = app.integrations.quickbase.upsert_records({
tableId = "brxxx",
data = {
{ [6] = { value = "Open" } }
},
mergeFieldId = 3,
fieldsToReturn = {3, 6}
})
delete_records({ tableId, where }) deletes every record matching the Quickbase
query expression. Build and review where clauses carefully.
Reports And Relationships
local reports = app.integrations.quickbase.list_reports({ tableId = "brxxx" })
local report = app.integrations.quickbase.get_report({
tableId = "brxxx",
reportId = "7"
})
local rows = app.integrations.quickbase.run_report({
tableId = "brxxx",
reportId = "7",
body = { skip = 0, top = 100 }
})
Relationship tools include list_relationships, create_relationship, and
delete_relationship.
User And Generic API
local user = app.integrations.quickbase.get_current_user({})
local raw = app.integrations.quickbase.api_get({
path = "/fields",
params = { tableId = "brxxx" }
})
Available generic tools: api_get, api_post, and api_delete. Use them for
documented REST endpoints not yet wrapped directly.
Raw agent markdown
# Quickbase Lua Reference
Namespace: `quickbase`
Quickbase tools target the REST API at `https://api.quickbase.com/v1`. Configure
a user token and realm hostname. The integration sends `Authorization:
Bearer <token>` and `QB-Realm-Hostname: <realm>`.
## Apps
```lua
local apps = app.integrations.quickbase.list_apps({
params = { name = "Operations" }
})
local app_meta = app.integrations.quickbase.get_app({ appId = "bqxxx" })
```
Write tools include `create_app`, `copy_app`, and `delete_app`. Use delete
tools carefully; some realms require the app name as confirmation.
## Tables And Fields
```lua
local tables = app.integrations.quickbase.list_tables({ appId = "bqxxx" })
local table = app.integrations.quickbase.get_table({ tableId = "brxxx" })
local fields = app.integrations.quickbase.list_fields({
tableId = "brxxx",
params = { includeFieldPerms = true }
})
local field = app.integrations.quickbase.get_field({
tableId = "brxxx",
fieldId = 6
})
```
Write tools include `create_table`, `update_table`, `delete_table`,
`create_field`, `update_field`, and `delete_field`.
## Records
```lua
local records = app.integrations.quickbase.list_records({
tableId = "brxxx",
where = "{6.EX.'Open'}",
select = {3, 6, 7},
options = { skip = 0, top = 100 }
})
local created = app.integrations.quickbase.create_record({
tableId = "brxxx",
fields = {
{ fieldId = 6, value = "Open" }
}
})
local upserted = app.integrations.quickbase.upsert_records({
tableId = "brxxx",
data = {
{ [6] = { value = "Open" } }
},
mergeFieldId = 3,
fieldsToReturn = {3, 6}
})
```
`delete_records({ tableId, where })` deletes every record matching the Quickbase
query expression. Build and review `where` clauses carefully.
## Reports And Relationships
```lua
local reports = app.integrations.quickbase.list_reports({ tableId = "brxxx" })
local report = app.integrations.quickbase.get_report({
tableId = "brxxx",
reportId = "7"
})
local rows = app.integrations.quickbase.run_report({
tableId = "brxxx",
reportId = "7",
body = { skip = 0, top = 100 }
})
```
Relationship tools include `list_relationships`, `create_relationship`, and
`delete_relationship`.
## User And Generic API
```lua
local user = app.integrations.quickbase.get_current_user({})
local raw = app.integrations.quickbase.api_get({
path = "/fields",
params = { tableId = "brxxx" }
})
```
Available generic tools: `api_get`, `api_post`, and `api_delete`. Use them for
documented REST endpoints not yet wrapped directly. local result = app.integrations.quickbase.list_apps({params = "example_params"})
print(result) Functions
list_apps Read
List Quickbase apps available to the authenticated user.
- Lua path
app.integrations.quickbase.list_apps- Full name
quickbase.quickbase_list_apps
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | no | Optional query parameters such as name, limit, and offset. |
get_app Read
Get metadata for a Quickbase app.
- Lua path
app.integrations.quickbase.get_app- Full name
quickbase.quickbase_get_app
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | yes | The application ID. |
create_app Write
Create a Quickbase app.
- Lua path
app.integrations.quickbase.create_app- Full name
quickbase.quickbase_create_app
| Parameter | Type | Required | Description |
|---|---|---|---|
body | object | yes | App creation payload. |
copy_app Write
Copy an existing Quickbase app.
- Lua path
app.integrations.quickbase.copy_app- Full name
quickbase.quickbase_copy_app
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | yes | The source application ID. |
body | object | no | Optional copy settings. |
delete_app Write
Delete a Quickbase app by ID.
- Lua path
app.integrations.quickbase.delete_app- Full name
quickbase.quickbase_delete_app
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | yes | The application ID. |
name | string | no | Optional app name confirmation. |
list_tables Read
List all tables in a QuickBase application. Returns table IDs, names, and metadata for each table in the specified app.
- Lua path
app.integrations.quickbase.list_tables- Full name
quickbase.quickbase_list_tables
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | yes | The application ID (dbid) to list tables for. |
get_table Read
Get details for a specific QuickBase table, including its name, ID, and field definitions.
- Lua path
app.integrations.quickbase.get_table- Full name
quickbase.quickbase_get_table
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID (dbid) to retrieve details for. |
create_table Write
Create a table in a Quickbase app.
- Lua path
app.integrations.quickbase.create_table- Full name
quickbase.quickbase_create_table
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | yes | The application ID. |
body | object | yes | Table creation payload. |
update_table Write
Update Quickbase table metadata.
- Lua path
app.integrations.quickbase.update_table- Full name
quickbase.quickbase_update_table
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
body | object | yes | Table attributes to update. |
delete_table Write
Delete a Quickbase table.
- Lua path
app.integrations.quickbase.delete_table- Full name
quickbase.quickbase_delete_table
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
list_fields Read
List field definitions in a Quickbase table.
- Lua path
app.integrations.quickbase.list_fields- Full name
quickbase.quickbase_list_fields
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
params | object | no | Optional query parameters such as includeFieldPerms. |
get_field Read
Get a Quickbase field definition by field ID.
- Lua path
app.integrations.quickbase.get_field- Full name
quickbase.quickbase_get_field
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
fieldId | integer | yes | The field ID. |
create_field Write
Create a field in a Quickbase table.
- Lua path
app.integrations.quickbase.create_field- Full name
quickbase.quickbase_create_field
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
body | object | yes | Field creation payload. |
update_field Write
Update field properties in a Quickbase table.
- Lua path
app.integrations.quickbase.update_field- Full name
quickbase.quickbase_update_field
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
fieldId | integer | yes | The field ID. |
body | object | yes | Field attributes to update. |
delete_field Write
Delete a field from a Quickbase table.
- Lua path
app.integrations.quickbase.delete_field- Full name
quickbase.quickbase_delete_field
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
fieldId | integer | yes | The field ID. |
list_records Read
Query records from a QuickBase table. Supports filtering by conditions, selecting specific fields, sorting, grouping, and pagination. Use the where clause to filter records (QuickBase query syntax).
- Lua path
app.integrations.quickbase.list_records- Full name
quickbase.quickbase_list_records
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID (dbid) to query records from. |
where | string | no | Filter expression in QuickBase query syntax, e.g. '{3.EX.'Complete'}'. Omit to return all records. |
select | array | no | Array of field IDs to include in the response. Omit to return all fields. |
sortBy | array | no | Sort specification: [{fieldId: 3, order: "ASC"}, ...]. |
groupBy | array | no | Grouping specification: [{fieldId: 3, grouping: "equal-values"}, ...]. |
options | object | no | Additional query options: {skip: 0, top: 100, compareWith: "yesterday", includeRids: true}. |
get_record Read
Get a single QuickBase record by its record ID. Returns all field values for the specified record.
- Lua path
app.integrations.quickbase.get_record- Full name
quickbase.quickbase_get_record
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID (dbid) the record belongs to. |
recordId | integer | yes | The record ID to retrieve. |
create_record Write
Create a new record in a QuickBase table. Provide field data as an array of {fieldId, value} pairs.
- Lua path
app.integrations.quickbase.create_record- Full name
quickbase.quickbase_create_record
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID (dbid) to create the record in. |
fields | array | yes | Array of field data objects: [{fieldId: 6, value: "New value"}, {fieldId: 7, value: 42}, ...]. Each object must have a fieldId (integer) and value (mixed). |
upsert_records Write
Upsert one or more Quickbase records, optionally using a merge field.
- Lua path
app.integrations.quickbase.upsert_records- Full name
quickbase.quickbase_upsert_records
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
data | array | yes | Record data array using Quickbase field ID objects. |
mergeFieldId | integer | no | Optional merge field ID. |
fieldsToReturn | array | no | Optional field IDs to return. |
delete_records Write
Delete Quickbase records matching a where clause.
- Lua path
app.integrations.quickbase.delete_records- Full name
quickbase.quickbase_delete_records
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
where | string | yes | Quickbase query expression selecting records to delete. |
list_reports Read
List reports for a Quickbase table.
- Lua path
app.integrations.quickbase.list_reports- Full name
quickbase.quickbase_list_reports
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
get_report Read
Get metadata for a Quickbase report.
- Lua path
app.integrations.quickbase.get_report- Full name
quickbase.quickbase_get_report
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
reportId | string | yes | The report ID. |
run_report Read
Run a Quickbase report and return its data.
- Lua path
app.integrations.quickbase.run_report- Full name
quickbase.quickbase_run_report
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
reportId | string | yes | The report ID. |
body | object | no | Optional report run options. |
list_relationships Read
List relationships for a Quickbase table.
- Lua path
app.integrations.quickbase.list_relationships- Full name
quickbase.quickbase_list_relationships
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
create_relationship Write
Create a relationship for a Quickbase table.
- Lua path
app.integrations.quickbase.create_relationship- Full name
quickbase.quickbase_create_relationship
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The parent table ID. |
body | object | yes | Relationship creation payload. |
delete_relationship Write
Delete a Quickbase table relationship.
- Lua path
app.integrations.quickbase.delete_relationship- Full name
quickbase.quickbase_delete_relationship
| Parameter | Type | Required | Description |
|---|---|---|---|
tableId | string | yes | The table ID. |
relationshipId | integer | yes | The relationship ID. |
get_current_user Read
Get the currently authenticated QuickBase user. Returns user profile information including name, email, and user ID.
- Lua path
app.integrations.quickbase.get_current_user- Full name
quickbase.quickbase_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_get Read
Call a documented Quickbase REST API GET endpoint.
- Lua path
app.integrations.quickbase.api_get- Full name
quickbase.quickbase_api_get
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Endpoint path, such as /apps or /fields. |
params | object | no | Optional query parameters. |
api_post Write
Call a documented Quickbase REST API POST endpoint.
- Lua path
app.integrations.quickbase.api_post- Full name
quickbase.quickbase_api_post
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Endpoint path, such as /records. |
body | object | no | JSON request body. |
query | object | no | Optional query parameters. |
api_delete Write
Call a documented Quickbase REST API DELETE endpoint.
- Lua path
app.integrations.quickbase.api_delete- Full name
quickbase.quickbase_api_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Endpoint path, such as /records. |
body | object | no | JSON request body. |
query | object | no | Optional query parameters. |