---
title: "Update View"
method: PUT
path: "/v1/config/view/{viewId}"
tags: ["Configuration"]
---

# Update View

`PUT /v1/config/view/{viewId}`

Use this method to update a view. You can change the view configuration details; add or remove view specific alerts; or attach and detach preset alerts.

## Path parameters

- `viewId` string, required

## Request body

- ConfigRequest
  - `name` string, required — Name of a view.
  - `query` string — Search query.
  - `hosts` Hosts[]
  - `apps` Apps[]
  - `levels` Levels[]
  - `tags` Tags[]
  - `category` Category[]
  - `presetid` string — ID of a preset alert.
  - `channels` Channel[]
    - `integration` string — Defines the type of notification channel. Valid values are: `email`, `webhook`, `slack`, and `pagerduty`
    - `emails` Emails[]
    - `url` string — Webhook URL.
    - `key` string — PagerDuty key.
    - `triggerlimit` string — Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, an alert is triggered.
    - `triggerinterval` string — Specify how often to trigger an alert. Valid values are: 30 seconds, 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours, 12 hours, 24 hours
    - `immediate` boolean — Set to true if you want the trigger condition to be evaluated as soon as the triggerlimit is reached.
    - `terminal` boolean — Set to true if you want the trigger condition to be evaluated after the time that you specify in the triggerinterval field is reached.
    - `operator` string — Type of alert. Valid values are: `presence`and `absence`.
    - `timezone` string — Timezone used to report timestamps. This can be any value defined in the tz database https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
    - `method` 'POST' | 'PUT' | 'PATCH' — WebHook method such as POST.
    - `headers` Headers
      - `timestamp` string — Header value
    - `bodyTemplate` BodyTemplate
      - `timestamp` string — Define the webhook body.
    - `autoresolve` boolean — Set to true if you want the set a condition to resolve the incident that was raised by this alert. This property only applies to PagerDuty.
    - `autoresolveinterval` string — Interval of time to aggregate and check # of matched lines against the auto resolve limit. Valid values are: 30 seconds, 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours, 12 hours, 24 hours, 25 hours.
    - `autoresolvelimit` string — Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.

## Response `200`

OK

- object

## Other responses

- `400` — Bad request

---

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