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

# Retrieve instance bandwidth

> Fetches the bandwidth usage statistics for the primary server associated with a VPN instance.



## OpenAPI

````yaml /api/en/managed-vpn.yaml get /vpn/instances/{instanceId}/bandwidth
openapi: 3.0.3
info:
  title: Altostrat Managed VPN API
  version: 1.0.0
  description: >-
    Manage SDX managed VPN instances, peers, site subnets, regions, and
    user-facing client configuration through the public `/vpn` gateway path.
servers:
  - url: https://v1.api.altostrat.io
    description: Altostrat Production API
security: []
tags:
  - name: Instances
    description: Manage VPN instances, which are the core server deployments.
  - name: Peers
    description: Manage peers, which are the clients and sites connecting to an instance.
  - name: Utilities
    description: Helper endpoints for retrieving supplementary data like server regions.
  - name: Client Configuration
    description: Retrieve user-facing VPN client configuration bundles.
paths:
  /vpn/instances/{instanceId}/bandwidth:
    get:
      tags:
        - Instances
      summary: Retrieve instance bandwidth
      description: >-
        Fetches the bandwidth usage statistics for the primary server associated
        with a VPN instance.
      operationId: getInstanceBandwidth
      parameters:
        - name: instanceId
          in: path
          required: true
          description: The unique identifier (UUID) for the VPN instance.
          schema:
            type: string
            format: uuid
            example: d290f1ee-6c54-4b01-90e6-d701748f0851
      responses:
        '200':
          description: Bandwidth usage data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Bandwidth'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - Insufficient scopes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The specified instance was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth:
            - vpn:view
components:
  schemas:
    Bandwidth:
      type: object
      properties:
        incoming_bytes:
          type: integer
          format: int64
          description: >-
            Total incoming data transfer in bytes for the current billing
            period.
          example: 1234567890
        outgoing_bytes:
          type: integer
          format: int64
          description: >-
            Total outgoing data transfer in bytes for the current billing
            period.
          example: 9876543210
        date:
          type: string
          format: date
          description: The date the bandwidth measurement was taken.
          example: '2025-10-29'
    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_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your bearer token in the format: Bearer {token}'

````