Qyra
Referencev2

List my query history

Lists the requesting user's own query history for a project, newest first, with per-trigger and per-window counts. Must stay declared before `getAsyncQueryResults` so the generated `/history` route is matched before `/{queryUuid}`.

GET/api/v2/projects/{projectUuid}/query/history

Lists the requesting user's own query history for a project, newest first, with per-trigger and per-window counts.

Must stay declared before getAsyncQueryResults so the generated /history route is matched before /{queryUuid}.

Authentication: personal access token. The spec defines an api_key security scheme — send an Authorization: ApiKey <your-personal-access-token> header (value format: ApiKey <your key>). A session_cookie scheme (connect.sid) exists for browser sessions. Operations in this spec declare security: [], an artifact of the upstream spec generator — authentication is still enforced by the server.

Path parameters

NameTypeRequiredDescription
projectUuidstringYes

Query parameters

NameTypeRequiredDescription
pagenumberNoPage number for pagination (starts at 1)
pageSizenumberNoNumber of results per page (default: 25, max: 100)
triggerstringNoFilter by what triggered the run
languagestringNoFilter by query language
statusarray[string]NoFilter by one or more statuses
searchstringNoMatches explore name, chart/dashboard name, fields and SQL
windowstringNoRestrict rows to one disjoint time window
sortBystringNoSort order; runtime flattens the windows into one sorted list

Responses

200 — Success

{
  "results": {
    "counts": {
      "warehouseTimeMsLast7Days": 0,
      "total": 0,
      "windows": {
        "lastFewMinutes": 0,
        "lastHour": 0,
        "last24Hours": 0,
        "last7Days": 0,
        "last30Days": 0
      },
      "triggers": {
        "interactive": 0,
        "apps": 0,
        "scheduled": 0
      }
    },
    "pagination": {
      "page": 0,
      "pageSize": 0,
      "totalResults": 0,
      "totalPageCount": 0
    },
    "data": [
      {
        "erroredAt": "2024-01-01T00:00:00.000Z",
        "resultsUpdatedAt": "2024-01-01T00:00:00.000Z",
        "processingStartedAt": "2024-01-01T00:00:00.000Z",
        "resultsExpiresAt": "2024-01-01T00:00:00.000Z",
        "cacheHit": true,
        "warehouseExecutionTimeMs": 0,
        "totalRowCount": 0,
        "compiledSql": "string",
        "dashboardUuid": "string",
        "dashboardName": "string",
        "savedSqlUuid": "string",
        "chartUuid": "string",
        "chartName": "string",
        "requestParameters": {
          "parameters": {
            "property": "string"
          },
          "usePreAggregateCache": true,
          "invalidateCache": true,
          "context": "dashboardView",
          "dashboardFilters": {
            "tableCalculations": [
              {
                "includeNull": true,
                "values": [
                  "string"
                ],
                "operator": "isNull",
                "id": "string",
                "target": {
                  "fallbackType": "string",
                  "isSqlColumn": true,
                  "tableName": "string",
                  "fieldId": "string"
                },
                "settings": "string",
                "disabled": true,
                "required": true,
                "caseSensitive": true,
                "lockedTabUuids": [
                  "string"
                ],
                "requiredGroupId": "string",
                "singleValue": true,
                "label": "string",
                "tileTargets": {
                  "property": {
                    "fallbackType": "string",
                    "isSqlColumn": true,
                    "tableName": "string",
                    "fieldId": "string"
                  }
                }
              }
            ],
            "metrics": [
              {
                "includeNull": true,
                "values": [
                  "string"
                ],
                "operator": "isNull",
                "id": "string",
                "target": {
                  "fallbackType": "string",
                  "isSqlColumn": true,
                  "tableName": "string",
                  "fieldId": "string"
                },
                "settings": "string",
                "disabled": true,
                "required": true,
                "caseSensitive": true,
                "lockedTabUuids": [
                  "string"
                ],
                "requiredGroupId": "string",
                "singleValue": true,
                "label": "string",
                "tileTargets": {
                  "property": {
                    "fallbackType": "string",
                    "isSqlColumn": true,
                    "tableName": "string",
                    "fieldId": "string"
                  }
                }
              }
            ],
            "dimensions": [
              {
                "includeNull": true,
                "values": [
                  "string"
                ],
                "operator": "isNull",
                "id": "string",
                "target": {
                  "fallbackType": "string",
                  "isSqlColumn": true,
                  "tableName": "string",
                  "fieldId": "string"
                },
                "settings": "string",
                "disabled": true,
                "required": true,
                "caseSensitive": true,
                "lockedTabUuids": [
                  "string"
                ],
                "requiredGroupId": "string",
                "singleValue": true,
                "label": "string",
                "tileTargets": {
                  "property": {
                    "fallbackType": "string",
                    "isSqlColumn": true,
                    "tableName": "string",
                    "fieldId": "string"
                  }
                }
              }
            ]
          },
          "pivotConfiguration": {
            "pivotColumnsOrder": [
              {
                "reference": "string"
              }
            ],
            "passthroughDimensions": [
              {
                "reference": "string"
              }
            ],
            "sortOnlyDimensions": [
              {
                "reference": "string"
              }
            ],
            "sortOnlyColumns": [
              {
                "aggregation": "sum",
                "reference": "string"
              }
            ],
            "metricsAsRows": true,
            "sortBy": [
              {
                "pivotValues": [
                  {
                    "value": "string",
                    "reference": "string"
                  }
                ],
                "nullsFirst": true,
                "direction": "ASC",
                "reference": "string"
              }
            ],
            "groupByColumns": [
              {
                "reference": "string"
              }
            ],
            "valuesColumns": [
              {
                "aggregation": "sum",
                "reference": "string"
              }
            ],
            "indexColumn": {
              "type": "time",
              "reference": "string"
            }
          },
          "dateZoom": {
            "xAxisFieldId": "string",
            "granularity": "Second"
          },
          "query": {
            "filters": {
              "tableCalculations": "string",
              "metrics": "string",
              "dimensions": "string"
            },
            "exploreName": "string",
            "dimensions": [
              "string"
            ],
            "metrics": [
              "string"
            ],
            "sorts": [
              {
                "pivotValues": [
                  {
                    "value": "string",
                    "reference": "string"
                  }
                ],
                "nullsFirst": true,
                "descending": true,
                "fieldId": "string"
              }
            ],
            "limit": 0,
            "tableCalculations": [
              {
                "totalMode": "formula",
                "type": "number",
                "format": {
                  "type": "default",
                  "round": 0,
                  "separator": "default",
                  "currency": "string",
                  "compact": {},
                  "prefix": "string",
                  "suffix": "string",
                  "timeInterval": "RAW",
                  "custom": "string"
                },
                "displayName": "string",
                "name": "string",
                "index": 0,
                "sql": "string"
              }
            ],
            "additionalMetrics": [
              {
                "label": "string",
                "type": "percentile",
                "description": "string",
                "sql": "string",
                "hidden": true,
                "round": 0,
                "compact": "auto",
                "format": "km",
                "separator": "default",
                "table": "string",
                "name": "string",
                "index": 0,
                "filters": [
                  {
                    "includeNull": true,
                    "values": [
                      "string"
                    ],
                    "operator": "isNull",
                    "id": "string",
                    "target": {
                      "fieldRef": "string"
                    },
                    "settings": "string",
                    "disabled": true,
                    "required": true,
                    "caseSensitive": true
                  }
                ],
                "baseDimensionName": "string",
                "baseMetricName": "string",
                "uuid": "string",
                "percentile": 0,
                "distinctKeys": [
                  "string"
                ],
                "formatOptions": {
                  "type": "default",
                  "round": 0,
                  "separator": "default",
                  "currency": "string",
                  "compact": "auto",
                  "prefix": "string",
                  "suffix": "string",
                  "timeInterval": "RAW",
                  "custom": "string"
                },
                "generationType": "periodOverPeriod",
                "baseMetricId": "string",
                "timeDimensionId": "string",
                "granularity": "RAW",
                "periodOffset": 0
              }
            ],
            "customDimensions": [
              {
                "id": "string",
                "name": "string",
                "table": "string",
                "type": "bin",
                "dimensionId": "string",
                "binType": "fixed_number",
                "binNumber": 0
              }
            ],
            "metricOverrides": {
              "property": {
                "formatOptions": {
                  "type": "default",
                  "round": 0,
                  "separator": "default",
                  "currency": "string",
                  "compact": "auto",
                  "prefix": "string",
                  "suffix": "string",
                  "timeInterval": "RAW",
                  "custom": "string"
                }
              }
            },
            "dimensionOverrides": {
              "property": {
                "formatOptions": {
                  "type": "default",
                  "round": 0,
                  "separator": "default",
                  "currency": "string",
                  "compact": "auto",
                  "prefix": "string",
                  "suffix": "string",
                  "timeInterval": "RAW",
                  "custom": "string"
                }
              }
            },
            "timezone": "string",
            "pivotDimensions": [
              "string"
            ],
            "metadata": {
              "hasADateDimension": {}
            },
            "dateZoom": {
              "xAxisFieldId": "string",
              "granularity": "Second"
            }
          }
        },
        "metricQuery": {
          "metadata": {
            "hasADateDimension": {
              "name": "string",
              "label": "string",
              "table": "string"
            }
          },
          "pivotDimensions": [
            "string"
          ],
          "timezone": "string",
          "dimensionOverrides": {
            "property": {
              "formatOptions": {
                "type": "default",
                "round": 0,
                "separator": "default",
                "currency": "string",
                "compact": "auto",
                "prefix": "string",
                "suffix": "string",
                "timeInterval": "RAW",
                "custom": "string"
              }
            }
          },
          "metricOverrides": {
            "property": {
              "formatOptions": {
                "type": "default",
                "round": 0,
                "separator": "default",
                "currency": "string",
                "compact": "auto",
                "prefix": "string",
                "suffix": "string",
                "timeInterval": "RAW",
                "custom": "string"
              }
            }
          },
          "customDimensions": [
            {
              "id": "string",
              "name": "string",
              "table": "string",
              "type": "bin",
              "dimensionId": "string",
              "binType": "fixed_number",
              "binNumber": 0
            }
          ],
          "additionalMetrics": [
            {
              "label": "string",
              "type": "percentile",
              "description": "string",
              "sql": "string",
              "hidden": true,
              "round": 0,
              "compact": "auto",
              "format": "km",
              "separator": "default",
              "table": "string",
              "name": "string",
              "index": 0,
              "filters": [
                {
                  "includeNull": true,
                  "values": [
                    "string"
                  ],
                  "operator": "isNull",
                  "id": "string",
                  "target": {
                    "fieldRef": "string"
                  },
                  "settings": "string",
                  "disabled": true,
                  "required": true,
                  "caseSensitive": true
                }
              ],
              "baseDimensionName": "string",
              "baseMetricName": "string",
              "uuid": "string",
              "percentile": 0,
              "distinctKeys": [
                "string"
              ],
              "formatOptions": {
                "type": "default",
                "round": 0,
                "separator": "default",
                "currency": "string",
                "compact": "auto",
                "prefix": "string",
                "suffix": "string",
                "timeInterval": "RAW",
                "custom": "string"
              },
              "generationType": "periodOverPeriod",
              "baseMetricId": "string",
              "timeDimensionId": "string",
              "granularity": "RAW",
              "periodOffset": 0
            }
          ],
          "tableCalculations": [
            {
              "totalMode": "formula",
              "type": "number",
              "format": {
                "type": "default",
                "round": 0,
                "separator": "default",
                "currency": "string",
                "compact": "auto",
                "prefix": "string",
                "suffix": "string",
                "timeInterval": "RAW",
                "custom": "string"
              },
              "displayName": "string",
              "name": "string",
              "index": 0,
              "sql": "string"
            }
          ],
          "limit": 0,
          "sorts": [
            {
              "pivotValues": [
                {
                  "value": "string",
                  "reference": "string"
                }
              ],
              "nullsFirst": true,
              "descending": true,
              "fieldId": "string"
            }
          ],
          "filters": {
            "tableCalculations": {
              "or": [
                {}
              ],
              "id": "string"
            },
            "metrics": {
              "or": [
                {}
              ],
              "id": "string"
            },
            "dimensions": {
              "or": [
                {}
              ],
              "id": "string"
            }
          },
          "metrics": [
            "string"
          ],
          "dimensions": [
            "string"
          ],
          "exploreName": "string"
        },
        "exploreName": "string",
        "error": "string",
        "subline": "string",
        "title": "string",
        "status": "pending",
        "language": "semantic",
        "trigger": "interactive",
        "context": "dashboardView",
        "projectUuid": "string",
        "createdAt": "2024-01-01T00:00:00.000Z",
        "queryUuid": "string"
      }
    ]
  },
  "status": "ok"
}

default — Error

{
  "error": {
    "data": "string",
    "message": "string",
    "name": "string",
    "statusCode": 0
  },
  "status": "error"
}