获取历史SQL查询列表-ListSQLQueries

获取用户提交过的历史SQL查询的列表

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID,不填则为默认项目No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
RequeststringAPI请求IDNo
TotalCountint历史SQL查询总数No
QueriesarraySQL查询集合No

QuerySummary

Parameter nameTypeDescriptionRequired
QueryIdstring查询IDNo
QueryTypestring查询类型No
QueryStringstring查询语句No
Statestring查询状态No
ScannedBytesint扫描字节数量No
ErrorMessagestring错误信息No
ElapsedTimeMillisint查询耗时, 单位::毫秒No
StartTimeint查询启动时间No
EndTimeint查询结束时间No

Request Example

https://api.ucloud.cn/?Action=ListSQLQueries
&Region=cn-bj
&ProjectId=apUufFKW

Response Example

{
    "RetCode": 0,
    "Action": "ListSQLQueriesResponse",
    "Request": "c1ce7672-ffa9-4d70-b35c-ba53d066f9ce",
    "TotalCount": 124,
    "Queries": [
        {
            "QueryId": "20180821_120614_00000_a2t8n",
            "State": "FAILED",
            "ScannedBytes": 0,
            "ErrorMessage": "line 1:16: Catalog hive-hadoop2 does not exist",
            "StartTime": "2018-08-21T12:06:14.000+0000",
            "EndTime": "2018-08-21T12:06:16.000+0000"
        },
        {
            "QueryId": "20180830_133406_00000_223ex",
            "State": "FAILED",
            "ScannedBytes": 0,
            "ErrorMessage": "line 1:15: Catalog hive-hadoop2 does not exist",
            "StartTime": "2018-08-30T13:34:06.000+0000",
            "EndTime": "2018-08-30T13:34:07.000+0000"
        }
    ]
}