POST
/
dashboards
Create a new dashboard
curl --request POST \
  --url https://core.ravenna.ai/api/dashboards \
  --header 'Content-Type: application/json' \
  --header 'x-ravenna-api-token: <api-key>' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "slug": "<string>",
  "layout": {
    "columns": 12,
    "widgets": [
      {
        "slug": "<string>",
        "x": 1,
        "y": 1,
        "columns": 1,
        "rows": 2
      }
    ]
  },
  "itemType": "dashboard",
  "parentId": "<string>",
  "widgets": [
    {
      "type": "TREND",
      "dashboardId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "query": {
        "filterGroups": [
          [
            {
              "field": "<string>",
              "condition": "<string>",
              "value": "<string>",
              "given": "<string>"
            }
          ]
        ],
        "dataSource": "Ticket",
        "timeInterval": "day",
        "groupBy": [
          "<string>"
        ],
        "aggregations": [
          {
            "type": "count",
            "alias": "<string>",
            "field": "id"
          }
        ],
        "limit": 123,
        "sortOrder": "ASC",
        "dateField": "<string>"
      },
      "displayConfig": {
        "formatter": "number",
        "maximumFractionDigits": 123,
        "minimumFractionDigits": 123,
        "chartType": "bar",
        "orientation": "horizontal"
      }
    }
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "slug": "<string>",
  "layout": {
    "columns": 12,
    "widgets": [
      {
        "slug": "<string>",
        "x": 1,
        "y": 1,
        "columns": 1,
        "rows": 2
      }
    ]
  },
  "config": {
    "filters": [
      {
        "field": "<string>",
        "condition": "<string>",
        "value": "<string>",
        "given": "<string>"
      }
    ],
    "dateFilters": {
      "period": "this.day",
      "timeInterval": "day",
      "dateRange": {
        "from": "<string>",
        "to": "<string>"
      }
    }
  },
  "isSystemCreated": true,
  "itemType": "<string>",
  "type": "legacy",
  "parentId": "<string>",
  "organizationId": "<string>",
  "organization": {
    "id": "<string>",
    "name": "<string>"
  },
  "widgets": [
    {
      "id": "<string>",
      "slug": "<string>",
      "name": "<string>",
      "description": "<string>",
      "dashboardId": "<string>",
      "dashboard": {
        "id": "<string>",
        "name": "<string>"
      },
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "type": "<string>",
      "query": {
        "filterGroups": [
          [
            {
              "field": "<string>",
              "condition": "<string>",
              "value": "<string>",
              "given": "<string>"
            }
          ]
        ],
        "dataSource": "Ticket",
        "timeInterval": "day",
        "groupBy": [
          "<string>"
        ],
        "aggregations": [
          {
            "type": "count",
            "alias": "<string>",
            "field": "id"
          }
        ],
        "limit": 123,
        "sortOrder": "ASC",
        "dateField": "<string>"
      },
      "displayConfig": {
        "formatter": "number",
        "maximumFractionDigits": 123,
        "minimumFractionDigits": 123,
        "chartType": "bar",
        "orientation": "horizontal"
      }
    }
  ],
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

x-ravenna-api-token
string
header
required

Body

application/json
name
string
required
id
string
description
string | null
slug
string | null
layout
object
itemType
enum<string>
default:dashboard
Available options:
dashboard,
collection
parentId
string | null
widgets
object[]

Response

Successful response

id
string
required
name
string
required
description
string | null
required
slug
string
required
isSystemCreated
boolean
required
itemType
string | null
required
type
enum<string>
required
Available options:
legacy,
v2,
prepackaged
parentId
string | null
required
organizationId
string | null
required
organization
object | null
required
createdAt
string
required
updatedAt
string
required
layout
object
config
object
widgets
object[] | null