Patch dashboard chart
curl --request PATCH \
--url https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart": {},
"message": "<string>",
"overwrite": false,
"version": 123
}
'import requests
url = "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}"
payload = {
"chart": {},
"message": "<string>",
"overwrite": False,
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({chart: {}, message: '<string>', overwrite: false, version: 123})
};
fetch('https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'chart' => [
],
'message' => '<string>',
'overwrite' => false,
'version' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}"
payload := strings.NewReader("{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dashboard": {
"name": "<string>",
"owner": "<string>",
"charts": [
{
"id": "<string>",
"type": "TimeSeries",
"query": {
"apl": "<string>",
"queryOptions": {
"shownColumns": "<string>"
}
},
"name": "<string>"
}
],
"layout": [
{
"i": "<string>",
"x": 5,
"y": 4503599627370495,
"w": 6,
"h": 50,
"minW": 6,
"minH": 50.25,
"maxW": 6,
"maxH": 50,
"static": true
}
],
"schemaVersion": 2,
"timeWindowStart": "<string>",
"timeWindowEnd": "<string>",
"description": "<string>",
"againstTimestamp": "<string>",
"uid": "<string>"
},
"id": "<string>",
"uid": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"version": 123
},
"overwritten": true
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}Patch dashboard element
Patch a single chart in a dashboard by chart ID.
PATCH
/
dashboards
/
uid
/
{uid}
/
charts
/
{chartId}
Patch dashboard chart
curl --request PATCH \
--url https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart": {},
"message": "<string>",
"overwrite": false,
"version": 123
}
'import requests
url = "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}"
payload = {
"chart": {},
"message": "<string>",
"overwrite": False,
"version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({chart: {}, message: '<string>', overwrite: false, version: 123})
};
fetch('https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'chart' => [
],
'message' => '<string>',
'overwrite' => false,
'version' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}"
payload := strings.NewReader("{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chart\": {},\n \"message\": \"<string>\",\n \"overwrite\": false,\n \"version\": 123\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dashboard": {
"name": "<string>",
"owner": "<string>",
"charts": [
{
"id": "<string>",
"type": "TimeSeries",
"query": {
"apl": "<string>",
"queryOptions": {
"shownColumns": "<string>"
}
},
"name": "<string>"
}
],
"layout": [
{
"i": "<string>",
"x": 5,
"y": 4503599627370495,
"w": 6,
"h": 50,
"minW": 6,
"minH": 50.25,
"maxW": 6,
"maxH": 50,
"static": true
}
],
"schemaVersion": 2,
"timeWindowStart": "<string>",
"timeWindowEnd": "<string>",
"description": "<string>",
"againstTimestamp": "<string>",
"uid": "<string>"
},
"id": "<string>",
"uid": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"version": 123
},
"overwritten": true
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}{
"code": "<string>",
"message": "<string>",
"currentVersion": 123,
"reason": "<string>",
"uid": "<string>"
}Authorizations
Body
application/json
Was this page helpful?
⌘I