POST
/
v1
/
dashboards
/
{dashboard_id}
/
panels
curl --request POST \
  --url https://api.rootly.com/v1/dashboards/{dashboard_id}/panels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "dashboard_panels",
    "attributes": {
      "name": "<string>",
      "params": {
        "display": "line_chart",
        "description": "<string>",
        "table_fields": [
          "<string>"
        ],
        "legend": {
          "groups": "all"
        },
        "datalabels": {
          "enabled": true
        },
        "datasets": [
          {
            "name": "<string>",
            "collection": "alerts",
            "filter": [
              {
                "operation": "and",
                "rules": [
                  {
                    "operation": "and",
                    "condition": "=",
                    "key": "<string>",
                    "value": "<string>"
                  }
                ]
              }
            ],
            "group_by": "<string>",
            "aggregate": {
              "operation": "count",
              "key": "<string>",
              "cumulative": true
            }
          }
        ]
      },
      "position": {
        "x": 123,
        "y": 123,
        "w": 123,
        "h": 123
      }
    }
  }
}'
{
  "data": {
    "id": "13f47f2d-8ed7-44a1-b7ae-25709bdc9851",
    "type": "dashboard_panels",
    "attributes": {
      "dashboard_id": "49fd4bfd-97d3-416b-aadd-cc5741290d76",
      "name": "test",
      "params": {
        "display": "line_chart",
        "datasets": [
          {
            "collection": "incidents",
            "filter": [],
            "aggregate": {
              "operation": "count",
              "key": "results",
              "cumulative": false
            }
          }
        ]
      },
      "position": null,
      "created_at": "2025-03-26T23:18:42.635-07:00",
      "updated_at": "2025-03-26T23:18:42.635-07:00",
      "data": [
        {
          "name": "Incidents",
          "color": null,
          "data": {
            "2025-03-19": 0,
            "2025-03-20": 0,
            "2025-03-21": 0,
            "2025-03-22": 0,
            "2025-03-23": 0,
            "2025-03-24": 0,
            "2025-03-25": 0,
            "2025-03-26": 0
          }
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dashboard_id
string
required

Body

application/vnd.api+json
data
object
required

Response

201
application/vnd.api+json
dashboard panel created
data
object
required