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

# Get network flow logs

> Return aggregated Network Flow Logs for a saved report or ad hoc VQL query.



## OpenAPI

````yaml https://api.vantage.sh/v2/oas_v3.json get /network_flow_logs
openapi: 3.0.1
info:
  title: Vantage
  description: Vantage API
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
  - url: https://api.vantage.sh/v2
security:
  - oauth2:
      - read
tags:
  - name: AccessGrants
    description: Operations about AccessGrants
  - name: AnomalyAlerts
    description: Operations about AnomalyAlerts
  - name: AnomalyNotifications
    description: Operations about AnomalyNotifications
  - name: AuditLogs
    description: Operations about AuditLogs
  - name: BillingProfiles
    description: Operations about BillingProfiles
  - name: BillingRules
    description: Operations about BillingRules
  - name: BudgetAlerts
    description: Operations about BudgetAlerts
  - name: Budgets
    description: Operations about Budgets
  - name: BusinessMetrics
    description: Operations about BusinessMetrics
  - name: Canvases
    description: Operations about Canvases
  - name: CostAlertEvents
    description: Operations about CostAlertEvents
  - name: CostAlerts
    description: Operations about CostAlerts
  - name: CostProvider
    description: Operations about CostProviders
  - name: CostProviderAccounts
    description: Operations about CostProviderAccounts
  - name: Costs
    description: Operations about Costs
  - name: CostService
    description: Operations about CostServices
  - name: Dashboards
    description: Operations about Dashboards
  - name: DataExports
    description: Operations about DataExports
  - name: ExchangeRates
    description: Operations about ExchangeRates
  - name: FinancialCommitmentReports
    description: Operations about FinancialCommitmentReports
  - name: FinancialCommitments
    description: Operations about FinancialCommitments
  - name: Folders
    description: Operations about Folders
  - name: Integrations
    description: Operations about Integrations
  - name: Invoices
    description: Operations about Invoices
  - name: KubernetesEfficiencyReports
    description: Operations about KubernetesEfficiencyReports
  - name: ManagedAccounts
    description: Operations about ManagedAccounts
  - name: Me
    description: Operations about Mes
  - name: NetworkFlowLogs
    description: Operations about NetworkFlowLogs
  - name: NetworkFlowReports
    description: Operations about NetworkFlowReports
  - name: OpenAPISpecification
    description: Operations about OpenAPISpecifications
  - name: Ping
    description: Operations about Pings
  - name: Prices
    description: Operations about Prices
  - name: Recommendations
    description: Operations about Recommendations
  - name: RecommendationViews
    description: Operations about RecommendationViews
  - name: ReportNotifications
    description: Operations about ReportNotifications
  - name: ResourceReports
    description: Operations about ResourceReports
  - name: Resources
    description: Operations about Resources
  - name: SavedFilters
    description: Operations about SavedFilters
  - name: Segments
    description: Operations about Segments
  - name: Tags
    description: Operations about Tags
  - name: Teams
    description: Operations about Teams
  - name: UnitCosts
    description: Operations about UnitCosts
  - name: UserFeedback
    description: Operations about UserFeedbacks
  - name: Users
    description: Operations about Users
  - name: VirtualTags
    description: Operations about VirtualTags
  - name: Workspaces
    description: Operations about Workspaces
paths:
  /network_flow_logs:
    get:
      tags:
        - NetworkFlowLogs
      summary: Get network flow logs
      description: >-
        Return aggregated Network Flow Logs for a saved report or ad hoc VQL
        query.
      operationId: getNetworkFlowLogs
      parameters:
        - name: network_flow_report_token
          in: query
          schema:
            type: string
        - name: workspace_token
          in: query
          schema:
            type: string
        - name: filter
          in: query
          schema:
            type: string
        - name: date_interval
          in: query
          schema:
            type: string
            enum:
              - last_3_days
              - last_7_days
              - last_14_days
              - last_30_days
        - name: start_date
          in: query
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          schema:
            type: string
            format: date
        - name: groupings
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - account_id
                - az_id
                - dstaddr
                - dsthostname
                - flow_direction
                - interface_id
                - instance_id
                - peer_resource_uuid
                - peer_account_id
                - peer_vpc_id
                - peer_region
                - peer_az_id
                - peer_subnet_id
                - peer_interface_id
                - peer_instance_id
                - region
                - resource_uuid
                - srcaddr
                - srchostname
                - subnet_id
                - traffic_category
                - traffic_path
                - vpc_id
        - name: flow_direction
          in: query
          schema:
            type: string
            enum:
              - all
              - ingress
              - egress
        - name: flow_weight
          in: query
          schema:
            type: string
            enum:
              - costs
              - bytes
        - name: page
          in: query
          schema:
            type: integer
            format: int32
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 100
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkFlowLogs'
              example:
                links:
                  self: >-
                    https://api.vantage.sh/v2/network_flow_logs?network_flow_report_token=ntflw_lg_rprt_aea0bdc238d0cf65
                  first: >-
                    https://api.vantage.sh/v2/network_flow_logs?network_flow_report_token=ntflw_lg_rprt_aea0bdc238d0cf65&page=1
                  next: null
                  last: null
                  prev: null
                flow_weight: costs
                sampling:
                  sampled: true
                  max_sampling_rate_percent: 50
                network_flow_logs:
                  - groupings:
                      resource_uuid:
                        value: resource-123
                        label: production-web-1
                        provider_resource_token: prvdr_rsrc_39e94b2468400dca
                      traffic_category:
                        value: public
                        label: public
                        provider_resource_token: null
                    bytes: 200
                    estimated_cost: '2.5'
                    currency: USD
                    sampled_bytes: 100
                    sampled_estimated_cost: '1.25'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '402':
          description: PaymentRequired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
        - oauth2:
            - read
components:
  schemas:
    NetworkFlowLogs:
      required:
        - flow_weight
        - network_flow_logs
        - sampling
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        flow_weight:
          type: string
          description: The dimension used to order the aggregated rows.
          nullable: false
        sampling:
          type: object
          properties: {}
          description: Sampling metadata for the selected data.
          nullable: false
        network_flow_logs:
          type: array
          items:
            $ref: '#/components/schemas/NetworkFlowLog'
      description: NetworkFlowLogs model
    Errors:
      required:
        - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
    NetworkFlowLog:
      required:
        - bytes
        - currency
        - estimated_cost
        - groupings
        - sampled_bytes
        - sampled_estimated_cost
      type: object
      properties:
        groupings:
          type: object
          properties: {}
          description: The grouping values for this aggregated Network Flow Log row.
          nullable: false
        bytes:
          type: number
          description: The sampling-adjusted estimated byte count.
          format: float
          nullable: false
        estimated_cost:
          type: string
          description: The sampling-adjusted estimated cost.
          nullable: false
        currency:
          type: string
          description: The ISO 4217 currency code for estimated costs.
          nullable: false
        sampled_bytes:
          type: number
          description: The observed byte count when sampling applies.
          format: float
          nullable: true
        sampled_estimated_cost:
          type: string
          description: The observed estimated cost when sampling applies.
          nullable: true
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access

````