PgBeam Docs
Anomalies

UpdateAnomalyAlert

Triage an anomaly alert

Updates the triage status of an anomaly alert (acknowledge or resolve).

Usage

result, err := client.Anomalies.UpdateAnomalyAlert(ctx, "prj_xxx", "ano_xxx", pgbeam.UpdateAnomalyAlertRequest{
    Status: "...",
  })

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
projectIDstringYesUnique project identifier (prefixed, e.g. prj_xxx).
anomalyIDstringYesUnique anomaly alert identifier (prefixed, e.g. ano_xxx).
reqpgbeam.UpdateAnomalyAlertRequestYesRequest body
req.StatusstringYesNew triage state for the alert.

Response

(*pgbeam.AnomalyAlert, error) — the updated anomaly alert.

Example

import pgbeam "go.pgbeam.com/sdk"

client := pgbeam.NewClient(&pgbeam.ClientOptions{
  APIKey: "pgb_your_api_key",
})

result, err := client.Anomalies.UpdateAnomalyAlert(ctx, "prj_xxx", "ano_xxx", pgbeam.UpdateAnomalyAlertRequest{
    Status: "...",
  })
if err != nil {
  log.Fatal(err)
}
fmt.Println(result)

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page