openapi: 3.1.0 info: title: Lunar.dev Gateway Admin Discovery 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: Discovery description: API endpoint discovery and metrics. paths: /discover: get: operationId: getDiscover summary: Lunar.dev Discover API endpoints description: Returns a list of discovered API endpoints that have been observed passing through the Lunar Gateway. This includes endpoint metrics such as latency and status code distributions grouped by endpoint. Even when no policies are defined, the gateway generates discovered endpoint metrics automatically. tags: - Discovery responses: '200': description: Successfully retrieved discovered endpoints. content: application/json: schema: $ref: '#/components/schemas/DiscoveredEndpoints' components: schemas: DiscoveredEndpoints: type: object properties: endpoints: type: array description: List of discovered API endpoints. items: $ref: '#/components/schemas/DiscoveredEndpoint' DiscoveredEndpoint: type: object properties: method: type: string description: HTTP method observed for this endpoint. examples: - GET - POST url: type: string description: The URL pattern of the discovered endpoint. examples: - api.example.com/v1/users status_codes: type: object description: Distribution of HTTP status codes observed. additionalProperties: type: integer count: type: integer description: Total number of requests observed for this endpoint. average_latency_ms: type: number description: Average latency in milliseconds for requests to this endpoint. externalDocs: description: Lunar.dev Documentation url: https://docs.lunar.dev/