Skip to main content
PUT
/
api
/
v1
/
data
/
panel_annotations
/
{id}
cURL
curl --request PUT \
  --url https://{tenant}.chronosphere.io/api/v1/data/panel_annotations/{id} \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "labels": {},
  "starts_at": "2023-11-07T05:31:56Z",
  "title": "<string>"
}
'
package main

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

func main() {

url := "https://{tenant}.chronosphere.io/api/v1/data/panel_annotations/{id}"

payload := strings.NewReader("{\n \"labels\": {},\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\"\n}")

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/data/panel_annotations/{id}")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"labels\": {},\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\"\n}")
.asString();
const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({labels: {}, starts_at: '2023-11-07T05:31:56Z', title: '<string>'})
};

fetch('https://{tenant}.chronosphere.io/api/v1/data/panel_annotations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://{tenant}.chronosphere.io/api/v1/data/panel_annotations/{id}"

payload = {
"labels": {},
"starts_at": "2023-11-07T05:31:56Z",
"title": "<string>"
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
{
  "created_by": "<string>",
  "id": "<string>",
  "labels": {},
  "starts_at": "2023-11-07T05:31:56Z",
  "target_reference": "<string>",
  "title": "<string>",
  "type": "DASHBOARD"
}
{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}

Authorizations

API-Token
string
header
required

Chronosphere API token

Path Parameters

id
string
required

Unique identifier of the panel annotation.

Body

application/json
labels
object

Map of user-supplied key:value pairs associated with the event. The following maximums apply:

  • Number of labels per event: 50
  • Key character length: 200
  • Value character length: 500
starts_at
string<date-time>

The start time of the period being annotated.

title
string

A short description explaining the annotation. Maximum character length: 100.

Response

A successful response.

created_by
string

Display name of the creator of this annotation.

id
string

Unique identifier of the panel annotation.

labels
object

Map of user-supplied key:value pairs associated with the annotation. The following maximums apply:

  • Number of labels per annotation: 50
  • Key character length: 200
  • Value character length: 500
starts_at
string<date-time>

The start of the time period being annotated.

target_reference
string

The slug of the resource being annotated.

title
string

A short description explaining the annotation. Max length, 100 characters.

type
enum<string>

The type of resource being annotated.

Available options:
DASHBOARD