Skip to main content
POST
/
api
/
v1
/
projects
/
{projectUuid}
/
sqlRunner
/
saved
cURL
curl --request POST \
  --url http://api/v1/projects/{projectUuid}/sqlRunner/saved \
  --header 'Content-Type: application/json' \
  --data '
{
  "spaceUuid": "<string>",
  "config": {
    "type": "vertical_bar",
    "metadata": {
      "version": 123
    },
    "display": {
      "stack": true,
      "legend": {
        "align": "start",
        "position": "top"
      },
      "series": {},
      "yAxis": [
        {
          "format": "km",
          "position": "<string>",
          "label": "<string>"
        }
      ],
      "xAxis": {
        "type": "time",
        "label": "<string>"
      }
    },
    "fieldConfig": {
      "sortBy": [
        {
          "direction": "ASC",
          "reference": "<string>"
        }
      ],
      "groupBy": [
        {
          "reference": "<string>"
        }
      ],
      "y": [
        {
          "aggregation": "sum",
          "reference": "<string>"
        }
      ],
      "x": {
        "type": "time",
        "reference": "<string>"
      }
    }
  },
  "limit": 123,
  "sql": "<string>",
  "description": "<string>",
  "name": "<string>"
}
'
{
  "results": {
    "slug": "<string>",
    "savedSqlUuid": "<string>"
  },
  "status": "ok"
}

Path Parameters

projectUuid
string
required

the uuid for the project

Body

application/json

the sql chart to create

spaceUuid
string
required
config
object
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
limit
number
required
sql
string
required
description
string | null
required
name
string
required

Response

Success

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