Reference

Update or pause a cost alert

PATCH
/api/v1/cost-alerts/{alert_id}

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

alert_id*Alert Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Every field optional, because the form saves one at a time as well as all at once.

"Optional" means omitted, not null. The two are different requests and the service tells them apart through model_fields_set, so a null has to be refused here rather than left to fail somewhere it reads as a fault.

enabled is here rather than on a route of its own: pausing is an edit, and giving it a second write path would mean two places to remember to stamp paused_by.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/cost-alerts/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "timestamp": "2019-08-24T14:15:22Z",
  "data": {
    "id": "string",
    "name": "string",
    "params": {
      "kind": "budget",
      "budget": "string",
      "reset": "monthly",
      "rules": [
        {
          "amount": "string",
          "unit": "percent",
          "window": "within",
          "days": 1,
          "reference": "start_of_month"
        }
      ],
      "cost_basis": "unblended"
    },
    "source_id": "string",
    "recipients": [
      {
        "name": "string",
        "email": "string",
        "member": true
      }
    ],
    "slack_channels": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "slack_channel": "string",
    "enabled": true,
    "paused_by": "string",
    "sent_to_me": false,
    "watching": [
      {
        "key": "string",
        "state": "ok",
        "period": "string",
        "observed_usd": 0
      }
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
Ask the FinOps Agent about your cloud spend