API Reference
List database connectors
Returns a list of all database connectors owned by the authenticated user.
Authorizations:
Responses
Response samples
- 200
[- {
- "source_id": "string",
- "user_id": "string",
- "database_type": "string",
- "host": "string",
- "port": 0,
- "database": "string",
- "username": "string",
- "source_name": "string",
- "status": "string"
}
]
Create a database connector
Creates a new database connector for PostgreSQL or Redshift databases.
The connector will be tested during creation to ensure the credentials are valid.
Once created, the connector can be used as a data source for spaces and conversations.
Authorizations:
Request Body schema: application/jsonrequired
database_type required | string (Database Type) Type of database (postgres or redshift) |
host required | string (Host) Database host |
port required | integer (Port) Database port |
database required | string (Database) Database name |
username required | string (Username) Database username |
password required | string (Password) Database password |
Source Name (string) or Source Name (null) (Source Name) Optional name for the source |
Responses
Request samples
- Payload
{- "database_type": "postgres",
- "host": "db.example.com",
- "port": 5432,
- "database": "analytics",
- "username": "analyst",
- "password": "secret123",
- "source_name": "Production Analytics DB"
}
Response samples
- 200
- 422
{- "source_id": "src_123",
- "database_type": "postgres",
- "host": "db.example.com",
- "port": 5432,
- "database": "analytics",
- "username": "analyst",
- "source_name": "Production Analytics DB",
- "status": "READY"
}
Create a new space
Creates a new space from a data source with optional filters.
A space is a filtered view of a data source that can be shared with customers.
The space will be created with read-only access for the specified customer.
Authorizations:
Request Body schema: application/jsonrequired
source_id required | string (Source Id) ID of the data source to create space from |
name required | string (Name) Display name for the space |
customer_id required | string (Customer Id) ID of the customer to share this space with |
Filters (object) or Filters (null) (Filters) Optional filters to apply to the data source. Keys are column names. |
Responses
Request samples
- Payload
{- "source_id": "src_123",
- "name": "Active Users Dashboard",
- "customer_id": "cust_456",
- "filters": {
- "age": {
- "operator": "greater_than",
- "value": 18
}, - "category": {
- "operator": "in",
- "value": [
- "A",
- "B",
- "C"
]
}, - "status": {
- "operator": "equals",
- "value": "active"
}
}
}
Response samples
- 200
- 422
{- "space_id": "space_789",
- "source_id": "src_123",
- "name": "Active Users Dashboard",
- "partner_id": "partner_123",
- "customer_id": "cust_456",
- "filters": {
- "status": {
- "operator": "equals",
- "value": "active"
}, - "age": {
- "operator": "greater_than",
- "value": 18
}
}
}
List partner spaces
Lists all spaces owned by the authenticated partner.
Only includes spaces that have been shared with customers.
Returns the spaces along with their filter configurations.
Authorizations:
Responses
Response samples
- 200
[- {
- "space_id": "space_789",
- "source_id": "src_123",
- "name": "Active Users Dashboard",
- "partner_id": "partner_123",
- "customer_id": "cust_456",
- "filters": {
- "property1": {
- "operator": "equals",
- "value": "string"
}, - "property2": {
- "operator": "equals",
- "value": "string"
}
}
}
]
Generate embed token
Generates a JWT token for embedded authentication.
The token can be used to authenticate users in embedded contexts, such as
iframe integrations. If a user with the provided email doesn't exist,
a new user account will be created.
Authorizations:
Request Body schema: application/jsonrequired
Customer Id (string) or Customer Id (null) (Customer Id) Existing customer ID to associate with the user | |
email required | string (Email) Email address of the user to generate token for |
name required | string (Name) Full name of the user |
Space Id (string) or Space Id (null) (Space Id) ID of the embedded space the user is given access to |
Responses
Request samples
- Payload
{- "customer_id": "string",
- "email": "string",
- "name": "string",
- "space_id": "string"
}
Response samples
- 200
- 422
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
AI-powered chat interface for data analysis. Enables natural language interactions with your data sources, generates visualizations, and provides analytical insights. Each conversation maintains context and can perform multi-step analysis tasks.
Send Message
Authorizations:
path Parameters
conversation_id required | string (Conversation Id) |
Request Body schema: application/jsonrequired
text required | string (Text) |
Responses
Request samples
- Payload
{- "text": "string"
}
Response samples
- 200
- 422
{- "text": "string",
- "role": "user",
- "visualization": "string"
}
Get Messages
Authorizations:
path Parameters
conversation_id required | string (Conversation Id) |
query Parameters
limit | integer (Limit) Default: 100 |
Next Token (string) or Next Token (null) (Next Token) |
Responses
Response samples
- 200
- 422
{- "messages": [
- {
- "text": "string",
- "role": "user",
- "visualization": "string"
}
], - "next_token": "string"
}