小Q問數查詢。
介面說明
特別說明:當使用者被授權調用該 API 時,預設使用者有許可權通過傳入 userId 以該使用者身份查詢對應的資料
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
quickbi-public:SmartqQueryAbility |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| UserId |
string |
否 |
使用者識別碼。 重要 該欄位不填寫時預設以組織所有者身份查詢資料。 |
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. | 參數%s不可為空。 |
| 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. | 請先購買智能問數模組。 |
| 500 | Invalid.User.Organization | The user is not in your organization. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。