Menjalankan kueri tanya jawab cerdas.
Deskripsi operasi
Note: Authorized users can query data as another user by passing the userId of the target user.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
quickbi-public:SmartqQueryAbility |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| UserId |
string |
No |
ID pengguna. Penting Jika Anda tidak menentukan parameter ini, data dikueri sebagai pemilik organisasi secara default. |
7c7223ae-****-3c744528014b |
| UserQuestion |
string |
Yes |
Pertanyaan dalam format teks. |
test |
| CubeId |
string |
No |
ID set data. Untuk mendapatkan ID, navigasi ke **Workbench** > **Set Data** di konsol Quick BI. Buka set data dan temukan `cubeId` di URL. Dalam skenario multi-tabel, parameter ini harus kosong. |
7c7223ae-****-3c744528014b |
| MultipleCubeIds |
string |
No |
Daftar ID set data. Model memilih satu atau beberapa tabel dari daftar untuk menghasilkan jawaban berdasarkan pertanyaan. Parameter ini wajib untuk skenario multi-tabel dan tidak digunakan untuk skenario tabel tunggal. |
7c7****-3c744528014b,a876asd***yhashd2 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The ID of the request. |
D787E1A3-A************2B05DF8D885 |
| Result |
object |
The returned result. |
|
| ChartType |
string |
The recommended chart type. |
NEW_TABLE |
| MetaType |
array<object> |
A list of column tuple types. |
|
|
object |
A metadata object. |
||
| Key |
string |
The name of the column tuple. |
Polar***STPS |
| Value |
string |
The type of the column tuple. |
string |
| Type |
string |
The type of the metadata. Valid values:
|
Dimension |
| Values |
array<object> |
An array of data value lists. |
|
|
object |
A data value list object. |
||
| Row |
array |
The data values in a row. |
|
|
string |
The data value of a field. |
199 |
|
| LogicSql |
string |
The visual logical SQL statement. |
select * **** |
| ConclusionText |
string |
The summary. |
test |
| DataList |
array |
The list of data that is returned only in multi-step scenarios. Each element corresponds to a set of chart data. |
|
|
string |
The chart data. |
test |
|
| Success |
boolean |
Indicates whether the request was successful. |
true |
Contoh
Respons sukses
JSONformat
{
"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
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | |
| 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. | |
| 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. | |
| 400 | UserRoleConfig.NotContain.Function | The user %s does not have permission to operate. | |
| 400 | RobotNl2sql.Moudle.NotPurchase | Please purchase Nl2sql module first. | |
| 500 | Invalid.User.Organization | The user is not in your organization. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.