🎉 hyperglass 2.0 is here! This documentation is still in development, though.
Configuration
API Docs

API Docs

hyperglass automatically generates documentation for the REST API. The docs section allows users to customize the look, feel, and text used for the REST API documentation.

ParameterTypeDefault ValueDescription
docs.base_urlStringhttps://lg.example.comUsed for REST API samples. See the demo for an example.
docs.enableBooleantrueEnable or disable the REST API documentation.
docs.pathString/api/docsPath to the REST API documentation.
docs.titleStringsite_title API DocumentationAPI docs title. Uses the site_title parameter from the global parameters.
docs.descriptionStringAPI docs description. Appears below the title.

The documentation for API endpoints follow a common schema:

  • devices
  • info
  • queries
  • query

Schema

ParameterTypeDescription
titleStringAPI endpoint title, displayed as the header text above the API endpoint section.
descriptionStringAPI endpoint description, displayed inside each API endpoint section.
summaryStringAPI endpoint summary, displayed beside the API endpoint path.

Parameters

ParameterDefault Value
docs.devices.titleDevices
docs.devices.descriptionList of all devices/locations with associated identifiers, display names, networks, & VRFs.
docs.devices.summaryDevices List
docs.info.titleSystem Information
docs.info.descriptionGeneral information about this looking glass.
docs.info.summarySystem Information
docs.queries.titleSupported Queries
docs.queries.descriptionList of supported query types.
docs.queries.summaryQuery Types
docs.query.titleSupported Query
docs.query.descriptionRequest a query response per-location.
docs.query.summaryQuery the Looking Glass

Example with Defaults

config.yaml
docs:
    base_url: https://lg.example.com
    enable: true
    mode: redoc
    path: /api/docs
    title: Beloved Hyperglass User Looking Glass API Documentation
    description: null
    # API Endpoints ↓
    devices:
        title: Devices
        description: List of all devices/locations with associated identifiers, display names, networks, & VRFs.
        summary: Devices List
    info:
        title: System Information
        description: General information about this looking glass.
        summary: System Information
    queries:
        title: Supported Queries
        description: List of supported query types.
        summary: Query Types
    query:
        title: Supported Query
        description: Request a query response per-location.
        summary: Query the Looking Glass