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

# Get Simple Event Statistics

> Retrieves event statistics per given dimension of a request characteristics. A WAAP _Event_ represents a request observed by the system. The report contains the total, blocked, suppressed, and allowed event counts for top ten points in the selected dimension.



## OpenAPI

````yaml /api-reference/services_documented/waap_api.yaml get /waap/v1/analytics/stats/{dimension}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – WAAP API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: WAAP Service
    x-displayName: WAAP Service
  - name: Domains
    x-displayName: Domains
  - name: Policies
    x-displayName: Policies
  - name: Analytics
    x-displayName: Analytics
  - name: Custom Page Sets
    x-displayName: Custom Page Sets
  - name: Custom Rules
    x-displayName: Custom Rules
  - name: Filter Templates
    x-displayName: Filter Templates
  - name: Firewall Rules
    x-displayName: Firewall Rules
  - name: Advanced Rules
    x-displayName: Advanced Rules
  - name: Tags
    x-displayName: Tags
  - name: Network Organizations
    x-displayName: Network Organizations
  - name: API Discovery
    x-displayName: API Discovery
  - name: IP Spotlight
    x-displayName: IP Spotlight
  - name: Security Insights
    x-displayName: Security Insights
  - name: IP Reputation
    x-displayName: IP Reputation
paths:
  /waap/v1/analytics/stats/{dimension}:
    get:
      tags:
        - Analytics
      summary: Get Simple Event Statistics
      description: >-
        Retrieves event statistics per given dimension of a request
        characteristics. A WAAP _Event_ represents a request observed by the
        system. The report contains the total, blocked, suppressed, and allowed
        event counts for top ten points in the selected dimension.
      operationId: get_simple_event_statistics_v1_analytics_stats__dimension__get
      parameters:
        - name: dimension
          in: path
          required: true
          schema:
            enum:
              - country
              - rule
              - org
              - ip
              - useragent
              - target
            type: string
            description: A request characteristics dimension
            title: Dimension
          description: A request characteristics dimension
        - name: domains
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
              exclusiveMinimum: 0
              description: Domain ID
            description: >-
              List of domain IDs. Empty list means all domains belonging to the
              current account.
            example:
              - 1
              - 2
              - 3
            examples:
              - - 1
                - 2
                - 3
            title: Domains
          description: >-
            List of domain IDs. Empty list means all domains belonging to the
            current account.
        - name: start
          in: query
          required: true
          schema:
            type: string
            description: >-
              Filter data items starting from a specified date in ISO 8601
              format
            example: '2024-04-13T00:00:00+01:00'
            examples:
              - '2024-04-13T00:00:00+01:00'
            title: Start
          description: Filter data items starting from a specified date in ISO 8601 format
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter data items up to a specified end date in ISO 8601 format.
              If not provided, defaults to the current date and time.
            examples:
              - '2024-04-14T12:00:00Z'
            title: End
          description: >-
            Filter data items up to a specified end date in ISO 8601 format. If
            not provided, defaults to the current date and time.
        - name: ips
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: ipvanyaddress
            maxItems: 10
            description: Filter statistics by client IP addresses (max 10).
            example:
              - 1.2.3.4
              - 2001:678:194::3c25:ddad
            examples:
              - - 1.2.3.4
                - 2001:678:194::3c25:ddad
            title: Ips
          description: Filter statistics by client IP addresses (max 10).
        - name: security_rule_names
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
              pattern: ^[a-zA-Z0-9_ ~!@#$%^&*()+\[\]{}|.,;:<>?/-]*$
            description: Filter data by name of a security rule matched the request.
            example:
              - SQL injection
            examples:
              - - SQL injection
            title: Security Rule Names
          description: Filter data by name of a security rule matched the request.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleEventStatistics'
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: http-bad-request
                title: Bad Request
                status: 400
                detail: 'Invalid domain name: '''''''''
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              example:
                detail: Auth token is missing or invalid
        '403':
          description: Unauthenticated
          content:
            application/problem+json:
              example:
                detail: Permission denied
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: http-not-found
                title: Not Found
                status: 404
                detail: The resource is not found
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APICompositeError'
              example:
                type: request-validation-failed
                title: Request validation error.
                status: 422
                detail: One or more fields have validation errors.
                errors:
                  - loc:
                      - body
                      - name
                    detail: Input should be a valid string
                  - loc:
                      - body
                      - date
                    detail: Field required
                  - loc:
                      - query
                      - limit
                    detail: Field required
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: internal-server-error
                title: Internal server error.
                status: 500
                detail: >-
                  An unexpected condition was encountered which prevented the
                  server from fulfilling the request.
          description: Internal Server Error
      x-codeSamples:
        - lang: Python
          source: >-
            import os

            from gcore import Gcore


            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )

            waap_simple_event_statistics =
            client.waap.analytics.get_event_statistics(
                dimension="country",
                start="2024-04-13T00:00:00+01:00",
            )

            print(waap_simple_event_statistics.allowed)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n\t\"github.com/G-Core/gcore-go/waap\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\twaapSimpleEventStatistics, err := client.Waap.Analytics.GetEventStatistics(\n\t\tcontext.TODO(),\n\t\twaap.AnalyticsGetEventStatisticsParamsDimensionCountry,\n\t\twaap.AnalyticsGetEventStatisticsParams{\n\t\t\tStart: \"2024-04-13T00:00:00+01:00\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", waapSimpleEventStatistics.Allowed)\n}\n"
components:
  schemas:
    SimpleEventStatistics:
      properties:
        total:
          items:
            prefixItems:
              - type: string
              - type: integer
            type: array
            maxItems: 2
            minItems: 2
          type: array
          title: Total
          description: >-
            Total number of observed requests. First element of the tuple is a
            key, the second one is its counter value. The key refers to a point
            in the requested dimension (e.g., an IP address). Results are
            ordered by the counter value in descending order.
          example:
            - - 1.2.3.4
              - 100000
            - - 5.6.7.8
              - 80000
          examples:
            - - - 1.2.3.4
                - 100000
              - - 5.6.7.8
                - 80000
        blocked:
          items:
            prefixItems:
              - type: string
              - type: integer
            type: array
            maxItems: 2
            minItems: 2
          type: array
          title: Blocked
          description: >-
            Number of blocked request events, with the same keys and formatted
            the same as in the total field.
          example:
            - - 1.2.3.4
              - 2000
            - - 5.6.7.8
              - 1000
          examples:
            - - - 1.2.3.4
                - 2000
              - - 5.6.7.8
                - 1000
        suppressed:
          items:
            prefixItems:
              - type: string
              - type: integer
            type: array
            maxItems: 2
            minItems: 2
          type: array
          title: Suppressed
          description: >-
            Number of requests observed in monitoring mode that would have been
            blocked otherwise.
          example:
            - - 1.2.3.4
              - 1500
            - - 5.6.7.8
              - 1100
          examples:
            - - - 1.2.3.4
                - 1500
              - - 5.6.7.8
                - 1100
        allowed:
          items:
            prefixItems:
              - type: string
              - type: integer
            type: array
            maxItems: 2
            minItems: 2
          type: array
          title: Allowed
          description: Number of requests passed due to a permissive security rule.
          example:
            - - 1.2.3.4
              - 1000
            - - 5.6.7.8
              - 900
          examples:
            - - - 1.2.3.4
                - 1000
              - - 5.6.7.8
                - 900
        reference:
          anyOf:
            - additionalProperties:
                anyOf:
                  - $ref: '#/components/schemas/IPReference'
                  - $ref: '#/components/schemas/DomainReference'
              type: object
            - type: 'null'
          title: Reference
          description: >-
            Additional information, depending on the selected dimension. Keys
            refer to the items in the result (first value of a tuple).
          examples:
            - 1.2.3.4:
                country: SG
                org: Singapore Networks
            - example.com:
                domain_id: 19151
      type: object
      required:
        - total
        - blocked
        - suppressed
        - allowed
        - reference
      title: SimpleEventStatistics
      description: A collection of event counts per dimension values over a time span.
    APIError:
      properties:
        type:
          type: string
          title: Type
          description: A URI identifier that categorizes the type of error.
        title:
          type: string
          title: Title
          description: A brief, human-readable title for the error.
        status:
          type: integer
          title: Status
          description: The HTTP status code applicable to this error.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: A detailed human-readable explanation of the error.
      type: object
      required:
        - type
        - title
        - status
        - detail
      title: APIError
    APICompositeError:
      properties:
        type:
          type: string
          title: Type
          description: A URI identifier that categorizes the type of error.
        title:
          type: string
          title: Title
          description: A brief, human-readable title for the error.
        status:
          type: integer
          title: Status
          description: The HTTP status code applicable to this error.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: A detailed human-readable explanation of the error.
        errors:
          items:
            $ref: '#/components/schemas/APIFieldError'
          type: array
          title: Errors
          description: A list of detailed errors for individual fields.
      type: object
      required:
        - type
        - title
        - status
        - detail
        - errors
      title: APICompositeError
    IPReference:
      properties:
        country:
          type: string
          title: Country
        org:
          type: string
          title: Org
      type: object
      required:
        - country
        - org
      title: IPReference
    DomainReference:
      properties:
        domain_id:
          type: integer
          title: Domain Id
      type: object
      required:
        - domain_id
      title: DomainReference
    APIFieldError:
      properties:
        loc:
          anyOf:
            - items:
                anyOf:
                  - type: integer
                  - type: string
              type: array
            - {}
          title: Loc
          description: The location of the field or a character number causing the error.
        detail:
          type: string
          title: Detail
          description: A human-readable message describing the error.
      type: object
      required:
        - loc
        - detail
      title: APIFieldError
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````