Amazon CloudWatch Cloudwatch Anomaly Detector API

The Cloudwatch Anomaly Detector API from Amazon CloudWatch — 3 operation(s) for cloudwatch anomaly detector.

GitHub OpenAPI
Business capability
Observability Management BC-4220.20

Operations 3

POST /#DeleteAnomalyDetector Delete Anomaly Detector #
POST /#DescribeAnomalyDetectors Describe Anomaly Detectors #
POST /#PutAnomalyDetector Put Anomaly Detector #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-cloudwatch:amazon-cloudwatch-anomaly-detector-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-cloudwatch-anomaly-detector-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon CloudWatch Anomaly Detector API
  version: '2010-08-01'
  description: Generated from AWS's published Smithy model for Amazon CloudWatch. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://monitoring.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#DeleteAnomalyDetector:
    post:
      operationId: DeleteAnomalyDetector
      summary: Delete Anomaly Detector
      description: Deletes the specified anomaly detection model from your account. For more information about how to delete
        an anomaly detection model, see Deleting an anomaly detection model in the CloudWatch User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DeleteAnomalyDetectorOutput'
        '500':
          description: InternalServiceFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InternalServiceFault'
        '400':
          description: InvalidParameterCombinationException; InvalidParameterValueException; MissingRequiredParameterException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidParameterCombinationException'
        '404':
          description: ResourceNotFoundException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - GraniteServiceVersion20100801.DeleteAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/DeleteAnomalyDetectorInput'
      tags:
      - Anomaly Detector
  /#DescribeAnomalyDetectors:
    post:
      operationId: DescribeAnomalyDetectors
      summary: Describe Anomaly Detectors
      description: Lists the anomaly detection models that you have created in your account. For single metric anomaly detectors,
        you can list all of the models in your account or filter the results to only the models that are related to a certain
        namespace, metric name, or metric dimension. For metric math anomaly detectors, you can list them by adding METRIC_MATH
        to the AnomalyDetectorTypes array. This will return all metric math anomaly detectors in your account.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DescribeAnomalyDetectorsOutput'
        '500':
          description: InternalServiceFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InternalServiceFault'
        '400':
          description: InvalidNextToken; InvalidParameterCombinationException; InvalidParameterValueException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidNextToken'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - GraniteServiceVersion20100801.DescribeAnomalyDetectors
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/DescribeAnomalyDetectorsInput'
      tags:
      - Anomaly Detector
  /#PutAnomalyDetector:
    post:
      operationId: PutAnomalyDetector
      summary: Put Anomaly Detector
      description: Creates an anomaly detection model for a CloudWatch metric. You can use the model to display a band of
        expected normal values when the metric is graphed. If you have enabled unified cross-account observability, and this
        account is a monitoring account, the metric can be in the same account or a source account. You can specify the account
        ID in the object you specify in the SingleMetricAnomalyDetector parameter. For more information, see CloudWatch Anomaly
        Detection.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/PutAnomalyDetectorOutput'
        '500':
          description: InternalServiceFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InternalServiceFault'
        '400':
          description: InvalidParameterCombinationException; InvalidParameterValueException; LimitExceededException; MissingRequiredParameterException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidParameterCombinationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - GraniteServiceVersion20100801.PutAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/PutAnomalyDetectorInput'
      tags:
      - Anomaly Detector
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: monitoring
  schemas:
    AnomalyDetector:
      type: object
      properties:
        AnomalyDetectorId:
          type: string
          description: The unique identifier of the anomaly detector. The identifier does not restrict access to a specific
            anomaly detector in an IAM policy. Permissions for anomaly detector operations apply to all anomaly detectors
            in the account.
        Namespace:
          type: string
          description: The namespace of the metric associated with the anomaly detection model.
        MetricName:
          type: string
          description: The name of the metric associated with the anomaly detection model.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: The metric dimensions associated with the anomaly detection model.
        Stat:
          type: string
          description: The statistic associated with the anomaly detection model.
        Configuration:
          $ref: '#/components/schemas/AnomalyDetectorConfiguration'
        StateValue:
          type: string
          enum:
          - PENDING_TRAINING
          - TRAINED_INSUFFICIENT_DATA
          - TRAINED
          description: The current status of the anomaly detector's training.
        MetricCharacteristics:
          $ref: '#/components/schemas/MetricCharacteristics'
        SingleMetricAnomalyDetector:
          $ref: '#/components/schemas/SingleMetricAnomalyDetector'
        MetricMathAnomalyDetector:
          $ref: '#/components/schemas/MetricMathAnomalyDetector'
    AnomalyDetectorConfiguration:
      type: object
      properties:
        ExcludedTimeRanges:
          type: array
          items:
            $ref: '#/components/schemas/Range'
          description: An array of time ranges to exclude from use when the anomaly detection model is trained. Use this to
            make sure that events that could cause unusual values for the metric, such as deployments, aren't used when CloudWatch
            creates the model.
        MetricTimezone:
          type: string
          description: The time zone to use for the metric. This is useful to enable the model to automatically account for
            daylight savings time changes if the metric is sensitive to such time changes. To specify a time zone, use the
            name of the time zone as specified in the standard tz database. For more information, see tz database.
        AdaptationSpeed:
          type: string
          enum:
          - FAST
          - NORMAL
          - SLOW
          description: 'The speed at which the anomaly detection model adapts to sustained changes in the metric''s baseline.
            Faster adaptation lets the model track shifting workloads sooner, but increases the chance that the model treats
            a real, lasting change as normal. Valid values: FAST - The model adapts quickly to sustained changes in the baseline.
            NORMAL - The model adapts at a moderate pace. This is the default value. SLOW - The model adapts slowly, reducing
            the risk of treating a real change as normal.'
        OutlierFilteringStrength:
          type: string
          enum:
          - MINIMAL
          - MODERATE
          - STRICT
          description: 'The aggressiveness with which CloudWatch filters outliers from the metric data that the anomaly detection
            model uses. Stronger filtering excludes more extreme values, which can produce a tighter band of expected values
            but may also suppress legitimate spikes. Valid values: MINIMAL - Excludes only the most extreme outliers. MODERATE
            - Excludes a moderate range of outliers. This is the default value. STRICT - Excludes a wider range of outliers,
            which can suppress legitimate spikes.'
    DeleteAnomalyDetectorInput:
      type: object
      properties:
        AnomalyDetectorId:
          type: string
          description: Specifies the unique identifier of the anomaly detector to delete. If you specify this parameter, you
            do not need to specify a metric to identify the detector.
        Namespace:
          type: string
          description: The namespace associated with the anomaly detection model to delete.
        MetricName:
          type: string
          description: The metric name associated with the anomaly detection model to delete.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: The metric dimensions associated with the anomaly detection model to delete.
        Stat:
          type: string
          description: The statistic associated with the anomaly detection model to delete.
        SingleMetricAnomalyDetector:
          $ref: '#/components/schemas/SingleMetricAnomalyDetector'
        MetricMathAnomalyDetector:
          $ref: '#/components/schemas/MetricMathAnomalyDetector'
    DeleteAnomalyDetectorOutput:
      type: object
      properties: {}
    DescribeAnomalyDetectorsInput:
      type: object
      properties:
        AnomalyDetectorIds:
          type: array
          items:
            type: string
          description: Specifies the unique identifiers of the anomaly detectors to describe. You can specify up to 50 identifiers.
            If you specify this parameter, you cannot also specify the Namespace, MetricName, Dimensions, or AnomalyDetectorTypes
            metric filters.
        NextToken:
          type: string
          description: Use the token returned by the previous operation to request the next page of results.
        MaxResults:
          type: integer
          description: The maximum number of results to return in one operation. The maximum value that you can specify is
            100. To retrieve the remaining results, make another call with the returned NextToken value.
        Namespace:
          type: string
          description: Limits the results to only the anomaly detection models that are associated with the specified namespace.
        MetricName:
          type: string
          description: Limits the results to only the anomaly detection models that are associated with the specified metric
            name. If there are multiple metrics with this name in different namespaces that have anomaly detection models,
            they're all returned.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: Limits the results to only the anomaly detection models that are associated with the specified metric
            dimensions. If there are multiple metrics that have these dimensions and have anomaly detection models associated,
            they're all returned.
        AnomalyDetectorTypes:
          type: array
          items:
            type: string
            enum:
            - SINGLE_METRIC
            - METRIC_MATH
          description: The anomaly detector types to request when using DescribeAnomalyDetectorsInput. If empty, defaults
            to SINGLE_METRIC.
    DescribeAnomalyDetectorsOutput:
      type: object
      properties:
        AnomalyDetectors:
          type: array
          items:
            $ref: '#/components/schemas/AnomalyDetector'
          description: The list of anomaly detection models returned by the operation.
        NextToken:
          type: string
          description: A token that you can use in a subsequent operation to retrieve the next set of results.
    Dimension:
      type: object
      properties:
        Name:
          type: string
          description: The name of the dimension. Dimension names must contain only ASCII characters, must include at least
            one non-whitespace character, and cannot start with a colon (:). ASCII control characters are not supported as
            part of dimension names.
        Value:
          type: string
          description: The value of the dimension. Dimension values must contain only ASCII characters and must include at
            least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
      required:
      - Name
      - Value
    InternalServiceFault:
      type: object
      properties:
        Message:
          type: string
    InvalidNextToken:
      type: object
      properties:
        message:
          type: string
    InvalidParameterCombinationException:
      type: object
      properties:
        message:
          type: string
    Metric:
      type: object
      properties:
        Namespace:
          type: string
          description: The namespace of the metric.
        MetricName:
          type: string
          description: The name of the metric. This is a required field.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: The dimensions for the metric.
    MetricCharacteristics:
      type: object
      properties:
        PeriodicSpikes:
          type: boolean
          description: Set this parameter to true if values for this metric consistently include spikes that should not be
            considered to be anomalies. With this set to true, CloudWatch will expect to see spikes that occurred consistently
            during the model training period, and won't flag future similar spikes as anomalies.
    MetricDataQuery:
      type: object
      properties:
        Id:
          type: string
          description: A short name used to tie this object to the results in the response. This name must be unique within
            a single call to GetMetricData. If you are performing math expressions on this set of data, this name represents
            that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers,
            and underscore. The first character must be a lowercase letter.
        MetricStat:
          $ref: '#/components/schemas/MetricStat'
        Expression:
          type: string
          description: 'This field can contain either a Metrics Insights query, or a metric math expression to be performed
            on the returned data. For more information about Metrics Insights queries, see Metrics Insights query components
            and syntax in the Amazon CloudWatch User Guide. A math expression can use the Id of the other metrics or queries
            to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.
            For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch
            User Guide. Within each MetricDataQuery object, '
        Label:
          type: string
          description: A human-readable label for this metric or expression. This is especially useful if this is an expression,
            so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget,
            the label is shown. If Label is omitted, CloudWatch generates a default. You can put dynamic expressions into
            a label, so that it is more descriptive. For more information, see Using Dynamic Labels.
        ReturnData:
          type: boolean
          description: When used in GetMetricData, this option indicates whether to return the timestamps and raw data values
            of this metric. If you are performing this call just to do math expressions and do not also need the raw data
            returned, you can specify false. If you omit this, the default of true is used. When used in PutMetricAlarm, specify
            true for the one expression result to use as the alarm. For all other metrics and expressions in the same PutMetricAlarm
            operation, specify ReturnData as False.
        Period:
          type: integer
          description: The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period
            can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are
            collected at intervals of less than one minute, the period can be 1, 5, 10, 20, 30, 60, or any multiple of 60.
            High-resolution metrics are those metrics stored by a PutMetricData operation that includes a StorageResolution
            of 1 second.
        AccountId:
          type: string
          description: The ID of the account where the metrics are located. If you are performing a GetMetricData operation
            in a monitoring account, use this to specify which account to retrieve this metric from. If you are performing
            a PutMetricAlarm operation, use this to specify which account contains the metric that the alarm is watching.
      required:
      - Id
    MetricMathAnomalyDetector:
      type: object
      properties:
        MetricDataQueries:
          type: array
          items:
            $ref: '#/components/schemas/MetricDataQuery'
          description: An array of metric data query structures that enables you to create an anomaly detector based on the
            result of a metric math expression. Each item in MetricDataQueries gets a metric or performs a math expression.
            One item in MetricDataQueries is the expression that provides the time series that the anomaly detector uses as
            input. Designate the expression by setting ReturnData to true for this object in the array. For all other expressions
            and metrics, set ReturnData to false. The designated expression must return a single time series.
    MetricStat:
      type: object
      properties:
        Metric:
          $ref: '#/components/schemas/Metric'
        Period:
          type: integer
          description: The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period
            can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are
            collected at intervals of less than one minute, the period can be 1, 5, 10, 20, 30, 60, or any multiple of 60.
            High-resolution metrics are those metrics stored by a PutMetricData call that includes a StorageResolution of
            1 second. If the StartTime parameter specifies a time stamp that is greater than 3 hours ago, you must specify
            the period as follows or no data points in that time r
        Stat:
          type: string
          description: The statistic to return. It can include any CloudWatch statistic or extended statistic.
        Unit:
          type: string
          enum:
          - Seconds
          - Microseconds
          - Milliseconds
          - Bytes
          - Kilobytes
          - Megabytes
          - Gigabytes
          - Terabytes
          - Bits
          - Kilobits
          - Megabits
          - Gigabits
          - Terabits
          - Percent
          - Count
          - Bytes/Second
          - Kilobytes/Second
          - Megabytes/Second
          - Gigabytes/Second
          - Terabytes/Second
          - Bits/Second
          - Kilobits/Second
          - Megabits/Second
          - Gigabits/Second
          - Terabits/Second
          - Count/Second
          - None
          description: When you are using a Put operation, this defines what unit you want to use when storing the metric.
            In a Get operation, if you omit Unit then all data that was collected with any unit is returned, along with the
            corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation
            returns only data that was collected with that unit specified. If you specify a unit that does not match the data
            collected, the results of the operation are null. CloudWatch does not perform unit conversions.
      required:
      - Metric
      - Period
      - Stat
    PutAnomalyDetectorInput:
      type: object
      properties:
        Namespace:
          type: string
          description: The namespace of the metric to create the anomaly detection model for.
        MetricName:
          type: string
          description: The name of the metric to create the anomaly detection model for.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: The metric dimensions to create the anomaly detection model for.
        Stat:
          type: string
          description: The statistic to use for the metric and the anomaly detection model.
        Configuration:
          $ref: '#/components/schemas/AnomalyDetectorConfiguration'
        MetricCharacteristics:
          $ref: '#/components/schemas/MetricCharacteristics'
        SingleMetricAnomalyDetector:
          $ref: '#/components/schemas/SingleMetricAnomalyDetector'
        MetricMathAnomalyDetector:
          $ref: '#/components/schemas/MetricMathAnomalyDetector'
    PutAnomalyDetectorOutput:
      type: object
      properties:
        AnomalyDetectorId:
          type: string
          description: The unique identifier of the anomaly detector that you created or updated.
    Range:
      type: object
      properties:
        StartTime:
          type: string
          format: date-time
          description: The start time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59.
        EndTime:
          type: string
          format: date-time
          description: The end time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59.
      required:
      - StartTime
      - EndTime
    ResourceNotFoundException:
      type: object
      properties:
        ResourceType:
          type: string
        ResourceId:
          type: string
        Message:
          type: string
    SingleMetricAnomalyDetector:
      type: object
      properties:
        AccountId:
          type: string
          description: If the CloudWatch metric that provides the time series that the anomaly detector uses as input is in
            another account, specify that account ID here. If you omit this parameter, the current account is used.
        Namespace:
          type: string
          description: The namespace of the metric to create the anomaly detection model for.
        MetricName:
          type: string
          description: The name of the metric to create the anomaly detection model for.
        Dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
          description: The metric dimensions to create the anomaly detection model for.
        Stat:
          type: string
          description: The statistic to use for the metric and anomaly detection model.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/cloudwatch/service/2010-08-01/cloudwatch-2010-08-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)