Lunar Policies API
Manage Lunar Policies (legacy traffic control rules)
Manage Lunar Policies (legacy traffic control rules)
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/lunar-policies-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Lunar Policies API
version: 1.0.0
description: 'Operations tagged Policies across 2 of this provider''s published API definitions: lunar-api-consumption-gateway-openapi.yml, lunar-gateway-admin-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:{adminPort}
description: Lunar Engine Admin API (local)
variables:
adminPort:
default: '8081'
description: Admin port set via ENGINE_ADMIN_PORT environment variable
- url: http://localhost:8040
description: Gateway Admin Health Server
- url: http://localhost:8081
description: Gateway Admin Engine Server
tags:
- name: Policies
description: Manage Lunar Policies (legacy traffic control rules)
paths:
/apply_policies:
post:
operationId: applyPolicies
summary: Apply policies configuration (legacy mode)
description: Applies a new policies configuration. Optionally accepts a raw policies YAML body to update the configuration before reloading from file. Used in legacy (non-flows/non-streams) mode only.
tags:
- Policies
requestBody:
required: false
content:
application/x-yaml:
schema:
type: string
description: Raw policies YAML content (optional)
responses:
'200':
description: Policies applied successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
example:
msg: Successfully applied policies from file
'422':
description: Failed to read body or apply/reload policies
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'405':
description: Method not allowed
servers:
- url: http://localhost:{adminPort}
description: Lunar Engine Admin API (local)
variables:
adminPort:
default: '8081'
description: Admin port set via ENGINE_ADMIN_PORT environment variable
/validate_policies:
post:
operationId: validatePolicies
summary: Validate policies configuration (legacy mode)
description: Validates the current policies YAML configuration file without applying changes. Used in legacy (non-flows) mode only.
tags:
- Policies
responses:
'200':
description: Policies validated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
example:
msg: Successfully validated policies from file
'422':
description: Failed to validate policies
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'405':
description: Method not allowed
servers:
- url: http://localhost:{adminPort}
description: Lunar Engine Admin API (local)
variables:
adminPort:
default: '8081'
description: Admin port set via ENGINE_ADMIN_PORT environment variable
/revert_to_diagnosis_free:
post:
operationId: revertToDiagnosisFree
summary: Revert to diagnosis-free policy state (legacy mode)
description: Reverts the gateway's active policy configuration to a diagnosis-free baseline state, removing all active diagnosis/remediation overrides. Used in legacy (non-flows) mode only.
tags:
- Policies
responses:
'200':
description: Successfully reverted to diagnosis free state
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
example:
msg: Successfully reverted to diagnosis free
'422':
description: Failed to revert
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'405':
description: Method not allowed
servers:
- url: http://localhost:{adminPort}
description: Lunar Engine Admin API (local)
variables:
adminPort:
default: '8081'
description: Admin port set via ENGINE_ADMIN_PORT environment variable
/revert_to_last_loaded:
post:
operationId: revertToLastLoaded
summary: Revert to last loaded policy state (legacy mode)
description: Reverts the gateway's active policy configuration to the last successfully loaded state, undoing any in-memory overrides. Used in legacy (non-flows) mode only.
tags:
- Policies
responses:
'200':
description: Successfully reverted to last loaded state
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
example:
msg: Successfully reverted to last loaded
'422':
description: Failed to revert
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'405':
description: Method not allowed
servers:
- url: http://localhost:{adminPort}
description: Lunar Engine Admin API (local)
variables:
adminPort:
default: '8081'
description: Admin port set via ENGINE_ADMIN_PORT environment variable
components:
schemas:
SuccessResponse:
type: object
description: Generic success message response
properties:
msg:
type: string
description: Human-readable success message
required:
- msg
ErrorResponse:
type: object
description: Error response with message and optional error detail
properties:
msg:
type: string
description: Human-readable error message
error:
type: string
description: Underlying error string
required:
- msg
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.
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
Error:
type: object
properties:
error:
type: string
description: Error message describing what went wrong.
details:
type: string
description: Additional details about the error.
x-refined-from:
- lunar-api-consumption-gateway-openapi.yml
- lunar-gateway-admin-openapi.yml