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

# Get Interface Metrics

> Fetches time-series traffic metrics (ifInOctets for inbound, ifOutOctets for outbound) for a specific network interface over a given time period. The values are returned as bits per second.



## OpenAPI

````yaml /api/en/monitoring-metrics.yaml post /metrics/interfaces/{interfaceId}/metrics
openapi: 3.0.3
info:
  title: Altostrat Monitoring & Metrics API
  version: 1.0.0
  description: >-
    Retrieve portal-facing metrics through the public `/metrics` gateway path,
    including dashboards, WAN tunnels, interfaces, ARP entries, syslogs, BGP,
    and DNS reports.
servers:
  - url: https://v1.api.altostrat.io
security:
  - bearerAuth: []
tags:
  - name: Dashboard
    description: High-level, aggregated metrics for network performance and data usage.
  - name: WAN Tunnels & Performance
    description: >-
      Endpoints for managing and retrieving performance data from SD-WAN
      tunnels.
  - name: Site Interfaces & Metrics
    description: >-
      Endpoints for listing network interfaces at a site and fetching their
      traffic metrics.
  - name: Device Health & Status
    description: Endpoints for monitoring the health and status of network devices.
  - name: ARP Inventory
    description: >-
      Endpoints for querying and managing the Address Resolution Protocol (ARP)
      table to discover devices on the network.
  - name: Network Logs
    description: Access to system, DNS, and BGP logs for diagnostics and security analysis.
  - name: Grafana Dashboards
    description: List Grafana dashboards, query dashboard panels, and export panel data.
  - name: Prometheus Querying
    description: >-
      Discover available metrics and labels, then execute Prometheus queries
      scoped to your workspace.
paths:
  /metrics/interfaces/{interfaceId}/metrics:
    post:
      tags:
        - Site Interfaces & Metrics
      summary: Get Interface Metrics
      description: >-
        Fetches time-series traffic metrics (ifInOctets for inbound, ifOutOctets
        for outbound) for a specific network interface over a given time period.
        The values are returned as bits per second.
      parameters:
        - name: interfaceId
          in: path
          required: true
          description: The unique identifier for the SNMP interface.
          schema:
            type: string
            format: uuid
            example: 9f9510bd-1234-5678-a7cf-f845a39e26db
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - from
                - to
              properties:
                from:
                  type: string
                  format: date-time
                  description: The start of the time window.
                  example: '2025-10-29T10:00:00Z'
                to:
                  type: string
                  format: date-time
                  description: The end of the time window.
                  example: '2025-10-29T11:00:00Z'
      responses:
        '200':
          description: Time-series metrics for the specified interface.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InterfaceMetricsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '410':
          description: Gone - The specified interface ID is incorrect or no longer exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    InterfaceMetricsResponse:
      type: object
      properties:
        ifInOctets:
          $ref: '#/components/schemas/InterfaceMetricSeries'
        ifOutOctets:
          $ref: '#/components/schemas/InterfaceMetricSeries'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_invalid
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The provided 'siteId' is not a valid UUID.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_invalid
    InterfaceMetricSeries:
      type: array
      description: >-
        A time-series of metric data points for inbound (ifInOctets) or outbound
        (ifOutOctets) traffic.
      items:
        $ref: '#/components/schemas/MetricDatapoint'
    MetricDatapoint:
      type: object
      properties:
        clock:
          type: string
          format: date-time
          description: The timestamp for the data point.
          example: '2025-10-29 10:05:00'
        value:
          type: number
          format: float
          description: >-
            The calculated value for the metric at this point in time, in bits
            per second.
          example: 1543210.5
  responses:
    BadRequest:
      description: Bad Request - The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - The request lacks valid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````