API standards and SDKs in multiple languages
The OpenAPI of this product (DataAnalysisGBI/2024-08-23) uses the ROA signing style. We have encapsulated SDKs for common programming languages. You can download an SDK to call the OpenAPI of this product directly without dealing with technical details. If the existing SDKs do not meet your requirements, you can integrate with the API by using the signing mechanism to sign requests yourself. Self-signing details are complex and take approximately 5 business days. Therefore, we recommend joining our DingTalk service group (147535001692) and completing the signing integration under expert guidance.
Before you use the API, you must prepare an account and an AccessKey pair so that you can effectively access the API by using client tools such as SDKs and CLIs. For more information, see Create an AccessKey pair.
Custom signing scenarios
If your business scenario has special requirements and you need to integrate with the API by using self-signed requests, we recommend that you consult our technical support team first (DingTalk service group: 147535001692) for professional guidance to ensure efficient integration.
Account and security preparation
An Alibaba Cloud account has full administrative permissions on all resources. Once an AccessKey pair is leaked, all related resources are exposed to the risk of unauthorized access. To ensure security, we recommend that you create a RAM user that has only API access permissions, configure its AccessKey pair, and configure RAM policies based on the principle of least privilege (PoLP). Use the Alibaba Cloud account only in specific scenarios where its permissions are explicitly required.
Natural language data queries
API | Title | API overview |
|---|---|---|
| Execute SQL in the cloud | Execute SQL in the cloud | |
| RunDataAnalysis | Chat API | Xiyan provides an OpenAPI that delivers the same conversational experience as the official page. You only need to pass in information such as workspaceId and query to perform question answering and data analysis on the workspace you have created. This operation is suitable for the following scenarios: You have associated a data source in the Xiyan console, that is, Xiyan can access your database over the public network or a VPC and execute SQL. For specific usage, see the following best practices document: https://help.aliyun.com/en/model-studio/gbi-best-practices |
| Execute SQL locally | Execute SQL locally | |
| RunDataResultAnalysis | Analyze execution results | Analyzes execution results of the structured data type and generates visualization information. |
| RunSqlGeneration | Generate SQL | Generates SQL statements based on the current query information and the associated tables. This operation is suitable for the following scenarios: Your database is local and cannot be accessed by Xiyan. You can associate a virtual data source in Xiyan, call this operation to generate SQL, and then parse and execute the SQL yourself. For specific usage, see the following best practices document: https://help.aliyun.com/en/model-studio/xiyan-gbi-local-data-best-practices |
Business logic explanations
API | Title | API overview |
|---|---|---|
| UpdateBusinessLogic | Modify a business logic explanation | Modifies the specified business logic explanation in the currently specified workspace. |
| CreateBusinessLogic | Create a business logic explanation | Creates a new business logic explanation in the specified workspace. |
| ListBusinessLogic | List business logic explanations | Retrieves the list of enterprise knowledge term explanations in the currently specified workspace. |
| DeleteBusinessLogic | Delete a business logic explanation | Deletes the specified business logic explanation in the specified workspace. |
Synonym explanations
API | Title | API overview |
|---|---|---|
| CreateSynonyms | Create a synonym | Creates a synonym in the currently specified workspace. |
| ListSynonyms | List synonyms | Retrieves the list of synonyms in the currently specified workspace. |
| UpdateSynonyms | Modify a synonym | Modifies the specified synonym information in the current workspace. |
| BatchDeleteSynonyms | Batch delete synonyms | Batch deletes the synonyms in the currently specified workspace. |
Data source management
API | Title | API overview |
|---|---|---|
| CreateDatasourceAuthorization | Authorize a data source association | Creates a database association authorization. In the workspace you specify, it creates an association for the specified data source. After the association is created, the table schemas under the data source can be collected. |
| CancelDatasourceAuthorization | Revoke a data source association authorization | Revokes the authorization for the associated data source. |
| SyncRemoteTables | Synchronize tables from a data source | Updates the tables associated with the current workspace by synchronizing the latest tables from a remote data source (virtual data source) and associating them with the workspace you specify. |
| ListSelectedTables | Selected table collection | Retrieves the tables in the current workspace that are in the associated state. |
| UpdateTableInfo | Modify table information | Modifies the information about the currently specified table. |
| DeleteSelectedTable | Delete the selected table | Removes the currently specified table from the management of the specified workspace. |
| ResyncTable | Refresh the currently associated table | Refreshes the information about the currently associated table from the remote database. |
| ListColumn | Columns in a table | Retrieves the column information under the specified table in the currently specified workspace. |
| UpdateColumn | Modify column information | Modifies the information about the specified column in the currently specified workspace. |
| RecoverColumn | Restore column information | Restores the columns of the specified table to the state at the initial association. |
| DeleteColumn | Delete a column in a table | Deletes the specified column from the currently specified workspace. |
| ListEnumMapping | List enumerated value mappings | Retrieves the enumerated values under the specified table and column in the current workspace. |
| UpdateEnumMapping | Modify enumerated value mappings | Modifies the enumerated value information under the specified column in the currently specified workspace. |
Virtual data sources
API | Title | API overview |
|---|---|---|
| CreateVirtualDatasourceInstance | Create a virtual data source instance | Creates a virtual data source instance in the workspace you specify. A virtual data source instance represents a virtual database. You can add DDL statements to the virtual data source to build your virtual database and tables. |
| ListVirtualDatasourceInstance | List virtual data source instances | Retrieves the list of data source instances in the current workspace. |
| UpdateVirtualDatasourceInstance | Modify virtual data source instance information | Modifies the information about the specified virtual data source in the specified workspace. |
| DeleteVirtualDatasourceInstance | Delete a virtual data source instance | Deletes the virtual data source instance in the specified workspace. |
| SaveVirtualDatasourceDdl | Add DDL statements to a virtual data source | Adds DDL statements to the specified virtual data source instance in the currently specified workspace. The Xiyan GBI cloud service parses your DDL statements into the related table schema information and maintains it. |