> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mezmo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update threshold alert

> Replace an existing usage alert with this one



## OpenAPI

````yaml /pipeline.yaml put /pipeline/{pipeline_id}/usage-threshold-alert/{usage_threshold_alert_id}
openapi: 3.1.0
info:
  title: Pipeline API
  description: API for the Pipeline product
  version: 3.345.5
servers:
  - url: https://api.mezmo.com/v3
security:
  - PipelineServiceKey: []
tags:
  - name: Internal
    description: Routes not accessible by outside users
  - name: Experimental
    description: Experimental routes, not intended for public consumption
  - name: Account
    description: Perform account level actions
  - name: Alerting
    description: API to control alerts on pipelines
  - name: Data Classification & Profiling
    description: API for classifying and profiling data
  - name: Edge - Local Deploy
    description: User routes that are available to use with local Edge instances
  - name: Incident Mode
    description: Change or read state of pipeline (incident mode on/off)
  - name: Log Volume Reduction
    description: CRUD operations for log volume reduction
  - name: Metrics
    description: Usage metrics for pipelines
  - name: Pipeline Export
    description: Export pipeline to terraform
  - name: Pipeline Management
    description: CRUD Operations for pipeline
  - name: Pipeline Nodes
    description: CRUD operations for sources, processors, and destinations
  - name: Processor Groups
    description: CRUD operations for Processor Groups
  - name: Shared Sources
    description: Create and manage sources for use across multiple pipelines
  - name: Sampling and Simulation
    description: >-
      Create samples of data and run them through a simulated pipeline without
      affecting your published pipeline
externalDocs:
  url: https://docs.mezmo.com/pipeline-api
paths:
  /pipeline/{pipeline_id}/usage-threshold-alert/{usage_threshold_alert_id}:
    put:
      tags:
        - Alerting
      summary: Update threshold alert
      description: Replace an existing usage alert with this one
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: pipeline_id
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              allOf:
                - if:
                    allOf:
                      - type: object
                        properties:
                          no_data:
                            not:
                              enum:
                                - true
                      - type: object
                        properties:
                          percent_decrease:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                      - type: object
                        properties:
                          percent_increase:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                  then:
                    properties:
                      threshold_bytes:
                        type: number
                        minimum: 1
                        errorMessage:
                          minimum: must be greater than or equal to 1
                    required:
                      - threshold_bytes
                - if:
                    allOf:
                      - type: object
                        properties:
                          no_data:
                            not:
                              enum:
                                - true
                      - type: object
                        properties:
                          percent_increase:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                      - type: object
                        properties:
                          threshold_bytes:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                  then:
                    properties:
                      percent_decrease:
                        type: number
                        minimum: 1
                        errorMessage:
                          minimum: must be greater than or equal to 1
                    required:
                      - percent_decrease
                - if:
                    allOf:
                      - type: object
                        properties:
                          no_data:
                            not:
                              enum:
                                - true
                      - type: object
                        properties:
                          percent_decrease:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                      - type: object
                        properties:
                          threshold_bytes:
                            anyOf:
                              - enum:
                                  - 0
                              - type: 'null'
                  then:
                    properties:
                      percent_increase:
                        type: number
                        minimum: 1
                        errorMessage:
                          minimum: must be greater than or equal to 1
                    required:
                      - percent_increase
              properties:
                data_window:
                  type: object
                  additionalProperties: false
                  title: Data period options
                  properties:
                    value: 4c878561-6887-48ec-92ea-ec18175cc4b4
                    unit: 6d676da9-ce7c-48a2-90c0-4c5f2383876a
                  if:
                    properties:
                      unit:
                        title: Data period unit
                        enum:
                          - minute
                    required:
                      - unit
                  then:
                    properties:
                      value:
                        type: number
                        title: Data period value
                        minimum: 5
                    required:
                      - value
                  required:
                    - value
                    - unit
                max_daily_notifications: 8e4e8baa-d0da-4dfc-9f19-2bbc0d103a52
                no_data:
                  type: boolean
                percent_decrease: 15574367-d3ff-4cb7-bbaf-286870818023
                percent_increase: 9249b562-c34a-4d5f-9c03-879de2eb894e
                threshold_bytes: 58c6e498-22b5-463c-946c-ad9bba001750
                title: 68361823-727c-4519-b8a3-2df2cc4648c9
                traffic_type: c21c31f1-aaba-4198-b0b0-e12c3333a269
                alert_channels: 311f781d-220c-49f1-abba-e2d962f1e0b8
              required:
                - traffic_type
                - alert_channels
        required: true
      responses:
        '200':
          description: Default Response
components:
  securitySchemes:
    PipelineServiceKey:
      type: apiKey
      name: Authorization
      in: header
      description: 'Enter your token in the format: Token mytokengoeshere'

````