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.

    • Start date: The start_date parameter is optional and should be specified in UTC. It is expected in the format YYYY-MM-DD HH:MM:SS (e.g., 2024-05-03 18:30:30). If not specified, the latest 100 records will be fetched by default.

    • End date: The end_date parameter is optional and should be specified in UTC. It is expected in the format YYYY-MM-DD HH:MM:SS (e.g., 2024-05-03 18:30:30). If not specified, the current time will be used as the end time.

"https://<subdomain>.e6data.com/endpoints/v1/query-history/get-query-count/?from_date=<START_DATE>&to_date=<END_DATE>
  • 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 -

  • Workspace name

  • Run by

  • Cluster name

{
    "workspace_name":<WORKSPACE_NAME>,
    "run_by":"<USER_EMAIL_ID>",
    "cluster_name":[<CLUSTER_NAME1>,<CLUSTER_NAME2>]
}

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