Query Detail Action

Request

GET /api/query_detail

Description

Used to obtain information about all queries after a specified time point

Path parameters

None

Query parameters

  • event_time

    At the specified time point (Unix timestamp, in milliseconds), obtain query information after that time point.

Request body

Response

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "query_details": [{
  6. "eventTime": 1596462699216,
  7. "queryId": "f732084bc8e74f39-8313581c9c3c0b58",
  8. "startTime": 1596462698969,
  9. "endTime": 1596462699216,
  10. "latency": 247,
  11. "state": "FINISHED",
  12. "database": "db1",
  13. "sql": "select * from tbl1"
  14. }, {
  15. "eventTime": 1596463013929,
  16. "queryId": "ed2d0d80855d47a5-8b518a0f1472f60c",
  17. "startTime": 1596463013913,
  18. "endTime": 1596463013929,
  19. "latency": 16,
  20. "state": "FINISHED",
  21. "database": "db1",
  22. "sql": "select k1 from tbl1"
  23. }]
  24. },
  25. "count": 0
  26. }

Examples

  1. Get query details after the specified time point.

    1. GET /api/query_detail?event_time=1596462079958
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "query_details": [{
    8. "eventTime": 1596462699216,
    9. "queryId": "f732084bc8e74f39-8313581c9c3c0b58",
    10. "startTime": 1596462698969,
    11. "endTime": 1596462699216,
    12. "latency": 247,
    13. "state": "FINISHED",
    14. "database": "db1",
    15. "sql": "select * from tbl1"
    16. }, {
    17. "eventTime": 1596463013929,
    18. "queryId": "ed2d0d80855d47a5-8b518a0f1472f60c",
    19. "startTime": 1596463013913,
    20. "endTime": 1596463013929,
    21. "latency": 16,
    22. "state": "FINISHED",
    23. "database": "db1",
    24. "sql": "select k1 from tbl1"
    25. }]
    26. },
    27. "count": 0
    28. }