v1

latestOpenAPI 3.0.12026-07-26152262362.2 KB
Alerts

Update an alert

Updates the alert specified by the Id.

patch/analytics/v1/alerts/{id}

Path parameters

idstring required

Alert ID

Request body

namestring

Alert name

recipientsstring[]

List of emails to notify when the alert is triggered.

Example request

{
  "config": {
    "scopes": [
      {
        "id": "cloud_provider",
        "type": "fixed",
        "inverse": false,
        "values": [
          "google-cloud"
        ]
      }
    ]
  }
}

Response

OK - Alert updated.

idstring

Alert ID.

namestring required

Alert Name.

createTimeinteger

The time when the alert was created (in UNIX timestamp).

updateTimeinteger

Last time the alert was modified (in UNIX timestamp).

lastAlertedinteger

Last time the alert was triggered (in UNIX timestamp).

recipientsstring[]

List of emails that will be notified when the alert is triggered.

Example response

{
  "id": "7jyrczd6CSh3M8TuQ6Qq",
  "name": "fgfgh",
  "createTime": 1678628817062,
  "updateTime": 1678628938891,
  "lastAlerted": null,
  "recipients": [
    "user1@example.com",
    "user2@example.com"
  ],
  "config": {
    "condition": "value",
    "currency": "USD",
    "metric": {
      "type": "basic",
      "value": "cost"
    },
    "operator": "gt",
    "evaluateForEach": "",
    "attributions": [
      "PvqyGcdFcTHh7aLUdGdf"
    ],
    "scopes": [],
    "timeInterval": "month",
    "dataSource": "billing",
    "value": 500
  }
}