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

# CreateLogScaleAlert



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json POST /api/v1/config/log-scale-alerts
openapi: 3.0.3
info:
  description: >

    The Config API provides standard HTTP/JSON REST endpoints for creating,
    reading,

    updating, deleting, and listing configurable Chronosphere resources.


    Use this link to download the raw Swagger specification:

    <a href="/api/v1/config/swagger.json">/api/v1/config/swagger.json</a>
  title: Config V1 API
  version: v1
servers:
  - url: https://{tenant}.chronosphere.io
    variables:
      tenant:
        default: tenant
        description: tenant ID assigned by the service provider
security:
  - ApiKeyAuth: []
tags:
  - name: ConfigV1
paths:
  /api/v1/config/log-scale-alerts:
    post:
      tags:
        - LogScaleAlert
      operationId: CreateLogScaleAlert
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/configv1CreateLogScaleAlertRequest'
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1CreateLogScaleAlertResponse'
          description: A successful response containing the created LogScaleAlert.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: Cannot create the LogScaleAlert because the request is invalid.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: >-
            Cannot create the LogScaleAlert because there is a conflict with an
            existing LogScaleAlert.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: An unexpected error response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/genericError'
          description: An undefined error response.
components:
  schemas:
    configv1CreateLogScaleAlertRequest:
      properties:
        dry_run:
          description: >-
            If `true`, validates the specified configuration without creating
            the LogScaleAlert. If the specified configuration is valid, the
            endpoint returns a partial response without the LogScaleAlert. If
            the specified configuration is invalid, the endpoint returns an
            error.
          type: boolean
        log_scale_alert:
          allOf:
            - $ref: '#/components/schemas/configv1LogScaleAlert'
          description: The LogScaleAlert to create.
      type: object
    configv1CreateLogScaleAlertResponse:
      properties:
        log_scale_alert:
          $ref: '#/components/schemas/configv1LogScaleAlert'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1LogScaleAlert:
      properties:
        alert_type:
          allOf:
            - $ref: '#/components/schemas/LogScaleAlertAlertType'
          description: >-
            Type of alert, which can be standard or filter. A standard alert is
            triggered by

            an aggregate result. A filter alert is triggered by single event.
        created_at:
          description: >-
            Timestamp of when the LogScaleAlert was created. Cannot be set by
            clients.
          format: date-time
          readOnly: true
          type: string
        description:
          description: Description of the alert.
          type: string
        disabled:
          description: Flag indicating whether the alert is disabled.
          type: boolean
        log_scale_action_slugs:
          description: >-
            Slugs of LogScale actions that will receive the alerts. When the
            value is empty

            this alert won't trigger. Optional.
          items:
            type: string
          type: array
        log_scale_query:
          description: LogScale query to execute.
          example: level = ERROR | severity > 3 | count(as=numErrors) | numErrors > 500
          type: string
        name:
          description: Name of the alert.
          type: string
        repository:
          description: Name of LogScale repository the alerts belongs to. Required.
          type: string
        run_as_user:
          description: Email of the user that the alert runs on behalf of. Required.
          type: string
        slug:
          description: >-
            The unique identifier of the LogScaleAlert. If a `slug` isn't
            provided, one is generated based on the `name` field. You can't
            modify this field after the LogScaleAlert is created.
          type: string
        tags:
          description: Tags attached to the alert.
          items:
            type: string
          type: array
        throttle_field:
          description: Field to throttle on. Optional.
          type: string
        throttle_secs:
          description: >-
            Throttle time in seconds. The alert is triggered at most once per
            throttle period.
          format: int32
          type: integer
        time_window_secs:
          description: >-
            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.
          example: '3600'
          format: int32
          type: integer
        updated_at:
          description: >-
            Timestamp of when the LogScaleAlert was last updated. Cannot be set
            by clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - name
      type: object
    LogScaleAlertAlertType:
      enum:
        - STANDARD
        - FILTER
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````