---
title: "PUT /api/v1/config/log-scale-alerts/{slug}"
method: PUT
path: "/api/v1/config/log-scale-alerts/{slug}"
tags: ["LogScaleAlert"]
---

# PUT /api/v1/config/log-scale-alerts/{slug}

`PUT /api/v1/config/log-scale-alerts/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateLogScaleAlertBody
  - `log_scale_alert` Configv1LogScaleAlert
    - `slug` string — Unique identifier of the LogScaleAlert. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the LogScaleAlert is created.
    - `repository` string — Name of LogScale repository the alerts belongs to. Required.
    - `name` string — Name of the alert.
    - `created_at` string, date-time — Timestamp of when the LogScaleAlert was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the LogScaleAlert was last updated. Cannot be set by clients.
    - `description` string — Description of the alert.
    - `disabled` boolean — Flag indicating whether the alert is disabled.
    - `log_scale_query` string — LogScale query to execute.
    - `time_window_secs` integer — Lookback window used for an alert's evaluation. If this is set to 86400 seconds (24 hours), only the events from the last 24 hours will be considered when the alert query is run.
    - `throttle_secs` integer — Throttle time in seconds. The alert is triggered at most once per throttle period.
    - `throttle_field` string — Field to throttle on. Optional.
    - `log_scale_action_slugs` string[] — Slugs of LogScale actions that will receive the alerts. When the value is empty this alert won't trigger. Optional.
    - `tags` string[] — Tags attached to the alert.
    - `run_as_user` string — Email of the user that the alert runs on behalf of. Required.
    - `alert_type` 'STANDARD' | 'FILTER'
  - `create_if_missing` boolean — If true, the LogScaleAlert will be created if it does not already exist, identified by slug. If false, an error will be returned if the LogScaleAlert does not already exist.
  - `dry_run` boolean — If true, the LogScaleAlert isn't created or updated, and no response LogScaleAlert will be returned. The response will return an error if the given LogScaleAlert is invalid.

## Response `200`

A successful response containing the updated LogScaleAlert.

- Configv1UpdateLogScaleAlertResponse
  - `log_scale_alert` Configv1LogScaleAlert
    - `slug` string — Unique identifier of the LogScaleAlert. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the LogScaleAlert is created.
    - `repository` string — Name of LogScale repository the alerts belongs to. Required.
    - `name` string — Name of the alert.
    - `created_at` string, date-time — Timestamp of when the LogScaleAlert was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the LogScaleAlert was last updated. Cannot be set by clients.
    - `description` string — Description of the alert.
    - `disabled` boolean — Flag indicating whether the alert is disabled.
    - `log_scale_query` string — LogScale query to execute.
    - `time_window_secs` integer — Lookback window used for an alert's evaluation. If this is set to 86400 seconds (24 hours), only the events from the last 24 hours will be considered when the alert query is run.
    - `throttle_secs` integer — Throttle time in seconds. The alert is triggered at most once per throttle period.
    - `throttle_field` string — Field to throttle on. Optional.
    - `log_scale_action_slugs` string[] — Slugs of LogScale actions that will receive the alerts. When the value is empty this alert won't trigger. Optional.
    - `tags` string[] — Tags attached to the alert.
    - `run_as_user` string — Email of the user that the alert runs on behalf of. Required.
    - `alert_type` 'STANDARD' | 'FILTER'

## Other responses

- `400` — Cannot update the LogScaleAlert because the request is invalid.
- `404` — Cannot update the LogScaleAlert because the slug does not exist.
- `409` — Cannot update the LogScaleAlert because there is a conflict with an existing LogScaleAlert.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.net/chronosphere/apis/config-v1-api.md) · [All operations](https://skmtc.net/chronosphere/apis/config-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chronosphere/config-v1-api/revisions/530951bd2ccf/schema)
