> ## 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.

# Retrieve traffic statistics for a specific ATB device

> Returns aggregated traffic logs (total and blocked requests) grouped into fixed time buckets within the last N minutes.



## OpenAPI

````yaml get /api/v1/atb/{id}/traffic/stats-v2
openapi: 3.1.0
info:
  title: Aegister API
  version: 1.0.5
servers: []
security: []
paths:
  /api/v1/atb/{id}/traffic/stats-v2:
    get:
      tags:
        - atb
      summary: Retrieve traffic statistics for a specific ATB device
      description: >-
        Returns aggregated traffic logs (total and blocked requests) grouped
        into fixed time buckets within the last N minutes.
      operationId: atb_traffic_stats_v2_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: Unique ID of the ATB device
          required: true
        - in: query
          name: minutes
          schema:
            type: integer
          description: >-
            Time window in minutes to aggregate traffic data. Default is 12
            hours.
      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
                        total_requests:
                          type: integer
                        blocked_requests:
                          type: integer
                      required:
                        - timestamp
                        - total_requests
                        - blocked_requests
                  total_requests:
                    type: integer
                  blocked_requests:
                    type: integer
          description: Aggregated traffic data response
        '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

````