node-opa
    Preparing search index...

    A lightweight TypeScript client for the Open Policy Agent (OPA) REST API. Uses the native fetch API and requires no external dependencies.

    Official REST API reference: https://www.openpolicyagent.org/docs/latest/rest-api/

    Index

    Constructors

    • Creates a new instance of the OpaClient.

      Parameters

      • _config: { baseUrl: string; headers?: Record<string, string> } = ...

        Configuration object for the OPA client.

        • baseUrl: string

          Base URL of the OPA server (e.g., 'http://localhost:8181'). Trailing slashes are automatically removed.

        • Optionalheaders?: Record<string, string>

          Optional custom headers to include with every request. Note: Certain headers are managed internally by the client (Accept, Accept-Encoding, Content-Type, Content-Encoding). Providing these in headers may override internal behavior—use with caution.

      Returns Client

    Properties

    compile: CompileAPI = ...
    config: ConfigAPI = ...
    data: DataAPI = ...
    health: HealthAPI = ...
    policy: PolicyAPI = ...
    query: QueryAPI = ...
    status: StatusAPI = ...