Skip to main content
POST
/
api
/
v1
/
projects
/
{projectUuid}
/
sqlCharts
/
{slug}
/
code
Error
A valid request URL is required to generate request examples
{
  "results": {
    "charts": [
      {
        "data": {
          "name": "<string>",
          "projectUuid": "<string>",
          "organizationUuid": "<string>",
          "uuid": "<string>",
          "updatedAt": "2023-11-07T05:31:56Z",
          "chartConfig": {
            "type": "big_number",
            "config": {
              "comparisonLabel": "<string>",
              "flipColors": true,
              "comparisonFormat": "raw",
              "showComparison": true,
              "showTableNamesInLabel": true,
              "showBigNumberLabel": true,
              "selectedField": "<string>",
              "style": "thousands",
              "label": "<string>"
            }
          },
          "spaceUuid": "<string>",
          "pinnedListUuid": "<string>",
          "pinnedListOrder": 123,
          "slug": "<string>",
          "spaceName": "<string>",
          "dashboardUuid": "<string>",
          "dashboardName": "<string>",
          "tableName": "<string>",
          "metricQuery": {
            "tableCalculations": [
              {
                "displayName": "<string>",
                "name": "<string>",
                "sql": "<string>",
                "type": "number",
                "format": {
                  "type": "default",
                  "round": 123,
                  "separator": "default",
                  "currency": "<string>",
                  "compact": "thousands",
                  "prefix": "<string>",
                  "suffix": "<string>",
                  "timeInterval": "RAW",
                  "custom": "<string>"
                },
                "index": 123
              }
            ],
            "limit": 123,
            "sorts": [
              {
                "descending": true,
                "fieldId": "<string>",
                "nullsFirst": true
              }
            ],
            "filters": {
              "tableCalculations": {
                "or": [
                  "<unknown>"
                ],
                "id": "<string>"
              },
              "metrics": {
                "or": [
                  "<unknown>"
                ],
                "id": "<string>"
              },
              "dimensions": {
                "or": [
                  "<unknown>"
                ],
                "id": "<string>"
              }
            },
            "metrics": [
              "<string>"
            ],
            "dimensions": [
              "<string>"
            ],
            "exploreName": "<string>",
            "periodOverPeriod": {
              "granularity": "RAW",
              "type": "previousPeriod",
              "field": {
                "table": "<string>",
                "name": "<string>"
              },
              "periodOffset": 123
            },
            "metadata": {
              "hasADateDimension": {
                "name": "<string>",
                "label": "<string>",
                "table": "<string>"
              }
            },
            "timezone": "<string>",
            "metricOverrides": {},
            "customDimensions": [
              {
                "id": "<string>",
                "name": "<string>",
                "table": "<string>",
                "type": "bin",
                "dimensionId": "<string>",
                "binType": "fixed_number",
                "binNumber": 123,
                "binWidth": 123,
                "customRange": [
                  {
                    "to": 123,
                    "from": 123
                  }
                ]
              }
            ],
            "additionalMetrics": [
              {
                "type": "percentile",
                "sql": "<string>",
                "table": "<string>",
                "name": "<string>",
                "label": "<string>",
                "description": "<string>",
                "hidden": true,
                "round": 123,
                "compact": "thousands",
                "format": "km",
                "index": 123,
                "filters": [
                  {
                    "operator": "isNull",
                    "id": "<string>",
                    "target": {
                      "fieldRef": "<string>"
                    },
                    "values": [
                      "<unknown>"
                    ],
                    "settings": "<unknown>",
                    "disabled": true,
                    "required": true
                  }
                ],
                "baseDimensionName": "<string>",
                "uuid": "<string>",
                "percentile": 123,
                "formatOptions": {
                  "type": "default",
                  "round": 123,
                  "separator": "default",
                  "currency": "<string>",
                  "compact": "thousands",
                  "prefix": "<string>",
                  "suffix": "<string>",
                  "timeInterval": "RAW",
                  "custom": "<string>"
                }
              }
            ]
          },
          "tableConfig": {
            "columnOrder": [
              "<string>"
            ]
          },
          "colorPalette": [
            "<string>"
          ],
          "oldUuid": "<string>",
          "spacePath": "<string>",
          "spaceSlug": "<string>",
          "description": "<string>",
          "parameters": {},
          "updatedByUser": {
            "userUuid": "<string>",
            "firstName": "<string>",
            "lastName": "<string>"
          },
          "pivotConfig": {
            "columns": [
              "<string>"
            ]
          }
        },
        "action": "no changes"
      }
    ],
    "dashboards": [
      {
        "data": {
          "name": "<string>",
          "projectUuid": "<string>",
          "organizationUuid": "<string>",
          "uuid": "<string>",
          "updatedAt": "2023-11-07T05:31:56Z",
          "spaceUuid": "<string>",
          "pinnedListUuid": "<string>",
          "pinnedListOrder": 123,
          "slug": "<string>",
          "spaceName": "<string>",
          "views": 123,
          "firstViewedAt": "<string>",
          "dashboardVersionId": 123,
          "tiles": [
            {
              "uuid": "<string>",
              "type": "saved_chart",
              "x": 123,
              "y": 123,
              "h": 123,
              "w": 123,
              "properties": {
                "savedChartUuid": "<string>",
                "chartSlug": "<string>",
                "lastVersionChartKind": "line",
                "chartName": "<string>",
                "belongsToDashboard": true,
                "hideTitle": true,
                "title": "<string>"
              },
              "tabUuid": "<string>"
            }
          ],
          "filters": {
            "tableCalculations": [
              {
                "operator": "isNull",
                "id": "<string>",
                "target": {
                  "tableName": "<string>",
                  "fieldId": "<string>",
                  "fallbackType": "string",
                  "isSqlColumn": true
                },
                "values": [
                  "<unknown>"
                ],
                "settings": "<unknown>",
                "disabled": true,
                "required": true,
                "singleValue": true,
                "label": "<string>",
                "tileTargets": {}
              }
            ],
            "metrics": [
              {
                "operator": "isNull",
                "id": "<string>",
                "target": {
                  "tableName": "<string>",
                  "fieldId": "<string>",
                  "fallbackType": "string",
                  "isSqlColumn": true
                },
                "values": [
                  "<unknown>"
                ],
                "settings": "<unknown>",
                "disabled": true,
                "required": true,
                "singleValue": true,
                "label": "<string>",
                "tileTargets": {}
              }
            ],
            "dimensions": [
              {
                "operator": "isNull",
                "id": "<string>",
                "target": {
                  "tableName": "<string>",
                  "fieldId": "<string>",
                  "fallbackType": "string",
                  "isSqlColumn": true
                },
                "values": [
                  "<unknown>"
                ],
                "settings": "<unknown>",
                "disabled": true,
                "required": true,
                "singleValue": true,
                "label": "<string>",
                "tileTargets": {}
              }
            ]
          },
          "tabs": [
            {
              "order": 123,
              "name": "<string>",
              "uuid": "<string>"
            }
          ],
          "spacePath": "<string>",
          "spaceSlug": "<string>",
          "description": "<string>",
          "parameters": {},
          "updatedByUser": {
            "userUuid": "<string>",
            "firstName": "<string>",
            "lastName": "<string>"
          },
          "config": {
            "isDateZoomDisabled": true,
            "pinnedParameters": [
              "<string>"
            ]
          }
        },
        "action": "no changes"
      }
    ],
    "spaces": [
      {
        "data": {
          "name": "<string>",
          "projectUuid": "<string>",
          "organizationUuid": "<string>",
          "uuid": "<string>",
          "access": [
            "<string>"
          ],
          "isPrivate": true,
          "pinnedListUuid": "<string>",
          "pinnedListOrder": 123,
          "slug": "<string>",
          "parentSpaceUuid": "<string>",
          "path": "<string>",
          "chartCount": 123,
          "dashboardCount": 123
        },
        "action": "no changes"
      }
    ]
  },
  "status": "ok"
}

Path Parameters

projectUuid
string
required
slug
string
required

Body

application/json

Construct a type with the properties of T except for those in type K.

name
string
required
updatedAt
string<date-time>
required
version
number<double>
required
slug
string
required
spaceSlug
string
required
sql
string
required
limit
number<double>
required
chartKind
enum<string>
required
Available options:
line,
horizontal_bar,
vertical_bar,
scatter,
area,
mixed,
pie,
table,
big_number,
funnel,
custom,
treemap,
gauge,
map
config
any
required

This AnyType is an alias for any The goal is to make it easier to identify any type in the codebase without having to eslint-disable all the time These are only used on legacy any types, don't use it for new types. This is added on a separate file to avoid circular dependencies.

downloadedAt
string<date-time>
description
string | null
publicSpaceCreate
boolean
skipSpaceCreate
boolean

Response

Success

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