GamebeastDocs
Dashboard
Project APIAlerts

Update an alert

PATCH
/application/{applicationId}/analytics/v1/alerts/{alertId}

Change any setting, or pause (paused: true) and resume it. A change to the condition, interval or window runs the cost check again.

Authorization

personalAccessTokenAuth
AuthorizationBearer <token>

Personal access token (prefixed gb_pat_). Acts on behalf of its owner and can never exceed the owner's own permissions. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

applicationId*number

Gamebeast project ID

alertId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/application/0/analytics/v1/alerts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{}'
{  "name": "string",  "description": "string",  "condition": {    "metricId": "string",    "reducer": "last",    "comparator": "gt",    "threshold": 0,    "recoveryThreshold": 0  },  "intervalSec": 60,  "lookbackSec": 60,  "forCount": 1,  "noDataPolicy": "no_data",  "errorPolicy": "error",  "repeatSec": 300,  "annotate": true,  "contactPointIds": [    "6a98df78-fa1b-4672-bc69-bd59c79644fc"  ],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "queryId": -9007199254740991,  "state": "ok",  "lastValue": 0,  "lastEvaluatedAt": "2019-08-24T14:15:22Z",  "lastTransitionAt": "2019-08-24T14:15:22Z",  "nextEvaluationAt": "2019-08-24T14:15:22Z",  "lastError": "string",  "mutedUntil": "2019-08-24T14:15:22Z",  "backoff": {    "reason": "timeouts",    "fromIntervalSec": -9007199254740991,    "toIntervalSec": -9007199254740991,    "at": "2019-08-24T14:15:22Z"  },  "createdBy": {    "userId": "string",    "name": "string"  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}