Package com.xebialabs.xlrelease.api.v1
Interface Nl2SqlApi
- All Superinterfaces:
ApiService
@Path("/api/v1/nl2sql")
@Produces("application/json")
@Consumes("application/json")
public interface Nl2SqlApi
extends ApiService
NL-to-SQL pipeline: schema classification and semantic-model-driven query execution.
-
Field Summary
FieldsFields inherited from interface com.xebialabs.xlrelease.api.ApiService
DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA -
Method Summary
Modifier and TypeMethodDescriptionexecute(Nl2SqlExecuteRequest request) Compile a semantic model into parameterized SQL and execute it against the target database.health()Health check.schema(Nl2SqlSchemaRequest request) Classify a natural-language query to identify the domain, required scope, and matching database schema.default String
-
Field Details
-
SERVICE_NAME
- See Also:
-
-
Method Details
-
serviceName
- Specified by:
serviceNamein interfaceApiService
-
schema
Classify a natural-language query to identify the domain, required scope, and matching database schema. This is a lightweight, keyword-based step — no LLM call is made. ]- Parameters:
request- the schema request containing the query and required scope- Returns:
- the matched domain, scope, confidence, and full schema definition
-
execute
Compile a semantic model into parameterized SQL and execute it against the target database. Expects a structured semantic model (filters, columns, aggregation, ordering) — not free text.- Parameters:
request- the execute request containing domain, scope, and semantic model- Returns:
- the query result with columns, rows, and metadata
-
health
Health check.- Returns:
- status map
-