Anomalies
Get anomaly detail
Full detail for a single anomaly including evidence, contributors, and prompt context.
GET
/
api
/
v1
/
tenant
/
anomalies
/
{id}
Get anomaly detail
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/anomalies/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}"
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}', 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}",
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}"
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}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}")
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": {
"activated_at": "<string>",
"anomaly_type": "<string>",
"availability_zone": "<string>",
"category": "<string>",
"confidence": "<string>",
"contributors": [
{
"cost_monthly": 123,
"dimension": "<string>",
"share_pct": 123
}
],
"cost_impact_annual": 123,
"cost_impact_basis": "<string>",
"cost_impact_monthly": 123,
"created_at": "<string>",
"description": "<string>",
"detector": "<string>",
"detector_version": "<string>",
"evidence": {
"baseline_p50": 123,
"baseline_p95": 123,
"source": {},
"stateful": true,
"value": 123,
"version": 123,
"window_end": "<string>",
"window_start": "<string>"
},
"fingerprint": "<string>",
"id": "<string>",
"labels": {},
"line_item_type": "<string>",
"magnitude": 123,
"magnitude_bar": {
"baseline_pct": 123,
"unit": "<string>",
"value": 123,
"baseline": 123
},
"magnitude_unit": "<string>",
"miss_count": 123,
"name": "<string>",
"num_recurring_events": 123,
"prompt_context": {
"explanation": "<string>",
"metadata": {},
"observations": [
{
"severity": "<string>",
"text": "<string>"
}
],
"resource": {},
"suggested_questions": [
"<string>"
],
"summary": "<string>",
"version": 123
},
"provider": "<string>",
"region": "<string>",
"resolved_at": "<string>",
"resource_id": "<string>",
"resource_name": "<string>",
"resource_type": "<string>",
"service": "<string>",
"severity": "<string>",
"status": "<string>",
"tenant_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}Was this page helpful?
⌘I
Get anomaly detail
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/anomalies/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/anomalies/{id}"
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}', 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}",
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}"
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}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/anomalies/{id}")
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": {
"activated_at": "<string>",
"anomaly_type": "<string>",
"availability_zone": "<string>",
"category": "<string>",
"confidence": "<string>",
"contributors": [
{
"cost_monthly": 123,
"dimension": "<string>",
"share_pct": 123
}
],
"cost_impact_annual": 123,
"cost_impact_basis": "<string>",
"cost_impact_monthly": 123,
"created_at": "<string>",
"description": "<string>",
"detector": "<string>",
"detector_version": "<string>",
"evidence": {
"baseline_p50": 123,
"baseline_p95": 123,
"source": {},
"stateful": true,
"value": 123,
"version": 123,
"window_end": "<string>",
"window_start": "<string>"
},
"fingerprint": "<string>",
"id": "<string>",
"labels": {},
"line_item_type": "<string>",
"magnitude": 123,
"magnitude_bar": {
"baseline_pct": 123,
"unit": "<string>",
"value": 123,
"baseline": 123
},
"magnitude_unit": "<string>",
"miss_count": 123,
"name": "<string>",
"num_recurring_events": 123,
"prompt_context": {
"explanation": "<string>",
"metadata": {},
"observations": [
{
"severity": "<string>",
"text": "<string>"
}
],
"resource": {},
"suggested_questions": [
"<string>"
],
"summary": "<string>",
"version": 123
},
"provider": "<string>",
"region": "<string>",
"resolved_at": "<string>",
"resource_id": "<string>",
"resource_name": "<string>",
"resource_type": "<string>",
"service": "<string>",
"severity": "<string>",
"status": "<string>",
"tenant_id": "<string>",
"title": "<string>",
"updated_at": "<string>"
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}