Anomalies
Get anomaly chart series
Chart data for one anomaly as a list of charts, one per metric the detector judged on (daily cost, CPU, memory, disk, spikiness, model comparison). Each chart carries its points, unit, and typed annotations (window, baseline, normal_band, threshold, marker, projection, target) with their own labels, so one frontend component renders any anomaly type. An empty charts list with a note means there is nothing to chart for this anomaly, not an error. A bin_pack anomaly also charts the nodes proposed for removal, five by default with more_nodes counting the rest; all=true returns every one.
GET
/
api
/
v1
/
tenant
/
anomalies
/
{id}
/
series
Get anomaly chart series
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series \
--header 'Authorization: <api-key>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series', 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.costgraph.ai/api/v1/tenant/anomalies/{id}/series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"charts": [
{
"key": "<string>",
"label": "<string>",
"points": [
{
"t": "<string>",
"v": 123
}
],
"representation": "<string>",
"annotations": [
{
"role": "<string>",
"from": null,
"label": "<string>",
"points": [
{
"t": "<string>",
"v": 123
}
],
"to": null,
"value": null
}
],
"bars": [
{
"label": "<string>",
"value": 123
}
],
"note": "<string>",
"subtitle": "<string>",
"unit": "<string>"
}
],
"more_nodes": 123,
"note": "<string>"
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}Authorizations
Enter "Bearer {token}"
Path Parameters
Anomaly id
Query Parameters
Chart every node proposed for removal instead of the first five
Was this page helpful?
⌘I
Get anomaly chart series
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series \
--header 'Authorization: <api-key>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series', 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.costgraph.ai/api/v1/tenant/anomalies/{id}/series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"charts": [
{
"key": "<string>",
"label": "<string>",
"points": [
{
"t": "<string>",
"v": 123
}
],
"representation": "<string>",
"annotations": [
{
"role": "<string>",
"from": null,
"label": "<string>",
"points": [
{
"t": "<string>",
"v": 123
}
],
"to": null,
"value": null
}
],
"bars": [
{
"label": "<string>",
"value": 123
}
],
"note": "<string>",
"subtitle": "<string>",
"unit": "<string>"
}
],
"more_nodes": 123,
"note": "<string>"
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}