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

# Recupera i log di traffico di Threat Blocker v2

> Restituisce fino a 10000 voci di log di traffico più recenti di un dispositivo Threat Blocker, dalla più recente: IP sorgente e destinazione, porta di destinazione, regola del firewall, direzione, azione, punteggio e livello di rischio. Usa hours per limitare la finestra e before (timestamp ISO) per scorrere i blocchi più vecchi.



## OpenAPI

````yaml get /api/v1/atb/{id}/traffic-v2
openapi: 3.1.0
info:
  title: Aegister API
  version: 2.12.2
servers: []
security: []
paths:
  /api/v1/atb/{id}/traffic-v2:
    get:
      tags:
        - atb
      summary: Retrieve latest traffic logs for a specific device
      description: >-
        Returns up to 10000 of the most recent traffic log entries for a given
        ATB device ID, sorted in descending order by timestamp. Each entry
        includes metadata such as source and destination IPs, firewall rule,
        direction, and whether the request was considered malicious or blocked.
        Use `hours` to bound the time window and `before` (ISO timestamp cursor)
        to page older batches (the client loops these batches to load the number
        of rows the user asked for).
      operationId: atb_traffic_v2_retrieve
      parameters:
        - in: query
          name: before
          schema:
            type: string
          description: >-
            ISO timestamp cursor: return only entries strictly older than this
            (for paging past the 10000-row batch size).
        - in: query
          name: hours
          schema:
            type: integer
          description: Time window in hours (1-720). Omit for no time bound.
        - in: path
          name: id
          schema:
            type: integer
          description: Unique ID of the ATB device
          required: true
        - in: query
          name: size
          schema:
            type: integer
          description: Entries to return, 1 to 10000 (default 10000).
        - in: query
          name: skip
          schema:
            type: integer
          description: >-
            With `before`: how many entries stamped exactly `before` you already
            hold; the batch then starts with the rest of that second instead of
            skipping it.
      responses:
        '200':
          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:
                      - 0
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
                  total:
                    type: number
                    description: >-
                      Total number of items that meet the list filter.  

                      This doesn't represent the number of items inside the
                      `data` array.
                    minimum: 0
                    examples:
                      - 20
                      - 30
                      - 40
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date_time:
                          type: string
                          format: date-time
                        action:
                          type: string
                        malicious:
                          type: boolean
                        src_ip:
                          type: string
                        dst_ip:
                          type: string
                        dst_port:
                          type: string
                        traffic_direction:
                          type: string
                        fw_rule:
                          type: string
              examples:
                TrafficLogsResponse:
                  value:
                    data:
                      - date_time: '2025-05-08T14:44:43+00:00'
                        action: deny
                        malicious: true
                        src_ip: 192.168.1.10
                        dst_ip: 8.8.8.8
                        dst_port: '443'
                        traffic_direction: outbound
                        fw_rule: 'Block: Threat Signature XYZ'
          description: List of recent traffic logs
        '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: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Aegister-Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.