Skip to main content
PUT
/
api
/
v1
/
config
/
grafana-dashboards
/
{slug}
cURL
curl --request PUT \
  --url https://{tenant}.chronosphere.io/api/v1/config/grafana-dashboards/{slug} \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{tenant}.chronosphere.io/api/v1/config/grafana-dashboards/{slug}"

payload := strings.NewReader("{}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://{tenant}.chronosphere.io/api/v1/config/grafana-dashboards/{slug}")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();
const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};

fetch('https://{tenant}.chronosphere.io/api/v1/config/grafana-dashboards/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://{tenant}.chronosphere.io/api/v1/config/grafana-dashboards/{slug}"

payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "grafana_dashboard": {
    "name": "<string>",
    "bucket_slug": "<string>",
    "collection": {
      "slug": "<string>"
    },
    "collection_slug": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "dashboard_json": "<string>",
    "slug": "<string>",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{}
Classic dashboard API endpoints are not available for organizations on standard dashboards. Requests to these endpoints return an error. To manage dashboards programmatically in these environments, use the standard dashboard endpoints. For information about your organization’s dashboard configuration, contact Chronosphere Support.

Authorizations

API-Token
string
header
required

Chronosphere API token

Path Parameters

slug
string
required

Body

application/json
create_if_missing
boolean

If true, the GrafanaDashboard will be created if it does not already exist, identified by slug. If false, an error will be returned if the GrafanaDashboard does not already exist.

dry_run
boolean

If true, validates the specified configuration without creating or updating the GrafanaDashboard. If the specified configuration is valid, the endpoint returns a partial response without the GrafanaDashboard. If the specified configuration is invalid, the endpoint returns an error.

grafana_dashboard
object

The GrafanaDashboard to update.

Response

A successful response containing the updated GrafanaDashboard.

grafana_dashboard
object