Skip to content
v2.7

TablesDB

Databases, tables, columns, indexes and rows.

Databases, tables, columns, indexes and rows.

Class TablesDB: 72 methods (15 in @owbase/web, 72 in @owbase/node). The examples use the object form of the parameters; replace the values between < and > with your own.

List databases

GET /tablesdb · method page

SDK: @owbase/node only

Get a list of all databases from the current Owbase project. You can use the search parameter to filter your results.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the databases.read scope.

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.list({
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create database

POST /tablesdb · method page

SDK: @owbase/node only

Create a new Database.

Parameter Type Required Description
databaseId string yes Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Database name. Max length: 128 chars.
enabled boolean no Is the database enabled? When set to ‘disabled’, users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
description string no Optional description for the database.

Access: API key with the databases.write scope.

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.create({
databaseId: '<DATABASE_ID>',
name: '<NAME>',
enabled: false, // optional
description: '<DESCRIPTION>', // optional
});

List transactions

GET /tablesdb/transactions · method page

SDK: @owbase/web and @owbase/node

List transactions across all databases.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the documents.read scope (also accepts rows.read) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.listTransactions({
queries: [], // optional
total: false, // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.listTransactions({
queries: [], // optional
total: false, // optional
});

Create transaction

POST /tablesdb/transactions · method page

SDK: @owbase/web and @owbase/node

Create a new transaction.

Parameter Type Required Description
ttl number no Seconds before the transaction expires.

Access: API key with the documents.write scope (also accepts rows.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createTransaction({
ttl: 60, // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createTransaction({
ttl: 60, // optional
});

Get transaction

GET /tablesdb/transactions/{transactionId} · method page

SDK: @owbase/web and @owbase/node

Get a transaction by its unique ID.

Parameter Type Required Description
transactionId string yes Transaction ID.

Access: API key with the documents.read scope (also accepts rows.read) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.getTransaction({
transactionId: '<TRANSACTION_ID>',
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.getTransaction({
transactionId: '<TRANSACTION_ID>',
});

Update transaction

PATCH /tablesdb/transactions/{transactionId} · method page

SDK: @owbase/web and @owbase/node

Update a transaction, to either commit or roll back its operations.

Parameter Type Required Description
transactionId string yes Transaction ID.
commit boolean no Commit transaction?
rollback boolean no Rollback transaction?

Access: API key with the documents.write scope (also accepts rows.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateTransaction({
transactionId: '<TRANSACTION_ID>',
commit: false, // optional
rollback: false, // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateTransaction({
transactionId: '<TRANSACTION_ID>',
commit: false, // optional
rollback: false, // optional
});

Delete transaction

DELETE /tablesdb/transactions/{transactionId} · method page

SDK: @owbase/web and @owbase/node

Delete a transaction by its unique ID.

Parameter Type Required Description
transactionId string yes Transaction ID.

Access: API key with the documents.write scope (also accepts rows.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteTransaction({
transactionId: '<TRANSACTION_ID>',
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteTransaction({
transactionId: '<TRANSACTION_ID>',
});

Create operations

POST /tablesdb/transactions/{transactionId}/operations · method page

SDK: @owbase/web and @owbase/node

Create multiple operations in a single transaction.

Parameter Type Required Description
transactionId string yes Transaction ID.
operations object[] no Array of staged operations.

Access: API key with the documents.write scope (also accepts rows.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createOperations({
transactionId: '<TRANSACTION_ID>',
operations: [
{
action: 'create',
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
name: "Walter O'Brien",
},
},
], // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createOperations({
transactionId: '<TRANSACTION_ID>',
operations: [
{
action: 'create',
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
name: "Walter O'Brien",
},
},
], // optional
});

Get database

GET /tablesdb/{databaseId} · method page

SDK: @owbase/node only

Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.

Parameter Type Required Description
databaseId string yes Database ID.

Access: API key with the databases.read scope.

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.get({
databaseId: '<DATABASE_ID>',
});

Update database

PUT /tablesdb/{databaseId} · method page

SDK: @owbase/node only

Update a database by its unique ID.

Parameter Type Required Description
databaseId string yes Database ID.
name string no Database name. Max length: 128 chars.
enabled boolean no Is database enabled? When set to ‘disabled’, users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
description string no Optional description for the database.

Access: API key with the databases.write scope.

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.update({
databaseId: '<DATABASE_ID>',
name: '<NAME>', // optional
enabled: false, // optional
description: '<DESCRIPTION>', // optional
});

Delete database

DELETE /tablesdb/{databaseId} · method page

SDK: @owbase/node only

Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.

Parameter Type Required Description
databaseId string yes Database ID.

Access: API key with the databases.write scope.

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.delete({
databaseId: '<DATABASE_ID>',
});

List tables

GET /tablesdb/{databaseId}/tables · method page

SDK: @owbase/node only

Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.

Parameter Type Required Description
databaseId string yes Database ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: name, enabled, rowSecurity
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the tables.read scope (also accepts collections.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.listTables({
databaseId: '<DATABASE_ID>',
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create table

POST /tablesdb/{databaseId}/tables · method page

SDK: @owbase/node only

Create a new Table. Before using this route, you should create a new database resource using either a server integration API or directly from your database console.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Unique Id. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Table name. Max length: 128 chars.
permissions string[] no An array of permissions strings. By default, no user is granted with any permissions. Learn more about permissions.
rowSecurity boolean no Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. Learn more about permissions.
enabled boolean no Is table enabled? When set to ‘disabled’, users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
columns object[] no Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
indexes object[] no Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
description string no Optional description for the table.

Access: API key with the tables.write scope (also accepts collections.write).

@owbase/node
import { Client, TablesDB, Permission, Role } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createTable({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
name: '<NAME>',
permissions: [Permission.read(Role.any())], // optional
rowSecurity: false, // optional
enabled: false, // optional
columns: [], // optional
indexes: [], // optional
description: '<DESCRIPTION>', // optional
});

Get table

GET /tablesdb/{databaseId}/tables/{tableId} · method page

SDK: @owbase/node only

Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.

Access: API key with the tables.read scope (also accepts collections.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.getTable({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
});

Update table

PUT /tablesdb/{databaseId}/tables/{tableId} · method page

SDK: @owbase/node only

Update a table by its unique ID.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
name string no Table name. Max length: 128 chars.
permissions string[] no An array of permission strings. By default, the current permissions are inherited. Learn more about permissions.
rowSecurity boolean no Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. Learn more about permissions.
enabled boolean no Is table enabled? When set to ‘disabled’, users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
purge boolean no When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
description string no Optional description for the table.

Access: API key with the tables.write scope (also accepts collections.write).

@owbase/node
import { Client, TablesDB, Permission, Role } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateTable({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
name: '<NAME>', // optional
permissions: [Permission.read(Role.any())], // optional
rowSecurity: false, // optional
enabled: false, // optional
purge: false, // optional
description: '<DESCRIPTION>', // optional
});

Delete table

DELETE /tablesdb/{databaseId}/tables/{tableId} · method page

SDK: @owbase/node only

Delete a table by its unique ID. Only users with write permissions have access to delete this resource.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.

Access: API key with the tables.write scope (also accepts collections.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteTable({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
});

List columns

GET /tablesdb/{databaseId}/tables/{tableId}/columns · method page

SDK: @owbase/node only

List columns in the table.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, size, required, array, status, error
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the tables.read scope (also accepts collections.read, columns.read, attributes.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.listColumns({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
total: false, // optional
});

Create bigint column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/bigint · method page

SDK: @owbase/node only

Create a bigint column. Optionally, minimum and maximum values can be provided.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
min number no Minimum value
max number no Maximum value
xdefault number no Default value. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createBigIntColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
min: 0, // optional
max: 1000000, // optional
xdefault: 0, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update bigint column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/bigint/{key} · method page

SDK: @owbase/node only

Update a bigint column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault number no Default value. Cannot be set when column is required.
min number no Minimum value
max number no Maximum value
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateBigIntColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 0,
min: 0, // optional
max: 1000000, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create boolean column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/boolean · method page

SDK: @owbase/node only

Create a boolean column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault boolean no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createBooleanColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: false, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update boolean column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/boolean/{key} · method page

SDK: @owbase/node only

Update a boolean column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault boolean no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateBooleanColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: false,
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create datetime column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/datetime · method page

SDK: @owbase/node only

Create a date time column according to the ISO 8601 standard.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for the column in ISO 8601 format. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createDatetimeColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '2020-10-15T06:38:00.000+00:00', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update datetime column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/datetime/{key} · method page

SDK: @owbase/node only

Update a date time column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateDatetimeColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '2020-10-15T06:38:00.000+00:00',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create email column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/email · method page

SDK: @owbase/node only

Create an email column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createEmailColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '[email protected]', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update email column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/email/{key} · method page

SDK: @owbase/node only

Update an email column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateEmailColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '[email protected]',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create enum column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/enum · method page

SDK: @owbase/node only

Create an enumeration column. The elements param acts as a white-list of accepted values for this column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
elements string[] yes Array of enum values.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createEnumColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
elements: ['active', 'inactive'],
required: false,
xdefault: 'active', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update enum column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/enum/{key} · method page

SDK: @owbase/node only

Update an enum column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
elements string[] yes Updated list of enum values.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateEnumColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
elements: ['active', 'inactive'],
required: false,
xdefault: 'active',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create float column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/float · method page

SDK: @owbase/node only

Create a float column. Optionally, minimum and maximum values can be provided.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
min number no Minimum value
max number no Maximum value
xdefault number no Default value. Cannot be set when required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createFloatColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
min: 0, // optional
max: 100, // optional
xdefault: 10.5, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update float column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/float/{key} · method page

SDK: @owbase/node only

Update a float column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault number no Default value. Cannot be set when required.
min number no Minimum value
max number no Maximum value
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateFloatColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 10.5,
min: 0, // optional
max: 100, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create integer column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/integer · method page

SDK: @owbase/node only

Create an integer column. Optionally, minimum and maximum values can be provided.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
min number no Minimum value
max number no Maximum value
xdefault number no Default value. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createIntegerColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
min: 0, // optional
max: 100, // optional
xdefault: 10, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update integer column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/integer/{key} · method page

SDK: @owbase/node only

Update an integer column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault number no Default value. Cannot be set when column is required.
min number no Minimum value
max number no Maximum value
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateIntegerColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 10,
min: 0, // optional
max: 100, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create IP address column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/ip · method page

SDK: @owbase/node only

Create IP address column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createIpColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '192.0.2.0', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update IP address column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/ip/{key} · method page

SDK: @owbase/node only

Update an ip column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateIpColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: '192.0.2.0',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create line column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/line · method page

SDK: @owbase/node only

Create a geometric line column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[][] no Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [
[1, 2],
[3, 4],
[5, 6],
], // optional
description: '<DESCRIPTION>', // optional
});

Update line column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/line/{key} · method page

SDK: @owbase/node only

Update a line column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[][] no Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateLineColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [
[1, 2],
[3, 4],
[5, 6],
], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create longtext column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/longtext · method page

SDK: @owbase/node only

Create a longtext column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
encrypt boolean no Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createLongtextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});

Update longtext column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/longtext/{key} · method page

SDK: @owbase/node only

Update a longtext column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateLongtextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create mediumtext column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext · method page

SDK: @owbase/node only

Create a mediumtext column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
encrypt boolean no Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createMediumtextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});

Update mediumtext column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext/{key} · method page

SDK: @owbase/node only

Update a mediumtext column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateMediumtextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create point column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/point · method page

SDK: @owbase/node only

Create a geometric point column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[] no Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createPointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [1, 2], // optional
description: '<DESCRIPTION>', // optional
});

Update point column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/point/{key} · method page

SDK: @owbase/node only

Update a point column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[] no Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updatePointColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [1, 2], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create polygon column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/polygon · method page

SDK: @owbase/node only

Create a geometric polygon column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[][][] no Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createPolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [
[
[1, 2],
[3, 4],
[5, 6],
[1, 2],
],
], // optional
description: '<DESCRIPTION>', // optional
});

Update polygon column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key} · method page

SDK: @owbase/node only

Update a polygon column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault number[][][] no Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updatePolygonColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: [
[
[1, 2],
[3, 4],
[5, 6],
[1, 2],
],
], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create relationship column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/relationship · method page

SDK: @owbase/node only

Create relationship column. Learn more about relationship columns.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
relatedTableId string yes Related Table ID.
type RelationshipType yes Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany. Values: oneToOne, manyToOne, manyToMany, oneToMany.
twoWay boolean no Is Two Way?
key string no Column Key.
twoWayKey string no Two Way Column Key.
onDelete RelationMutate no Delete constraint. Possible values are: cascade, restrict, setNull. Values: cascade, restrict, setNull.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB, RelationshipType, RelationMutate } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createRelationshipColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
relatedTableId: '<RELATED_TABLE_ID>',
type: RelationshipType.OneToOne,
twoWay: false, // optional
key: '<KEY>', // optional
twoWayKey: '<TWO_WAY_KEY>', // optional
onDelete: RelationMutate.Cascade, // optional
description: '<DESCRIPTION>', // optional
});

Update relationship column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/relationship/{key} · method page

SDK: @owbase/node only

Update relationship column. Learn more about relationship columns.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
onDelete RelationMutate no Delete constraint. Possible values are: cascade, restrict, setNull. Values: cascade, restrict, setNull.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB, RelationMutate } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateRelationshipColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
onDelete: RelationMutate.Cascade, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create string column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/string · method page

SDK: @owbase/node only

Create a string column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
size number yes Column size for text columns, in number of characters.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
encrypt boolean no Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createStringColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
size: 1,
required: false,
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});

Update string column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/string/{key} · method page

SDK: @owbase/node only

Update a string column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
size number no Maximum size of the string column.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateStringColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World',
size: 1, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create text column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/text · method page

SDK: @owbase/node only

Create a text column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
encrypt boolean no Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createTextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});

Update text column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/text/{key} · method page

SDK: @owbase/node only

Update a text column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateTextColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create URL column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/url · method page

SDK: @owbase/node only

Create a URL column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createUrlColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'https://example.com', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});

Update URL column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/url/{key} · method page

SDK: @owbase/node only

Update an url column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateUrlColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'https://example.com',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Create varchar column

POST /tablesdb/{databaseId}/tables/{tableId}/columns/varchar · method page

SDK: @owbase/node only

Create a varchar column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
size number yes Column size for varchar columns, in number of characters. Maximum size is 16381.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
array boolean no Is column an array?
encrypt boolean no Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createVarcharColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
size: 1,
required: false,
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});

Update varchar column

PATCH /tablesdb/{databaseId}/tables/{tableId}/columns/varchar/{key} · method page

SDK: @owbase/node only

Update a varchar column. Changing the default value will not update already existing rows.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Column Key.
required boolean yes Is column required?
xdefault string no Default value for column when not provided. Cannot be set when column is required.
size number no Maximum size of the varchar column.
newKey string no New Column Key.
description string no Optional description for the column.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateVarcharColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
required: false,
xdefault: 'Hello World',
size: 1, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});

Get column

GET /tablesdb/{databaseId}/tables/{tableId}/columns/{key} · method page

SDK: @owbase/node only

Get column by ID.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.

Access: API key with the tables.read scope (also accepts collections.read, columns.read, attributes.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.getColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
});

Delete column

DELETE /tablesdb/{databaseId}/tables/{tableId}/columns/{key} · method page

SDK: @owbase/node only

Deletes a column.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
key string yes Column Key.

Access: API key with the tables.write scope (also accepts collections.write, columns.write, attributes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
});

List indexes

GET /tablesdb/{databaseId}/tables/{tableId}/indexes · method page

SDK: @owbase/node only

List indexes on the table.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following columns: key, type, status, attributes, error
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the tables.read scope (also accepts collections.read, indexes.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.listIndexes({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
total: false, // optional
});

Create index

POST /tablesdb/{databaseId}/tables/{tableId}/indexes · method page

SDK: @owbase/node only

Creates an index on the columns listed. Your index should include all the columns you will query in a single request. Type can be key, fulltext, unique, spatial, or trigram. trigram is only available on PostgreSQL and lets contains, startsWith, and endsWith queries on string columns use an index.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Index Key.
type TablesDBIndexType yes Index type. Values: key, fulltext, unique, spatial, trigram.
columns string[] yes Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.
orders OrderBy[] no Array of index orders. Maximum of 100 orders are allowed. Values: asc, desc.
lengths number[] no Length of index. Maximum of 100
description string no Optional description for the index.

Access: API key with the tables.write scope (also accepts collections.write, indexes.write).

@owbase/node
import { Client, TablesDB, TablesDBIndexType, OrderBy } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createIndex({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
type: TablesDBIndexType.Key,
columns: ['username'],
orders: [OrderBy.Asc], // optional
lengths: [], // optional
description: '<DESCRIPTION>', // optional
});

Get index

GET /tablesdb/{databaseId}/tables/{tableId}/indexes/{key} · method page

SDK: @owbase/node only

Get index by ID.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
key string yes Index Key.

Access: API key with the tables.read scope (also accepts collections.read, indexes.read).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.getIndex({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
});

Delete index

DELETE /tablesdb/{databaseId}/tables/{tableId}/indexes/{key} · method page

SDK: @owbase/node only

Delete an index.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
key string yes Index Key.

Access: API key with the tables.write scope (also accepts collections.write, indexes.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteIndex({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
key: '<KEY>',
});

List rows

GET /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/web and @owbase/node

Get a list of all the user’s rows in a given table. You can use the query params to filter your results.

Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (alias.column). The response omits their $id, $sequence, $createdAt, $updatedAt, $permissions, $databaseId and $tableId unless they select or group it, and those of a right or full join row that no row of this table matched. SDK row models fill omitted system columns with empty values.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.
transactionId string no Transaction ID to read uncommitted changes within the transaction.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.
ttl number no TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours).

Access: API key with the rows.read scope (also accepts documents.read) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.listRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false, // optional
ttl: 0, // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.listRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false, // optional
ttl: 0, // optional
});

Create row

POST /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/web and @owbase/node

Create a new Row. Before using this route, you should create a new table resource using either a server integration API or directly from your database console.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration. Make sure to define columns before creating rows.
rowId string yes Row ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
data object yes Row data as JSON object.
permissions string[] no An array of permissions strings. By default, only the current user is granted all permissions. Learn more about permissions.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB, Permission, Role } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 30,
isAdmin: false,
},
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB, Permission, Role } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.createRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 30,
isAdmin: false,
},
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Create rows

POST /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/node only

Create new Rows. Before using this route, you should create a new table resource using either a server integration API or directly from your database console.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration. Make sure to define columns before creating rows.
rows object[] yes Array of rows data as JSON objects.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.createRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rows: [
{
$id: 'example1',
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 30,
isAdmin: false,
},
],
transactionId: '<TRANSACTION_ID>', // optional
});

Upsert rows

PUT /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/node only

Create or update Rows. Before using this route, you should create a new table resource using either a server integration API or directly from your database console.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
rows object[] yes Array of row data as JSON objects. May contain partial rows.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.upsertRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rows: [
{
$id: 'example1',
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 30,
isAdmin: false,
},
],
transactionId: '<TRANSACTION_ID>', // optional
});

Update rows

PATCH /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/node only

Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
data object no Row data as JSON object. Include only column and value pairs to be updated.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 33,
isAdmin: false,
}, // optional
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Delete rows

DELETE /tablesdb/{databaseId}/tables/{tableId}/rows · method page

SDK: @owbase/node only

Bulk delete rows using queries, if no queries are passed then all rows are deleted.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write).

@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: ['{"method":"equal", "attribute":"$id", "values":["<ROW_ID>"]}'], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Create query

POST /tablesdb/{databaseId}/tables/{tableId}/rows/query · method page

SDK: @owbase/web and @owbase/node

Get a list of all the user’s rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger queries arrays than can fit in a URL query string.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the TablesDB service server integration.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.
transactionId string no Transaction ID to read uncommitted changes within the transaction.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.
ttl number no TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours).

Access: API key with the rows.read scope (also accepts documents.read) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.createQuery({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false, // optional
ttl: 0, // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.createQuery({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false, // optional
ttl: 0, // optional
});

Get row

GET /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} · method page

SDK: @owbase/web and @owbase/node

Get a row by its unique ID. This endpoint response returns a JSON object with the row data.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
rowId string yes Row ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long.
transactionId string no Transaction ID to read uncommitted changes within the transaction.

Access: API key with the rows.read scope (also accepts documents.read) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.getRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.getRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Upsert a row

PUT /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} · method page

SDK: @owbase/web and @owbase/node

Create or update a Row. Before using this route, you should create a new table resource using either a server integration API or directly from your database console.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
rowId string yes Row ID.
data object no Row data as JSON object. Include all required columns of the row to be created or updated.
permissions string[] no An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB, Permission, Role } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.upsertRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 33,
isAdmin: false,
}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB, Permission, Role } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.upsertRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 33,
isAdmin: false,
}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Update row

PATCH /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} · method page

SDK: @owbase/web and @owbase/node

Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
rowId string yes Row ID.
data object no Row data as JSON object. Include only columns and value pairs to be updated.
permissions string[] no An array of permissions strings. By default, the current permissions are inherited. Learn more about permissions.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB, Permission, Role } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 33,
isAdmin: false,
}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB, Permission, Role } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.updateRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
data: {
username: 'walter.obrien',
fullName: "Walter O'Brien",
age: 33,
isAdmin: false,
}, // optional
permissions: [Permission.read(Role.any())], // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Delete row

DELETE /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId} · method page

SDK: @owbase/web and @owbase/node

Delete a row by its unique ID.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID. You can create a new table using the Database service server integration.
rowId string yes Row ID.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.deleteRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
transactionId: '<TRANSACTION_ID>', // optional
});

Decrement row column

PATCH /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement · method page

SDK: @owbase/web and @owbase/node

Decrement a specific column of a row by a given value.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
rowId string yes Row ID.
column string yes Column key.
value number no Value to increment the column by. The value must be a number.
min number no Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.decrementRowColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '<COLUMN>',
value: 1, // optional
min: 0, // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.decrementRowColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '<COLUMN>',
value: 1, // optional
min: 0, // optional
transactionId: '<TRANSACTION_ID>', // optional
});

Increment row column

PATCH /tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment · method page

SDK: @owbase/web and @owbase/node

Increment a specific column of a row by a given value.

Parameter Type Required Description
databaseId string yes Database ID.
tableId string yes Table ID.
rowId string yes Row ID.
column string yes Column key.
value number no Value to increment the column by. The value must be a number.
max number no Maximum value for the column. If the current value is greater than this value, an error will be thrown.
transactionId string no Transaction ID for staging the operation.

Access: API key with the rows.write scope (also accepts documents.write) or user session, or even no session (the resource’s permissions apply).

@owbase/web
import { Client, TablesDB } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const tablesDB = new TablesDB(client);
const result = await tablesDB.incrementRowColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '<COLUMN>',
value: 1, // optional
max: 100, // optional
transactionId: '<TRANSACTION_ID>', // optional
});
console.log(result);
@owbase/node
import { Client, TablesDB } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const tablesDB = new TablesDB(client);
const result = await tablesDB.incrementRowColumn({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
column: '<COLUMN>',
value: 1, // optional
max: 100, // optional
transactionId: '<TRANSACTION_ID>', // optional
});

The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.

Was this page helpful?