openapi: 3.1.0 info: title: Lunar.dev Gateway Admin Discovery Policies 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: Policies description: Policy management for the Lunar Gateway. paths: /apply_policies: post: operationId: applyPolicies summary: Lunar.dev Apply policies description: Applies the current policies configuration (policies.yaml) to the running Lunar Gateway instance. This reloads the policy definitions and activates any changes made to the policies file without requiring a gateway restart. tags: - Policies responses: '200': description: Policies applied successfully. content: application/json: schema: $ref: '#/components/schemas/OperationResult' '400': description: Invalid policy configuration. content: application/json: schema: $ref: '#/components/schemas/Error' /validate_policies: post: operationId: validatePolicies summary: Lunar.dev Validate policies description: Validates the current policies configuration (policies.yaml) without applying it. Checks for configuration issues, syntax errors, and logical conflicts in the policy definitions. tags: - Policies responses: '200': description: Policies are valid. content: application/json: schema: $ref: '#/components/schemas/ValidationResult' '400': description: Policies contain validation errors. content: application/json: schema: $ref: '#/components/schemas/ValidationResult' 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/