Open API Overview
What Is This
The Open API lets you call Analytics Agent's data analysis capabilities through standard HTTP interfaces. You simply send a natural language question, and the system automatically handles data querying, metric calculation, knowledge retrieval, and visualization generation, returning structured analysis results.
In short: it turns Analytics Agent's conversational capabilities into a programmable interface.
Use Cases
| Use Case | Description |
|---|---|
| Embed in internal systems | Integrate data Q&A capabilities into your business systems. Users ask questions in natural language, and the backend calls the API asynchronously to retrieve and display analysis results. |
| Automated workflows | Connect the API to automated processes. Trigger data analysis on a schedule or by events, retrieve structured results, and let your system handle subsequent processing (e.g., generate reports, write to a database). |
| Custom application integration | Call the Agent's analysis capabilities from your own BI tools or data platforms to retrieve metric calculation results and SQL, which your application then renders and displays. |
What You Get
After calling the API, you receive the same analysis process and results as asking a question on the Analytics Agent page, including:
- Knowledge retrieval results — Business rules and definition entries returned by the Agent after consulting the knowledge base
- Metric calculation results — Semantic layer DSL (metricDsl) and physical layer DSL (physicalMetricDsl)
- SQL statements — Query SQL generated by the Agent (which you can execute in your system to retrieve data)
- Chart metadata — Chart type, column definitions, and corresponding SQL (your application must execute the SQL and render the chart)
- Analysis summary — A text summary in Markdown format with data interpretation
5-Minute Quick Start
For a complete end-to-end example, see → Quick Start
The core flow is just 4 steps:
Minimal code (Python):
API Interface List
| Interface | Description | Required |
|---|---|---|
| GenerateAuthToken | Obtain authentication Token | Yes |
| CreateSession | Create a conversation session | No (can reuse an existing sessionId) |
| Text2InsightQuery | Submit a data analysis request | Yes |
| SafeQuestionPoll | Poll for question results | Yes |
| Text2InsightStop | Stop a running analysis task | No |
More Guides
- Quick Start — Complete end-to-end code examples (curl + Python)
- Understanding Response Results — Message type descriptions, display recommendations, and real output examples
