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

# Get security events

> Retrieve security events over account's domains.
A security event is recorded for every request passing through WAAP towards the origin server.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/waap_api.yaml get /waap/v2/analytics/events
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.
  contact:
    email: support@gcore.com
  version: 1c5aafec33f3
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: API Discovery
  - name: Advanced Rules
  - name: Analytics
  - name: Custom Page Sets
  - name: Custom Rules
  - name: Domains
  - name: Filter Templates
  - name: Firewall Rules
  - name: IP Reputation
  - name: IP Spotlight
  - name: Network Organizations
  - name: Policies
  - name: Policy Overrides
  - name: Pre-billing
  - name: Security Insights
  - name: Tags
  - name: WAAP Service
paths:
  /waap/v2/analytics/events:
    get:
      tags:
        - Analytics
      summary: Get security events
      description: >-
        Retrieve security events over account's domains.

        A security event is recorded for every request passing through WAAP
        towards the origin server.
      operationId: get_events_v2_analytics_events_get
      parameters:
        - 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: has_policy_override
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              True selects events with applied overrides; false excludes them.
              Omit to include both.
            title: Has Policy Override
          description: >-
            True selects events with applied overrides; false excludes them.
            Omit to include both.
        - name: order_by
          in: query
          required: false
          schema:
            enum:
              - request_time.asc
              - request_time.desc
            type: string
            description: Result sorting order.
            example: request_time.asc
            examples:
              - request_time.asc
              - request_time.desc
            default: request_time.desc
            title: Order By
          description: Result sorting order.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of items to return
            default: 100
            title: Limit
          description: Number of items to return
        - name: next
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Cursor value to fetch next page of events log.
            title: Next
          description: Cursor value to fetch next page of events log.
        - 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 traffic data by client IP.
            example:
              - 1.2.3.4
              - 2001:678:194::3c25:ddad
            examples:
              - - 1.2.3.4
                - 2001:678:194::3c25:ddad
            title: Ips
          description: Filter traffic data by client IP.
        - name: path
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: Filter by URL path. '*' is wildcard.
            example:
              - /home
              - /users/*/profile
            examples:
              - - /home
                - /users/*/profile
            title: Path
          description: Filter by URL path. '*' is wildcard.
        - name: countries
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^\w{2}$
            description: >-
              Filter data by a country code of the originating IP address in ISO
              3166-1 alpha-2 format.
            example:
              - DE
              - MY
            examples:
              - - DE
                - MY
            title: Countries
          description: >-
            Filter data by a country code of the originating IP address in ISO
            3166-1 alpha-2 format.
        - name: asns
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
              maximum: 4294967295
              minimum: 1
            maxItems: 10
            description: >-
              Filter data by the ASN (Autonomous System Number) of the
              originating IP address. Not supported by `/v1/analytics/requests`.
            example:
              - 15169
              - 13335
            examples:
              - - 15169
                - 13335
            title: Asns
          description: >-
            Filter data by the ASN (Autonomous System Number) of the originating
            IP address. Not supported by `/v1/analytics/requests`.
        - name: status_codes
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
              maximum: 599
              minimum: 100
            description: Filter data by HTTP response status code.
            example:
              - '403'
              - '499'
            examples:
              - - '403'
                - '499'
            title: Status Codes
          description: Filter data by HTTP response status code.
        - name: http_methods
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/HttpMethodType'
            description: Filter by HTTP methods
            example:
              - GET
              - HEAD
            examples:
              - - GET
                - HEAD
            title: Http Methods
          description: Filter by HTTP methods
        - name: reference_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}$
            description: Filter data by reference IDs.
            example:
              - 1140fcddf208cbdf01694e8e2f818a68
            examples:
              - - 1140fcddf208cbdf01694e8e2f818a68
            title: Reference Ids
          description: Filter data by reference IDs.
        - name: request_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}-[0-9]{6}$
            description: Filter data by request IDs.
            example:
              - 96763b8fb655e9f18a2e04097b704e39-458959
            examples:
              - - 96763b8fb655e9f18a2e04097b704e39-458959
            title: Request Ids
          description: Filter data by request IDs.
        - name: exclude_request_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}-[0-9]{6}$
            description: Exclude data by request IDs.
            example:
              - 96763b8fb655e9f18a2e04097b704e39-458959
            examples:
              - - 96763b8fb655e9f18a2e04097b704e39-458959
            title: Exclude Request Ids
          description: Exclude data by request IDs.
        - name: session_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}$
            description: Filter data by session IDs.
            example:
              - edab69d73b47cfecc3d3c038ada6c7de
            examples:
              - - edab69d73b47cfecc3d3c038ada6c7de
            title: Session Ids
          description: Filter data by session IDs.
        - 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.
        - name: decision
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/EventDecision'
              description: Filter data by the event decision.
            description: Filter data by decision.
            example:
              - allowed
              - blocked
            examples:
              - - allowed
                - blocked
            title: Decision
          description: Filter data by decision.
        - name: optional_action
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/OptionalAction'
              description: >-
                An optional action that may be applied in addition to the
                primary decision.
            description: Filter data by optional action.
            example:
              - captcha
              - challenge
            examples:
              - - captcha
                - challenge
            title: Optional Action
          description: Filter data by optional action.
        - name: exclude_ips
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: ipvanyaddress
            description: Exclude traffic data by client IP.
            example:
              - 1.2.3.4
              - 2001:678:194::3c25:ddad
            examples:
              - - 1.2.3.4
                - 2001:678:194::3c25:ddad
            title: Exclude Ips
          description: Exclude traffic data by client IP.
        - name: exclude_countries
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^\w{2}$
            description: >-
              Exclude data by a country code of the originating IP address in
              ISO 3166-1 alpha-2 format.
            example:
              - DE
              - MY
            examples:
              - - DE
                - MY
            title: Exclude Countries
          description: >-
            Exclude data by a country code of the originating IP address in ISO
            3166-1 alpha-2 format.
        - name: exclude_asns
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
              maximum: 4294967295
              minimum: 1
            maxItems: 10
            description: >-
              Exclude data by the ASN (Autonomous System Number) of the
              originating IP address. Not supported by `/v1/analytics/requests`.
            example:
              - 15169
              - 13335
            examples:
              - - 15169
                - 13335
            title: Exclude Asns
          description: >-
            Exclude data by the ASN (Autonomous System Number) of the
            originating IP address. Not supported by `/v1/analytics/requests`.
        - name: exclude_session_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}$
            description: Exclude data by session IDs.
            title: Exclude Session Ids
          description: Exclude data by session IDs.
        - name: exclude_reference_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[a-f0-9]{32}$
            description: Exclude data by reference IDs.
            title: Exclude Reference Ids
          description: Exclude data by reference IDs.
        - name: exclude_security_rule_names
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
              pattern: ^[a-zA-Z0-9_ ~!@#$%^&*()+\[\]{}|.,;:<>?/-]*$
            description: Exclude data by name of a security rule matched the request.
            example:
              - SQL injection
            examples:
              - - SQL injection
            title: Exclude Security Rule Names
          description: Exclude data by name of a security rule matched the request.
        - name: exclude_domains
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
            description: Exclude data by domain ID.
            title: Exclude Domains
          description: Exclude data by domain ID.
        - name: ja3
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{32}$
            maxItems: 10
            description: >-
              Filter by JA3 TLS client fingerprint. Each value must be exactly
              32 hexadecimal characters, mixed case allowed, normalized to
              lowercase. Supply multiple values to match any of them. Omit the
              parameter to apply no JA3 filter.
            example:
              - e7d705a3286e19ea42f587b344ee6865
            examples:
              - - e7d705a3286e19ea42f587b344ee6865
            title: Ja3
          description: >-
            Filter by JA3 TLS client fingerprint. Each value must be exactly 32
            hexadecimal characters, mixed case allowed, normalized to lowercase.
            Supply multiple values to match any of them. Omit the parameter to
            apply no JA3 filter.
        - name: ja4
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-zA-Z]{10}_[0-9a-fA-F]{12}_[0-9a-fA-F]{12}$
            maxItems: 10
            description: >-
              Filter by JA4 TLS client fingerprint. When present, the value must
              match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character
              prefix and two 12-character hexadecimal hashes, mixed case
              allowed, normalized to lowercase). Supply multiple values to match
              any of them. Omit the parameter entirely to apply no JA4 filter.
            example:
              - t13d3113h2_e8f1e7e78f70_ce5650b735ce
            examples:
              - - t13d3113h2_e8f1e7e78f70_ce5650b735ce
            title: Ja4
          description: >-
            Filter by JA4 TLS client fingerprint. When present, the value must
            match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix
            and two 12-character hexadecimal hashes, mixed case allowed,
            normalized to lowercase). Supply multiple values to match any of
            them. Omit the parameter entirely to apply no JA4 filter.
        - name: user_agent
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 300
            maxItems: 10
            description: >-
              Include entries whose user agent contains any of the supplied
              texts, case-insensitive partial match. Omit or provide an empty
              list to apply no user agent text filter.
            example:
              - Mozilla/5.0
              - python-requests
            examples:
              - - Mozilla/5.0
                - python-requests
            title: User Agent
          description: >-
            Include entries whose user agent contains any of the supplied texts,
            case-insensitive partial match. Omit or provide an empty list to
            apply no user agent text filter.
        - name: user_agent_clients
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 10
            description: >-
              Include entries whose parsed user agent client exactly equals any
              supplied value. Omit or provide an empty list to apply no user
              agent client filter.
            example:
              - Chrome
              - Firefox
            examples:
              - - Chrome
                - Firefox
            title: User Agent Clients
          description: >-
            Include entries whose parsed user agent client exactly equals any
            supplied value. Omit or provide an empty list to apply no user agent
            client filter.
        - name: user_agent_devices
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 10
            description: >-
              Include entries whose parsed user agent device exactly equals any
              supplied value. Omit or provide an empty list to apply no user
              agent device filter.
            example:
              - mac
              - Nokia
              - PlayStation
            examples:
              - - mac
                - Nokia
                - PlayStation
            title: User Agent Devices
          description: >-
            Include entries whose parsed user agent device exactly equals any
            supplied value. Omit or provide an empty list to apply no user agent
            device filter.
        - name: tags
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 5
            description: >-
              Include entries whose tag exactly equals any supplied value. Omit
              or provide an empty list to apply no tag filter.
            example:
              - evasiveclient
              - injectionattack
            examples:
              - - evasiveclient
                - injectionattack
            title: Tags
          description: >-
            Include entries whose tag exactly equals any supplied value. Omit or
            provide an empty list to apply no tag filter.
        - name: organizations
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
            maxItems: 10
            description: >-
              Include entries whose organization exactly equals any supplied
              value. Omit or provide an empty list to apply no organization
              filter.
            example:
              - Example Org
              - Acme Corp
            examples:
              - - Example Org
                - Acme Corp
            title: Organizations
          description: >-
            Include entries whose organization exactly equals any supplied
            value. Omit or provide an empty list to apply no organization
            filter.
        - name: exclude_user_agent
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 300
            maxItems: 10
            description: >-
              Exclude entries whose user agent contains any of the supplied
              texts, case-insensitive partial match. Omit or provide an empty
              list to apply no user agent text exclusion.
            example:
              - python-requests
              - bot
            examples:
              - - python-requests
                - bot
            title: Exclude User Agent
          description: >-
            Exclude entries whose user agent contains any of the supplied texts,
            case-insensitive partial match. Omit or provide an empty list to
            apply no user agent text exclusion.
        - name: exclude_user_agent_clients
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 10
            description: >-
              Exclude entries whose parsed user agent client exactly equals any
              supplied value. Omit or provide an empty list to apply no user
              agent client exclusion.
            example:
              - OpenAI GPTBot
              - Uptimerobot
            examples:
              - - OpenAI GPTBot
                - Uptimerobot
            title: Exclude User Agent Clients
          description: >-
            Exclude entries whose parsed user agent client exactly equals any
            supplied value. Omit or provide an empty list to apply no user agent
            client exclusion.
        - name: exclude_user_agent_devices
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 10
            description: >-
              Exclude entries whose parsed user agent device exactly equals any
              supplied value. Omit or provide an empty list to apply no user
              agent device exclusion.
            example:
              - SMART TV
            examples:
              - - SMART TV
            title: Exclude User Agent Devices
          description: >-
            Exclude entries whose parsed user agent device exactly equals any
            supplied value. Omit or provide an empty list to apply no user agent
            device exclusion.
        - name: exclude_ja3
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{32}$
            maxItems: 10
            description: >-
              Exclude entries whose JA3 TLS client fingerprint matches any of
              the supplied values. Each value must be exactly 32 hexadecimal
              characters, mixed case allowed, normalized to lowercase. Supply
              multiple values to exclude any of them. Omit the parameter to
              apply no JA3 exclusion.
            example:
              - e7d705a3286e19ea42f587b344ee6865
            examples:
              - - e7d705a3286e19ea42f587b344ee6865
            title: Exclude Ja3
          description: >-
            Exclude entries whose JA3 TLS client fingerprint matches any of the
            supplied values. Each value must be exactly 32 hexadecimal
            characters, mixed case allowed, normalized to lowercase. Supply
            multiple values to exclude any of them. Omit the parameter to apply
            no JA3 exclusion.
        - name: exclude_ja4
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-zA-Z]{10}_[0-9a-fA-F]{12}_[0-9a-fA-F]{12}$
            maxItems: 10
            description: >-
              Exclude entries whose JA4 TLS client fingerprint equals any of the
              supplied values. An item must match the JA4 form
              `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two
              12-character hexadecimal hashes, mixed case allowed, normalized to
              lowercase). Omit the parameter to apply no JA4 exclusion.
            example:
              - t13d3113h2_e8f1e7e78f70_ce5650b735ce
            examples:
              - - t13d3113h2_e8f1e7e78f70_ce5650b735ce
            title: Exclude Ja4
          description: >-
            Exclude entries whose JA4 TLS client fingerprint equals any of the
            supplied values. An item must match the JA4 form
            `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two
            12-character hexadecimal hashes, mixed case allowed, normalized to
            lowercase). Omit the parameter to apply no JA4 exclusion.
        - name: exclude_tags
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 50
            maxItems: 5
            description: >-
              Exclude entries whose tag exactly equals any supplied value. Omit
              or provide an empty list to apply no tag exclusion.
            example:
              - mousedevice
            examples:
              - - mousedevice
            title: Exclude Tags
          description: >-
            Exclude entries whose tag exactly equals any supplied value. Omit or
            provide an empty list to apply no tag exclusion.
        - name: exclude_organizations
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              maxLength: 100
            maxItems: 10
            description: >-
              Exclude entries whose organization exactly equals any supplied
              value. Omit or provide an empty list to apply no organization
              exclusion.
            example:
              - Acme corp
            examples:
              - - Acme corp
            title: Exclude Organizations
          description: >-
            Exclude entries whose organization exactly equals any supplied
            value. Omit or provide an empty list to apply no organization
            exclusion.
        - name: exclude_status_codes
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
              maximum: 599
              minimum: 100
            description: Exclude entries with any of the given HTTP response status codes.
            example:
              - '500'
              - '501'
            examples:
              - - '500'
                - '501'
            title: Exclude Status Codes
          description: Exclude entries with any of the given HTTP response status codes.
        - name: exclude_http_methods
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/HttpMethodType'
            description: Exclude entries with any of the given HTTP methods.
            example:
              - POST
              - PUT
            examples:
              - - POST
                - PUT
            title: Exclude Http Methods
          description: Exclude entries with any of the given HTTP methods.
        - name: exclude_optional_action
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/OptionalAction'
              description: >-
                An optional action that may be applied in addition to the
                primary decision.
            description: >-
              Exclude entries that match any of the given optional action
              values.
            example:
              - captcha
              - challenge
            examples:
              - - captcha
                - challenge
            title: Exclude Optional Action
          description: Exclude entries that match any of the given optional action values.
        - name: exclude_decision
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/EventDecision'
              description: Decision applied to a request.
            description: Exclude entries that match any of the given decisions.
            example:
              - allowed
              - blocked
            examples:
              - - allowed
                - blocked
            title: Exclude Decision
          description: Exclude entries that match any of the given decisions.
        - name: exclude_path
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: >-
              Exclude entries that match the given URL path pattern; '*' is
              wildcard.
            example:
              - /home
              - /users/*/profile
            examples:
              - - /home
                - /users/*/profile
            title: Exclude Path
          description: >-
            Exclude entries that match the given URL path pattern; '*' is
            wildcard.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEventsResponse'
        '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
            )
            page = client.waap.analytics.get_events(
                start="2024-04-13T00:00:00+01:00",
            )
            page = page.results[0]
            print(page.id)
        - 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\tpage, err := client.Waap.Analytics.GetEvents(context.TODO(), waap.AnalyticsGetEventsParams{\n\t\tStart: \"2024-04-13T00:00:00+01:00\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
components:
  schemas:
    HttpMethodType:
      type: string
      enum:
        - DELETE
        - GET
        - HEAD
        - OPTIONS
        - PATCH
        - POST
        - PUT
        - TRACE
      title: HttpMethodType
      description: An HTTP method of a request.
    EventDecision:
      type: string
      enum:
        - blocked
        - monitored
        - allowed
        - passed
      title: EventDecision
      description: >-
        The decision made for processing a request through the WAAP.


        - BLOCKED: Traffic that was directly blocked by security policies,
        rules, CAPTCHA,
          challenge or L7 DDoS. Works for protected domains only.
        - MONITORED: Traffic that was identified as malicious by security
        policies.
          Currently works for monitored domains only. Later, monitored mode for rules will be added.
        - ALLOWED: Traffic that was allowed directly with some policies or
        rules.

        - PASSED: Traffic that was passed to the origin and didn't trigger any
        rules.
    OptionalAction:
      type: string
      enum:
        - captcha
        - challenge
      title: OptionalAction
      description: >-
        An optional action that may be applied in addition to the primary
        decision.


        - CAPTCHA: Traffic that triggered the CAPTCHA.

        - CHALLENGE: Traffic that triggered the Browser validation challenge.
    GetEventsResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/EventSummary'
          type: array
          title: Results
          description: >-
            Records summary information. To fetch detailed information by an
            event, use [Get request
            details](/api-reference/waap/analytics/get-request-details)
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
          description: >-
            Cursor value.

            When present, indicates _possible_ availability of more data
            satisfying the request criteria.

            To fetch the next page, repeat the request with the original
            parameter and the cursor value attached, for example:


            ```
                        GET /v2/analytics/events?start=2026-06-01T12:00:00Z&end=2026-06-02T00:00:00Z[...]&next=$next
                        ```

            The next page request _may_ return empty result set.
      type: object
      required:
        - results
      title: GetEventsResponse
      description: >-
        Page of records from security event log.


        The data from the security event log are read in a streaming fashion,
        using cursor access pattern.
    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
    EventSummary:
      properties:
        policy_override:
          items:
            $ref: '#/components/schemas/AppliedPolicyOverride'
          type: array
          title: Policy Override
          description: >-
            Applied overrides with id, t, and matched metadata keyed by target
            ID. Does not replace the final decision.
        id:
          type: string
          title: Id
          description: Request's unique id
        path:
          type: string
          title: Path
          description: Request path
        client_ip:
          type: string
          title: Client Ip
          description: Client's IP address.
        method:
          type: string
          title: Method
          description: HTTP method
        rule_name:
          type: string
          title: Rule Name
          description: Name of the triggered rule
        country:
          type: string
          title: Country
          description: Country code
        action:
          type: string
          title: Action
          description: Action of the triggered rule
        rule_id:
          type: string
          title: Rule Id
          description: The ID of the triggered rule.
        domain:
          type: string
          title: Domain
          description: Domain name
        domain_id:
          type: integer
          title: Domain Id
          description: Domain ID
        request_time:
          type: integer
          title: Request Time
          description: >-
            The UNIX timestamp in ms of the date a set of traffic counters was
            recorded
        status_code:
          type: integer
          title: Status Code
          description: Status code for http request
        result:
          type: string
          enum:
            - passed
            - blocked
            - suppressed
            - ''
          title: Result
          description: The result of a request
        decision:
          anyOf:
            - $ref: '#/components/schemas/EventDecision'
            - type: string
              const: ''
          title: Decision
          description: The decision made for processing the request through the WAAP.
          examples:
            - blocked
        optional_action:
          anyOf:
            - $ref: '#/components/schemas/OptionalAction'
            - type: string
              const: ''
          title: Optional Action
          description: >-
            An optional action that may be applied in addition to the primary
            decision.
          examples:
            - captcha
        scheme:
          type: string
          title: Scheme
          description: The URI scheme of the request that generated an event
          default: ''
          example: https
          examples:
            - https
        policy_override_allowed:
          type: boolean
          title: Policy Override Allowed
          description: Whether a Policy Override can be created for this request.
          readOnly: true
      type: object
      required:
        - id
        - path
        - client_ip
        - method
        - rule_name
        - country
        - action
        - rule_id
        - domain
        - domain_id
        - request_time
        - status_code
        - result
        - decision
        - optional_action
        - policy_override_allowed
      title: EventSummary
      description: Event record summary used when displaying a list of events
    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
    AppliedPolicyOverride:
      properties:
        id:
          type: integer
          title: Id
          description: ID of the policy override applied to this request.
        t:
          type: string
          enum:
            - waf_rule
            - static_rule_template
          title: T
          description: >-
            Type of target affected by the override: 'waf_rule' for a detector
            or 'static_rule_template' for a rule.
        matched:
          additionalProperties: true
          type: object
          title: Matched
          description: >-
            Match evidence keyed by target reference, such as 'ID861'. For
            legacy records, evidence is retained only for the first matched
            target; subsequent matched targets have empty objects.
          example:
            ID861:
              field: query_params
              pattern_found: SELECT * FROM MASTER
            ID862: {}
          examples:
            - ID861:
                field: query_params
                pattern_found: SELECT * FROM MASTER
              ID862: {}
      type: object
      required:
        - id
        - t
        - matched
      title: AppliedPolicyOverride
      description: An override that applied to a request, with its match metadata.
  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

````