小Q問數查詢。
介面說明
特別說明:當使用者被授權呼叫該 API 時,預設使用者有權限透過傳入 userId 以該使用者身份查詢對應的資料。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
quickbi-public:SmartqQueryAbility |
get |
*全部資源。
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| UserId |
string |
否 |
使用者 ID。 重要 該欄位未填寫時,預設以組織擁有者身份查詢資料。 |
7c7223ae-****-3c744528014b |
| UserQuestion |
string |
是 |
問題文字。 |
test |
| CubeId |
string |
否 |
資料集 ID, 點擊工作台 --> 資料集,開啟選定的資料集後,URL 中會帶有該資料集的 cubeId 資訊。 在多表情境下,此參數必須為空。 |
7c7223ae-****-3c744528014b |
| MultipleCubeIds |
string |
否 |
多資料集 ID 清單。 模型會根據問題內容,從清單中選擇一張或多張表來產生回答;在多表情境下此參數為必要,單表情境則不需要此參數。 |
7c7****-3c744528014b,a876asd***yhashd2 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
D787E1A3-A************2B05DF8D885 |
| Result |
object |
回傳結果。 |
|
| ChartType |
string |
建議圖表類型。 |
NEW_TABLE |
| MetaType |
array<object> |
欄位元組類型清單。 |
|
|
object |
中繼資料物件。 |
||
| Key |
string |
欄位元組名稱。 |
Polar***STPS |
| Value |
string |
欄位元組類型。 |
string |
| Type |
string |
中繼資料欄列類型。
|
Dimension |
| Values |
array<object> |
資料值清單陣列。 |
|
|
object |
資料值清單物件。 |
||
| Row |
array |
每一列的資料值。 |
|
|
string |
每個欄位的資料值。 |
199 |
|
| LogicSql |
string |
視覺化邏輯 SQL。 |
select * **** |
| ConclusionText |
string |
總結資訊。 |
test |
| DataList |
array |
僅在多步驟情境下回傳資料清單,每一個元素對應一份圖表資料。 |
|
|
string |
圖表資料。 |
test |
|
| Success |
boolean |
是否成功。 |
true |
樣本
正常返回樣本
JSON格式
{
"RequestId": "D787E1A3-A************2B05DF8D885",
"Result": {
"ChartType": "NEW_TABLE",
"MetaType": [
{
"Key": "Polar***STPS",
"Value": "string",
"Type": "Dimension"
}
],
"Values": [
{
"Row": [
"199"
]
}
],
"LogicSql": "select * ****",
"ConclusionText": "test",
"DataList": [
"test"
]
},
"Success": true
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | 系統內部異常。 |
| 400 | Query.Auth.Error | Query is not permitted. | 沒有查詢權限。 |
| 400 | Instance.Expired | Your instance has expired. | 您的購買執行個體已經過期。 |
| 400 | Instance.Not.Exist | The specified instance does not exist. | 暫未匹配到您的購買執行個體。 |
| 400 | Invalid.Organization | The specified organizational unit does not exist. | 該組織不存在。 |
| 400 | User.Not.In.Organization | The specified user is not in the organizational unit. | 該使用者不在組織中。 |
| 400 | Invalid.Parameter | An error occurred while verifying parameters. | 參數驗證失敗。 |
| 400 | Invalid.Parameter.Error | The parameter is invalid:%s. | 無效參數 %s。 |
| 400 | Invalid.Param.Error | The parameter is invalid. | 無效參數。 |
| 400 | Invalid.User.Admin | You are not an administrator of this organization. | 沒有權限,您不是組織管理員。 |
| 400 | System.Param.Empty | You must specify the %s parameter. | |
| 400 | Access.Forbidden | Your instance version or access key is not allowed to call the API operation, only professional version supports calling. | 您的執行個體版本或 AccessKey 不允許呼叫此 API,僅專業版支援呼叫。 |
| 400 | UserInfo.Error | The personal information is invalid. | 個人資訊不合法。 |
| 400 | ApiUser.Not.Exists | The specified user does not exist. | 使用者不存在。 |
| 400 | User.Not.WorkspaceAdmin | Only administrators of the group workspace can perform this operation. | 沒有權限,您不是該群組空間的管理員。 |
| 400 | Application.Object.NotExist | The object you are operating does not exist or has been deleted. | 操作元件不存在或已被刪除。 |
| 400 | Not.ApiCall.AuthUser | You are not an administrator or API call auth user of this organization. | 非組織管理員或 API 呼叫授權使用者。 |
| 400 | UserRoleConfig.NotContain.Function | The user %s does not have permission to operate. | 此使用者 %s 沒有操作權限。 |
| 400 | RobotNl2sql.Moudle.NotPurchase | Please purchase Nl2sql module first. | 請先購買智慧問數模組。 |
| 400 | LlmCopilotQuestion.NotRelatedData.Error | The question you raised is not related to data queries, or the relevant field information could not be found in the dataset. Please try again. | 您提出的問題不是關於資料查詢的問題,或者在資料集中未能找到相關欄位的資訊,請您重新嘗試。 |
| 500 | Invalid.User.Organization | The user is not in your organization. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。