Query Profile Action

Request

  1. GET /rest/v1/query_profile/<query_id>

Description

The Query Profile Action is used to obtain the Query profile.

Path parameters

  • <query_id>

    Optional parameters. When not specified, the latest query list is returned. When specified, return the profile of the specified query.

Query parameters

Request body

Response

  • Not specify <query_id>

    1. GET /rest/v1/query_profile/
    2. {
    3. "msg": "success",
    4. "code": 0,
    5. "data": {
    6. "href_column": ["Query ID"],
    7. "column_names": ["Query ID", "User", "Default Db", "Sql Statement", "Query Type", "Start Time", "End Time", "Total", "Query State"],
    8. "rows": [{
    9. "User": "root",
    10. "__hrefPath": ["/query_profile/d73a8a0b004f4b2f-b4829306441913da"],
    11. "Query Type": "Query",
    12. "Total": "5ms",
    13. "Default Db": "default_cluster:db1",
    14. "Sql Statement": "select * from tbl1",
    15. "Query ID": "d73a8a0b004f4b2f-b4829306441913da",
    16. "Start Time": "2020-09-03 10:07:54",
    17. "Query State": "EOF",
    18. "End Time": "2020-09-03 10:07:54"
    19. }, {
    20. "User": "root",
    21. "__hrefPath": ["/query_profile/fd706dd066824c21-9d1a63af9f5cb50c"],
    22. "Query Type": "Query",
    23. "Total": "6ms",
    24. "Default Db": "default_cluster:db1",
    25. "Sql Statement": "select * from tbl1",
    26. "Query ID": "fd706dd066824c21-9d1a63af9f5cb50c",
    27. "Start Time": "2020-09-03 10:07:54",
    28. "Query State": "EOF",
    29. "End Time": "2020-09-03 10:07:54"
    30. }]
    31. },
    32. "count": 3
    33. }

    The returned result is the same as System Action, which is a table description.

  • Specify <query_id>

    1. GET /rest/v1/query_profile/<query_id>
    2. {
    3. "msg": "success",
    4. "code": 0,
    5. "data": "Query:</br>&nbsp;&nbsp;&nbsp;&nbsp;Summary:</br>...",
    6. "count": 0
    7. }

    data is the text content of the profile.