Monitoring

Monitoring

Query API

HTTP REQUEST: GET

Get a list of queries for the purpose of monitoring query volume and performance. The result set size is limited to the minimum of maxInboundQueries or the global system limit. See the Query Monitoring documentation for a detailed description of the response fields.

GET/monitoring/queries/orgId/{orgId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID (UUID) for which you are querying. (Required)
QUERY PARAMETERS
NameTypeDescription
queryStartTimeFromstringReturn records with query start time timestamps greater or equal to this value. (Required) Example value: 2018-12-06T22:48:29.698Z
queryStartTimeTostringReturn records with query start time timestamps less than this value. If missing, no less-than constraint is applied to the query start time. (Optional) Example value: 2018-12-06T22:48:29.698Z
maxInboundQueriesintegerThe response record limit (in-bound queries). The actual number of returned records is the minimum of this value and the system max limit. (Required)
includeQueryTextbooleanIf true return the query text in the API response. If False, the query text is omitted. Default is False. (Optional)
RESPONSES
CodeDescription
200Success.
400Invalid request for example: Invalid parameters, missing parameters.
401Unauthorized. This error will occur if calling user does not have access right for the API.
405Method Not allowed. Only GET requests are supported.
408Request Timeout. If the response takes more than 30 seconds, then the request is timed out.
429Too Many Requests. Returned if the client exceeds the request rate limit.
500A server error occurred. Check the logs for more details.
200 Response Body
{
  "status": {
    "code": 0,
    "message": "200 OK"
  },
  "responseCreated": "2019-02-01T00:58:42.005Z",
  "response": {
    "type": "query_api_lookup_wrapper",
    "data": [
      {
        "type": "query_execution_info",
        "query_id": "5ee15f00-8741-43f8-98e8-9f0ef2cf5306",
        "org_id": "default",
        "project_id": "a74120f8-37c0-44dd-416a-d24a1a5d3a2a",
        "project_name": "Sales Insights",
        "cube_id": "b89a2fb7-74f4-4828-706e-70f7186e10a0",
        "cube_name": "Internet Sales Cube",
        "received_time": "2019-01-31T23:50:59.081Z",
        "started_planning": "2019-01-31T23:50:59.155Z",
        "finished_planning": "2019-01-31T23:50:59.268Z",
        "query_finished": "2019-01-31T23:51:09.834Z",
        "subqueries": [
          {
            "type": "subquery_execution_info",
            "query_id": "f126124e-175b-4a07-bd86-7dace65c74c8",
            "query_text": "SELECT\n   as_agg_4026f721_no_t11.key_c1 key_c1,\n   as_agg_4026f721_no_t11.calculatedtax1_c2 calculatedtax1_c2,\n   as_agg_4026f721_no_t11.calculatedtax1_c3 calculatedtax1_c3,\n   as_agg_4026f721_no_t11.calculatedtax1_c4 calculatedtax1_c4,\n   as_agg_4026f721_no_t11.orderquantity1_c5 orderquantity1_c5,\n   as_agg_4026f721_no_t11.orderquantity1_c6 orderquantity1_c6,\n   as_agg_4026f721_no_t11.orderquantity1_c7 orderquantity1_c7,\n   as_agg_4026f721_no_t11.salesamount1_c8 salesamount1_c8,\n   as_agg_4026f721_no_t11.salesamount1_c9 salesamount1_c9,\n   as_agg_4026f721_no_t11.salesamount1_c10 salesamount1_c10\nFROM\n   atscaleagg.as_agg_4026f721_none as_agg_4026f721_no_t11",
            "succeeded": true,
            "started": "2019-01-31T23:51:04.237Z",
            "subquery_fetch_start": "2019-01-31T23:51:09.828Z",
            "finished": "2019-01-31T23:51:09.828Z",
            "dialect": "Impala-2.12",
            "used_local_cache": false,
            "is_canary": false,
            "extra_props": {},
            "subquery_wait_duration": 4.969,
            "subquery_exec_duration": 5.591,
            "subquery_fetch_results_duration": 0,
            "subquery_wall_duration": 10.56,
            "subquery_wall_running_duration": 10.56
          }
        ],
        "succeeded": true,
        "aggregate_definition_ids": [
          "717cbe19-9e61-4f0a-936d-fd08cbd998cd"
        ],
        "aggregate_instance_table_names": [
          "as_agg_4026f721_none"
        ],
        "query_language": "none",
        "subqueries_results_processing_duration": 10.56,
        "query_wall_duration": 10.753,
        "query_pre_planning_duration": 0.07400000000000001,
        "query_planning_duration": 0.113,
        "subqueries_wall_duration": 0.006,
        "subqueries_wall_running_duration": 10.56,
        "subqueries_first_wait_duration": 4.969,
        "query_wall_running_duration": 10.753
      }
    ],
    "result_set_limit": 500
  }
}