Databases
The databases this agent answers from.
Base URL https://futuresmart.ai/database-agent/api · every request sends X-API-Key. Samples read the key from DATABASE_AGENT_API_KEY. All endpoints
List Databases
/v1/agents/{agent_id}/databasesCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string |
Other responses
422Validation Error
Add Database
/v1/agents/{agent_id}/databasesCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
db_hostrequired | string | Database host address |
db_namerequired | string | Database name |
db_userrequired | string | Database username |
db_passwordrequired | string | Database password |
db_port | integer | null | Database port (default: the engine's — 3306 MySQL, 5432 PostgreSQL) |
db_engine | string | Database engine (mysql, postgresql) |
description | string | null | Routing description (optional — blank → auto-generate) |
Other responses
422Validation Error
Example request body
{
"db_host": "<db_host>",
"db_name": "<db_name>",
"db_user": "<db_user>",
"db_password": "<db_password>",
"db_engine": "mysql"
}Check Databases
/v1/agents/{agent_id}/databases/checkHealth-check every DB (connection status + response time + description status).
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string |
Other responses
422Validation Error
Bulk Import
/v1/agents/{agent_id}/databases/bulkCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string |
Request body · multipart/form-data
| Name | Type | Description |
|---|---|---|
filerequired | string |
Other responses
422Validation Error
Bulk Delete
/v1/agents/{agent_id}/databases/bulk-deleteDelete multiple databases (and their scoped metadata) in a single action. Body: {"db_ids": ["DB_...", "DB_..."]}. Best-effort per DB; returns per-DB results + a summary.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string |
Request body · application/json
| Name | Type | Description |
|---|---|---|
db_idsrequired | array<string> | Database IDs to delete |
Other responses
422Validation Error
Example request body
{
"db_ids": [
"DB_3F9A1C2B",
"DB_5C1E9A22"
]
}Generate Description
/v1/agents/{agent_id}/databases/{db_id}/description/generateCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Other responses
422Validation Error
Poll Description
/v1/agents/{agent_id}/databases/{db_id}/description/generate/{job_id}Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string | |
job_idrequired | string |
Other responses
422Validation Error
Get Database
/v1/agents/{agent_id}/databases/{db_id}Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Other responses
422Validation Error
Update Database
/v1/agents/{agent_id}/databases/{db_id}Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
db_host | string | null | |
db_name | string | null | |
db_user | string | null | |
db_password | string | null | |
db_port | integer | null | |
db_engine | string | null | |
description | string | null |
Other responses
422Validation Error
Example request body
{}Delete Database
/v1/agents/{agent_id}/databases/{db_id}Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Other responses
422Validation Error
Update Database Status
/v1/agents/{agent_id}/databases/{db_id}/statusCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
is_activerequired | boolean | Enable (true) or disable (false) the database |
Other responses
422Validation Error
Example request body
{
"is_active": false
}Update Database Description
/v1/agents/{agent_id}/databases/{db_id}/descriptionCredential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | |
db_idrequired | string |
Request body · application/json (optional)
| Name | Type | Description |
|---|---|---|
descriptionrequired | string | Routing description |
Other responses
422Validation Error
Example request body
{
"description": "<description>"
}