Lunar.dev Flows API

Flow configuration management for traffic control.

OpenAPI Specification

lunar-dev-flows-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Lunar.dev Gateway Admin Discovery Flows API
  description: The Lunar.dev Gateway Admin API provides administrative endpoints for managing and monitoring the Lunar API Consumption Gateway. The gateway acts as an egress proxy for third-party API traffic, providing visibility, control, and performance optimization. The admin API enables health monitoring, endpoint discovery, flow validation, and policy management for the running gateway instance.
  version: 1.0.0
  contact:
    name: Lunar.dev
    url: https://www.lunar.dev/
  license:
    name: MIT
    url: https://github.com/TheLunarCompany/lunar/blob/main/LICENSE
servers:
- url: http://localhost:8040
  description: Gateway Admin Health Server
- url: http://localhost:8081
  description: Gateway Admin Engine Server
tags:
- name: Flows
  description: Flow configuration management for traffic control.
paths:
  /validate_flows:
    post:
      operationId: validateFlows
      summary: Lunar.dev Validate flows
      description: Validates the current flow configuration files for syntax and logical errors before deploying. Flows are YAML-based configurations that define how API requests and responses are processed in real time through the Lunar Gateway.
      tags:
      - Flows
      responses:
        '200':
          description: Flows are valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResult'
        '400':
          description: Flows contain validation errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResult'
  /apply_flows:
    post:
      operationId: applyFlows
      summary: Lunar.dev Apply flows
      description: Applies the current flow configuration files to the running Lunar Gateway instance. Flows define traffic management rules including rate limiting, caching, retry mechanisms, quota enforcement, and request prioritization.
      tags:
      - Flows
      responses:
        '200':
          description: Flows applied successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResult'
        '400':
          description: Invalid flow configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OperationResult:
      type: object
      properties:
        status:
          type: string
          description: Result status of the operation.
          examples:
          - ok
        message:
          type: string
          description: Human-readable message about the operation result.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong.
        details:
          type: string
          description: Additional details about the error.
    ValidationResult:
      type: object
      properties:
        valid:
          type: boolean
          description: Whether the configuration is valid.
        errors:
          type: array
          description: List of validation errors found, if any.
          items:
            type: string
externalDocs:
  description: Lunar.dev Documentation
  url: https://docs.lunar.dev/