curl --request POST \
--url https://api.botpress.cloud/v1/tables/{table} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-bot-id: <x-bot-id>' \
--data '
{
"schema": {},
"factor": 1,
"frozen": true,
"tags": {},
"isComputeEnabled": true
}
'{
"table": {
"id": "<string>",
"name": "<string>",
"schema": {
"properties": {},
"additionalProperties": true,
"type": "object",
"$schema": "<string>",
"required": [
"<string>"
]
},
"factor": 1,
"frozen": true,
"tags": {},
"isComputeEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"created": true,
"rows": 123,
"stale": 123,
"indexing": 123
}Retrieves information about a specific table if it exists; otherwise, creates a new table based on the provided schema.
curl --request POST \
--url https://api.botpress.cloud/v1/tables/{table} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-bot-id: <x-bot-id>' \
--data '
{
"schema": {},
"factor": 1,
"frozen": true,
"tags": {},
"isComputeEnabled": true
}
'{
"table": {
"id": "<string>",
"name": "<string>",
"schema": {
"properties": {},
"additionalProperties": true,
"type": "object",
"$schema": "<string>",
"required": [
"<string>"
]
},
"factor": 1,
"frozen": true,
"tags": {},
"isComputeEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"created": true,
"rows": 123,
"stale": 123,
"indexing": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bot id
Integration id
Integration alias
Integration name
User Id
User Role
The table's name or unique identifier for targeting specific table operations.
Schema defining the structure of the table
Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed.
The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
1 <= x <= 30A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
Indicates if the table is enabled for computation.
The retrieved or created table object.
Show child attributes
Unique identifier for the table
Required. This name is used to identify your table.
1Show child attributes
List of keys/columns in the table.
Show child attributes
Show child attributes
string, number, boolean, object, array, null Show child attributes
[deprecated] ID of the column.
Indicates if the column is vectorized and searchable.
Indicates if the field is hidden in the UI
Order of the column in the UI
Width of the column in the UI
ID of the schema
Show child attributes
ai, code, workflow Prompt when action is "ai"
Code to execute when action is "code"
Model to use when action is "ai"
80ID of Workflow to execute when action is "workflow"
20TypeScript typings for the column. Recommended if the type is "object", ex: "{ foo: string; bar: number }"
date-time String properties must match this pattern
String properties must be one of these values
Additional properties can be provided, but they will be ignored if no column matches.
true, false object Array of required properties.
The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
1 <= x <= 30A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
Indicates if the table is enabled for computation.
Timestamp of table creation.
Timestamp of the last table update.
Flag indicating if the table was newly created.
The total number of rows present in the table.
The number of stale rows that are waiting to be processed
The number of rows that are waiting to be indexed (for search)
Was this page helpful?