Query Count API

This reference contains information about the e6data application programming interfaces (APIs) for the query history component which provides query count in the response payload. These response payloads are typically in JSON format.

Prerequisites

  • Query Count endpoint: The subdomain would have been provided during the signup

"https://<subdomain>.e6data.com/endpoints/v1/query-history/get-query-count/"
  • Authorization through Access Token: The header needs to be passed for authorization purposes in the below JSON format. Refer to the documentation for Access Token.

{"Authorization": "Bearer <ACCESS_TOKEN>"}

Components Required

e6data API calls typically include the following components:

Payload

The request body needs to be passed to identify query history and query count. Query count can be filtered based on -

  • Query ID

  • Query Status

  • Cluster name

  • Query Hash

{
    "workspace_name":<WORKSPACE_NAME>,
    "start_time": <START_TIME>,
    "end_time":<END_TIME>,
    "run_by":"<USER_EMAIL_ID>",
    "extra_filters": {"query_id":[<QUERY_ID1>,<QUERY_ID2>],
    "status_msg":[<STATUS_MSG1>,<STATUS_MSG2>],
    "cluster_name":[<CLUSTER_NAME1>,<CLUSTER_NAME2>],
    "query_hash":[<QUERY_HASH1>]
    }
}

Response

Here is a response payload example -

{
    "result": [
        {
            "status": "Success",
            "count": 17235
        },
        {
            "status": "Failed",
            "count": 54476
        },
        {
            "status": "Cancelled",
            "count": 0
        },
        {
            "status": "Timedout",
            "count": 0
        },
        {
            "status": "Parsing failed",
            "count": 1
        },
        {
            "status": "Executing",
            "count": 1
        },
        {
            "status": "Planning",
            "count": 0
        },
        {
            "status": "Queued",
            "count": 0
        }
    ]
}

Last updated