- create - CreateConnector
- delete - DeleteConnector
- duplicate_connector - DuplicateConnector
- execute_query - ExecuteQuery
- get - GetConnector
- get_connector_cell_durations - GetConnectorCellDurations
- get_chats - GetConnectorChats
- get_dashboards - GetConnectorDashboards
- get_connector_stats - GetConnectorStats
- get_usage - GetConnectorUsage
- get_connectors - GetConnectors
- get_example_queries - GetExampleQueries
- get_table_preview - GetTablePreview
- list_tables - ListConnectorTables
- list_query_templates - ListQueryTemplates
- test - TestConnector
- update - UpdateConnector
CreateConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.create()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
config |
Optional[models.TextqlRPCPublicConnectorConnectorConfig] | ➖ | N/A |
allow_sql_write_operations |
OptionalNullable[bool] | ➖ | N/A |
include_db_session_metadata |
OptionalNullable[bool] | ➖ | N/A |
access |
Optional[models.TextqlRPCPublicConnectorConnectorAccessConfig] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceCreateConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
DeleteConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.delete()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceDeleteConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
DuplicateConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.duplicate_connector()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceDuplicateConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ExecuteQuery
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.execute_query()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
query |
Optional[str] | ➖ | N/A |
limit |
OptionalNullable[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceExecuteQueryResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectorCellDurations
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_connector_cell_durations()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
days |
Optional[int] | ➖ | N/A |
limit |
Optional[int] | ➖ | N/A |
offset |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorCellDurationsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectorChats
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_chats()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorChatsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectorDashboards
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_dashboards()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorDashboardsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectorStats
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_connector_stats()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
days |
Optional[int] | ➖ | 0 = all-time |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorStatsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectorUsage
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_usage()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
days |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorUsageResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetConnectors
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_connectors(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicConnectorGetConnectorsRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetConnectorsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetExampleQueries
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_example_queries()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_contexts |
List[models.TextqlRPCPublicConnectorConnectorContext] | ➖ | N/A |
feature_filter |
Optional[models.TextqlRPCPublicConnectorFeatureType] | ➖ | Feature types for nudge queries - identifies which feature a query promotes |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetExampleQueriesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetTablePreview
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.get_table_preview()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
table_database |
Optional[str] | ➖ | N/A |
table_schema |
Optional[str] | ➖ | N/A |
table_name |
Optional[str] | ➖ | N/A |
limit |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceGetTablePreviewResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListConnectorTables
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.list_tables()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceListConnectorTablesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ListQueryTemplates
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.list_query_templates()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
limit |
Optional[int] | ➖ | N/A |
offset |
Optional[int] | ➖ | N/A |
days |
Optional[int] | ➖ | Optional lookback window in days; 0 or unset means all-time. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceListQueryTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
TestConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.test()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
config |
Optional[models.TextqlRPCPublicConnectorConnectorConfig] | ➖ | N/A |
connector_id |
OptionalNullable[str] | ➖ | Optional: If provided, confidential fields will be preserved from the existing connector when the corresponding field in config is empty. This allows testing updates without requiring the user to re-enter credentials. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceTestConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
UpdateConnector
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.connectors.update()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
config |
Optional[models.TextqlRPCPublicConnectorConnectorConfig] | ➖ | N/A |
allow_sql_write_operations |
OptionalNullable[bool] | ➖ | N/A |
include_db_session_metadata |
OptionalNullable[bool] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ConnectorServiceUpdateConnectorResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |