Skip to main content
POST
/
api
/
v1
/
projects
/
{projectUuid}
/
charts
/
{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": {
              "comparisonField": "<string>",
              "conditionalFormattings": [
                {
                  "rules": [
                    {
                      "values": [
                        123
                      ],
                      "operator": "isNull",
                      "id": "<string>"
                    }
                  ],
                  "color": "<string>",
                  "target": {
                    "fieldId": "<string>"
                  },
                  "applyTo": "cell",
                  "darkColor": "<string>"
                }
              ],
              "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>",
          "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": [
                  {
                    "operator": "isNull",
                    "id": "<string>",
                    "target": {
                      "fieldId": "<string>"
                    },
                    "values": [
                      "<unknown>"
                    ],
                    "settings": "<unknown>",
                    "disabled": true,
                    "required": true
                  }
                ],
                "id": "<string>"
              },
              "metrics": {
                "or": [
                  {
                    "operator": "isNull",
                    "id": "<string>",
                    "target": {
                      "fieldId": "<string>"
                    },
                    "values": [
                      "<unknown>"
                    ],
                    "settings": "<unknown>",
                    "disabled": true,
                    "required": true
                  }
                ],
                "id": "<string>"
              },
              "dimensions": {
                "or": [
                  {
                    "operator": "isNull",
                    "id": "<string>",
                    "target": {
                      "fieldId": "<string>"
                    },
                    "values": [
                      "<unknown>"
                    ],
                    "settings": "<unknown>",
                    "disabled": true,
                    "required": true
                  }
                ],
                "id": "<string>"
              }
            },
            "metrics": [
              "<string>"
            ],
            "dimensions": [
              "<string>"
            ],
            "exploreName": "<string>",
            "metadata": {
              "hasADateDimension": {
                "name": "<string>",
                "label": "<string>",
                "table": "<string>"
              }
            },
            "timezone": "<string>",
            "dimensionOverrides": {},
            "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>"
                },
                "generationType": "periodOverPeriod",
                "baseMetricId": "<string>",
                "timeDimensionId": "<string>",
                "granularity": "RAW",
                "periodOffset": 123
              }
            ]
          },
          "tableConfig": {
            "columnOrder": [
              "<string>"
            ]
          },
          "dashboardUuid": "<string>",
          "dashboardName": "<string>",
          "colorPalette": [
            "<string>"
          ],
          "oldUuid": "<string>",
          "spacePath": "<string>",
          "spaceSlug": "<string>",
          "description": "<string>",
          "parameters": {},
          "updatedByUser": {
            "userUuid": "<string>",
            "firstName": "<string>",
            "lastName": "<string>"
          },
          "deletedAt": "2023-11-07T05:31:56Z",
          "deletedBy": {
            "lastName": "<string>",
            "firstName": "<string>",
            "userUuid": "<string>"
          },
          "pivotConfig": {
            "columns": [
              "<string>"
            ]
          }
        },
        "action": "no changes"
      }
    ],
    "dashboards": [
      {
        "data": {
          "name": "<string>",
          "projectUuid": "<string>",
          "organizationUuid": "<string>",
          "uuid": "<string>",
          "updatedAt": "2023-11-07T05:31:56Z",
          "versionUuid": "<string>",
          "spaceUuid": "<string>",
          "pinnedListUuid": "<string>",
          "pinnedListOrder": 123,
          "slug": "<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": {}
              }
            ]
          },
          "spaceName": "<string>",
          "views": 123,
          "firstViewedAt": "<string>",
          "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>"
            ]
          },
          "deletedAt": "2023-11-07T05:31:56Z",
          "deletedBy": {
            "lastName": "<string>",
            "firstName": "<string>",
            "userUuid": "<string>"
          }
        },
        "action": "no changes"
      }
    ],
    "spaces": [
      {
        "data": {
          "name": "<string>",
          "projectUuid": "<string>",
          "organizationUuid": "<string>",
          "uuid": "<string>",
          "isPrivate": true,
          "inheritParentPermissions": true,
          "pinnedListUuid": "<string>",
          "pinnedListOrder": 123,
          "slug": "<string>",
          "parentSpaceUuid": "<string>",
          "path": "<string>",
          "dashboardCount": 123,
          "chartCount": 123,
          "deletedBy": {
            "lastName": "<string>",
            "firstName": "<string>",
            "userUuid": "<string>"
          },
          "deletedAt": "2023-11-07T05:31:56Z"
        },
        "action": "no changes"
      }
    ],
    "sqlCharts": [
      {
        "data": {
          "spacePath": "<string>",
          "spaceSlug": "<string>",
          "description": "<string>",
          "name": "<string>",
          "projectUuid": "<string>",
          "slug": "<string>",
          "oldUuid": "<string>",
          "uuid": "<string>"
        },
        "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

Display name of the chart

version
number<double>
required

Schema version for this chart configuration

slug
string
required

Unique identifier slug for this chart

tableName
string
required

The explore/table name this chart queries from

metricQuery
object
required

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

spaceSlug
string
required

Slug of the space containing this chart

chartConfig
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.

parameters
object

Parameter values for the chart query

updatedAt
string<date-time>

Not modifiable by user, but useful to know if it has been updated. Defaults to now if omitted.

pivotConfig
object

Pivot table configuration

tableConfig
object

Table configuration. Defaults to empty column order if omitted.

dashboardSlug
string

Slug of the dashboard this chart belongs to (if any)

downloadedAt
string<date-time>

Timestamp when this chart was downloaded from Lightdash

description
string | null
force
boolean
publicSpaceCreate
boolean
skipSpaceCreate
boolean

Response

Success

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