Skip to main content
POST
/
api
/
v2
/
projects
/
{projectUuid}
/
query
/
dashboard-sql-chart
Execute dashboard SQL chart
curl --request POST \
  --url http://api/v2/projects/{projectUuid}/query/dashboard-sql-chart \
  --header 'Content-Type: application/json' \
  --data '
{
  "parameters": {},
  "invalidateCache": true,
  "context": "dashboardView",
  "limit": 123,
  "dashboardSorts": [
    {
      "nullsFirst": true,
      "descending": true,
      "fieldId": "<string>"
    }
  ],
  "dashboardFilters": {
    "tableCalculations": [
      {
        "values": [
          "<any>"
        ],
        "operator": "isNull",
        "id": "<string>",
        "target": {},
        "settings": "<any>",
        "disabled": true,
        "required": true,
        "singleValue": true,
        "label": "<string>",
        "tileTargets": {}
      }
    ],
    "metrics": [
      {
        "values": [
          "<any>"
        ],
        "operator": "isNull",
        "id": "<string>",
        "target": {},
        "settings": "<any>",
        "disabled": true,
        "required": true,
        "singleValue": true,
        "label": "<string>",
        "tileTargets": {}
      }
    ],
    "dimensions": [
      {
        "values": [
          "<any>"
        ],
        "operator": "isNull",
        "id": "<string>",
        "target": {},
        "settings": "<any>",
        "disabled": true,
        "required": true,
        "singleValue": true,
        "label": "<string>",
        "tileTargets": {}
      }
    ]
  },
  "tileUuid": "<string>",
  "dashboardUuid": "<string>",
  "savedSqlUuid": "<string>"
}
'
{
  "results": {
    "usedParametersValues": {},
    "parameterReferences": [
      "<string>"
    ],
    "cacheMetadata": {
      "cacheHit": true,
      "cacheKey": "<string>",
      "cacheExpiresAt": "2023-11-07T05:31:56Z",
      "cacheUpdatedTime": "2023-11-07T05:31:56Z"
    },
    "queryUuid": "<string>",
    "appliedDashboardFilters": {
      "tableCalculations": [
        {
          "values": [
            "<any>"
          ],
          "operator": "isNull",
          "id": "<string>",
          "target": {
            "fallbackType": "string",
            "isSqlColumn": true,
            "tableName": "<string>",
            "fieldId": "<string>"
          },
          "settings": "<any>",
          "disabled": true,
          "required": true,
          "singleValue": true,
          "label": "<string>",
          "tileTargets": {}
        }
      ],
      "metrics": [
        {
          "values": [
            "<any>"
          ],
          "operator": "isNull",
          "id": "<string>",
          "target": {
            "fallbackType": "string",
            "isSqlColumn": true,
            "tableName": "<string>",
            "fieldId": "<string>"
          },
          "settings": "<any>",
          "disabled": true,
          "required": true,
          "singleValue": true,
          "label": "<string>",
          "tileTargets": {}
        }
      ],
      "dimensions": [
        {
          "values": [
            "<any>"
          ],
          "operator": "isNull",
          "id": "<string>",
          "target": {
            "fallbackType": "string",
            "isSqlColumn": true,
            "tableName": "<string>",
            "fieldId": "<string>"
          },
          "settings": "<any>",
          "disabled": true,
          "required": true,
          "singleValue": true,
          "label": "<string>",
          "tileTargets": {}
        }
      ]
    }
  },
  "status": "ok"
}

Path Parameters

projectUuid
string
required

Body

application/json
  • Option 1
  • Option 2
savedSqlUuid
string
required
dashboardSorts
object[]
required
dashboardFilters
object
required
tileUuid
string
required
dashboardUuid
string
required
parameters
object

Construct a type with a set of properties K of type T

invalidateCache
boolean
context
enum<string>
Available options:
dashboardView,
autorefreshedDashboard,
exploreView,
filterAutocomplete,
chartView,
chartHistory,
sqlChartView,
sqlRunner,
viewUnderlyingData,
alert,
scheduledDelivery,
csvDownload,
gsheets,
scheduledGsheetsChart,
scheduledGsheetsDashboard,
scheduledChart,
scheduledDashboard,
calculateTotal,
calculateSubtotal,
embed,
ai,
mcp,
api,
cli,
metricsExplorer
limit
number

Response

Success

results
object
required
status
enum<string>
required
Available options:
ok