The API provides a range of endpoints for interacting with different services within the KAI platform. Below is a comprehensive list of available endpoints categorized by their functionality.
- Create Database Connection
- Endpoint:
POST /api/v1/database-connections - Description: Creates a new database connection.
- Endpoint:
- List Database Connections
- Endpoint:
GET /api/v1/database-connections - Description: Retrieves a list of all database connections.
- Endpoint:
- Update Database Connection
- Endpoint:
PUT /api/v1/database-connections/{db_connection_id} - Description: Updates a specific database connection.
- Endpoint:
- Sync Schemas
- Endpoint:
POST /api/v1/table-descriptions/sync-schemas - Description: Scans and synchronizes database schemas.
- Endpoint:
- Refresh Table Description
- Endpoint:
POST /api/v1/table-descriptions/refresh - Description: Refreshes table descriptions for a specified database connection.
- Endpoint:
- Update Table Description
- Endpoint:
PUT /api/v1/table-descriptions/{table_description_id} - Description: Updates a specific table description.
- Endpoint:
- List Table Descriptions
- Endpoint:
GET /api/v1/table-descriptions - Description: Lists all table descriptions.
- Endpoint:
- Get Table Description
- Endpoint:
GET /api/v1/table-descriptions/{table_description_id} - Description: Retrieves detailed information about a specific table description.
- Endpoint:
- Create Instruction
- Endpoint:
POST /api/v1/instructions - Description: Creates a new instruction.
- Endpoint:
- Get Instructions
- Endpoint:
GET /api/v1/instructions - Description: Retrieves a list of all instructions.
- Endpoint:
- Get Instruction
- Endpoint:
GET /api/v1/instructions/{instruction_id} - Description: Retrieves a specific instruction by its ID.
- Endpoint:
- Update Instruction
- Endpoint:
PUT /api/v1/instructions/{instruction_id} - Description: Updates a specific instruction.
- Endpoint:
- Delete Instruction
- Endpoint:
DELETE /api/v1/instructions/{instruction_id} - Description: Deletes a specific instruction.
- Endpoint:
- Create Context Store
- Endpoint:
POST /api/v1/context-stores - Description: Creates a new context store.
- Endpoint:
- Get Context Stores
- Endpoint:
GET /api/v1/context-stores - Description: Retrieves a list of all context stores.
- Endpoint:
- Get Context Store
- Endpoint:
GET /api/v1/context-stores/{context_store_id} - Description: Retrieves a specific context store by its ID.
- Endpoint:
- Delete Context Store
- Endpoint:
DELETE /api/v1/context-stores/{context_store_id} - Description: Deletes a specific context store.
- Endpoint:
- Create Business Glossary
- Endpoint:
POST /api/v1/business_glossaries - Description: Creates a new business glossary.
- Endpoint:
- Get Business Glossaries
- Endpoint:
GET /api/v1/business_glossaries - Description: Retrieves a list of all business glossaries.
- Endpoint:
- Get Business Glossary
- Endpoint:
GET /api/v1/business_glossaries/{business_glossary_id} - Description: Retrieves a specific business glossary by its ID.
- Endpoint:
- Update Business Glossary
- Endpoint:
PUT /api/v1/business_glossaries/{business_glossary_id} - Description: Updates a specific business glossary.
- Endpoint:
- Delete Business Glossary
- Endpoint:
DELETE /api/v1/business_glossaries/{business_glossary_id} - Description: Deletes a specific business glossary.
- Endpoint:
- Create Prompt
- Endpoint:
POST /api/v1/prompts - Description: Creates a new prompt.
- Endpoint:
- Get Prompt
- Endpoint:
GET /api/v1/prompts/{prompt_id} - Description: Retrieves a specific prompt by its ID.
- Endpoint:
- Get Prompts
- Endpoint:
GET /api/v1/prompts - Description: Retrieves a list of all prompts.
- Endpoint:
- Update Prompt
- Endpoint:
PUT /api/v1/prompts/{prompt_id} - Description: Updates a specific prompt.
- Endpoint:
- Create SQL Generation
- Endpoint:
POST /api/v1/prompts/{prompt_id}/sql-generations - Description: Creates a new SQL generation for a given prompt.
- Endpoint:
- Create Prompt and SQL Generation
- Endpoint:
POST /api/v1/prompts/sql-generations - Description: Creates both a prompt and a SQL generation.
- Endpoint:
- Get SQL Generations
- Endpoint:
GET /api/v1/sql-generations - Description: Retrieves a list of all SQL generations.
- Endpoint:
- Get SQL Generation
- Endpoint:
GET /api/v1/sql-generations/{sql_generation_id} - Description: Retrieves a specific SQL generation by its ID.
- Endpoint:
- Update SQL Generation
- Endpoint:
PUT /api/v1/sql-generations/{sql_generation_id} - Description: Updates a specific SQL generation.
- Endpoint:
- Execute SQL Query
- Endpoint:
GET /api/v1/sql-generations/{sql_generation_id}/execute - Description: Executes the SQL query of a specific SQL generation.
- Endpoint:
- Create NL Generation
- Endpoint:
POST /api/v1/sql-generations/{sql_generation_id}/nl-generations - Description: Creates a new NL generation for a given SQL generation.
- Endpoint:
- Create SQL and NL Generation
- Endpoint:
POST /api/v1/prompts/{prompt_id}/sql-generations/nl-generations - Description: Creates both SQL and NL generations for a given prompt.
- Endpoint:
- Create Prompt, SQL, and NL Generation
- Endpoint:
POST /api/v1/prompts/sql-generations/nl-generations - Description: Creates a prompt, SQL generation, and NL generation all at once.
- Endpoint:
- Get NL Generations
- Endpoint:
GET /api/v1/nl-generations - Description: Retrieves a list of all NL generations.
- Endpoint:
- Get NL Generation
- Endpoint:
GET /api/v1/nl-generations/{nl_generation_id} - Description: Retrieves a specific NL generation by its ID.
- Endpoint:
- Update NL Generation
- Endpoint:
PUT /api/v1/nl-generations/{nl_generation_id} - Description: Updates a specific NL generation.
- Endpoint: