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

# Statistiche di traffico per livello di rischio

> Restituisce i log di traffico aggregati per un dispositivo ATB specifico, raggruppati per livello di rischio (basso, medio, alto) in un intervallo temporale specificato.



## OpenAPI

````yaml get /api/v1/atb/{atb_id}/traffic/crime-level-stats
openapi: 3.1.0
info:
  title: Aegister API
  version: 1.0.5
servers: []
security: []
paths:
  /api/v1/atb/{atb_id}/traffic/crime-level-stats:
    get:
      tags:
        - atb
      summary: Traffic stats per crime level
      description: >-
        Returns aggregated traffic logs for a specific ATB device, grouped by
        crime level (low, medium, high) over a specified time window.
      operationId: atb_traffic_crime_level_stats_retrieve
      parameters:
        - in: path
          name: atb_id
          schema:
            type: integer
          required: true
        - in: path
          name: id
          schema:
            type: integer
          description: ATB device ID
          required: true
        - in: query
          name: minutes
          schema:
            type: integer
          description: Time window in minutes. Default = 720 (12h).
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          format: date-time
                        end_timestamp:
                          type: string
                          format: date-time
                        low_total:
                          type: integer
                        low_blocked:
                          type: integer
                        medium_total:
                          type: integer
                        medium_blocked:
                          type: integer
                        high_total:
                          type: integer
                        high_blocked:
                          type: integer
                      required:
                        - timestamp
                        - low_total
                        - medium_total
                        - high_total
                  total_requests:
                    type: integer
                  blocked_requests:
                    type: integer
          description: Aggregated traffic data (crime level)
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - - 9153
          description: ''
        '403':
          description: Forbidden – user lacks permission
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
          description: ''
      security:
        - ApiKeyAuth: []
        - ApiKeyQueryParam: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Aegister-Token
    ApiKeyQueryParam:
      type: apiKey
      in: query
      name: X-Aegister-Token

````