featherbit UI
    Preparing search index...

    Variable apiConst

    api: {
        clearTraces: () => Promise<unknown>;
        createRoute: (route: Route) => Promise<unknown>;
        debugConfig: () => Promise<DebugConfig>;
        deletePolicy: (name: string) => Promise<unknown>;
        deleteRoute: (name: string) => Promise<unknown>;
        exportConfig: () => Promise<string>;
        getPolicy: (name: string) => Promise<Policy>;
        getRoute: (name: string) => Promise<Route>;
        getTrace: (id: string) => Promise<TraceDetail>;
        listPlugins: () => Promise<PluginType[]>;
        listPolicies: () => Promise<Policy[]>;
        listRoutes: () => Promise<Route[]>;
        listScripts: () => Promise<ScriptFile[]>;
        listTraces: () => Promise<TraceSummary[]>;
        reload: () => Promise<unknown>;
        runSandbox: (body: unknown) => Promise<SandboxResult>;
        status: () => Promise<GatewayStatus>;
        updatePolicy: (name: string, policy: Policy) => Promise<unknown>;
        updateRoute: (name: string, route: Route) => Promise<unknown>;
    } = ...

    The gateway Admin API surface used by the editor.

    All methods return promises and throw on non-2xx responses; mutating calls trigger route/policy revalidation on the gateway side.

    Type Declaration

    • clearTraces: () => Promise<unknown>

      DELETE /api/debug/traces — empties the trace buffer.

    • createRoute: (route: Route) => Promise<unknown>

      POST /api/routes — creates a new route; returns the API's JSON acknowledgement.

    • debugConfig: () => Promise<DebugConfig>

      GET /api/debug/config — effective debug settings; answers even when debug is disabled.

    • deletePolicy: (name: string) => Promise<unknown>

      DELETE /api/policies/{name} — removes the named policy; returns the API's JSON acknowledgement.

    • deleteRoute: (name: string) => Promise<unknown>

      DELETE /api/routes/{name} — removes the named route; returns the API's JSON acknowledgement.

    • exportConfig: () => Promise<string>

      GET /api/config/export — returns the live in-memory config (routes + policies) as a YAML string.

    • getPolicy: (name: string) => Promise<Policy>

      GET /api/policies/{name} — returns the named policy.

    • getRoute: (name: string) => Promise<Route>

      GET /api/routes/{name} — returns the named route.

    • getTrace: (id: string) => Promise<TraceDetail>

      GET /api/debug/traces/{id} — one trace with per-step computed changes.

    • listPlugins: () => Promise<PluginType[]>

      GET /api/plugins — returns the catalog of available plugin types, unwrapped from { plugins: [...] }.

    • listPolicies: () => Promise<Policy[]>

      GET /api/policies — returns all configured policies.

    • listRoutes: () => Promise<Route[]>

      GET /api/routes — returns all configured routes.

    • listScripts: () => Promise<ScriptFile[]>

      GET /api/scripts — returns scripted-plugin files found on the gateway host, unwrapped from { scripts: [...] }.

    • listTraces: () => Promise<TraceSummary[]>

      GET /api/debug/traces — recorded traces, newest first, unwrapped from { traces: [...] }.

    • reload: () => Promise<unknown>

      POST /api/config/reload — makes the gateway re-read gateway.yaml from disk; returns the API's JSON acknowledgement.

    • runSandbox: (body: unknown) => Promise<SandboxResult>

      POST /api/debug/sandbox — runs ad-hoc nodes or a named policy against a synthetic context.

    • status: () => Promise<GatewayStatus>

      GET /api/status — returns gateway version plus route and policy counts.

    • updatePolicy: (name: string, policy: Policy) => Promise<unknown>

      PUT /api/policies/{name} — upserts the named policy (also used to create new policies); returns the API's JSON acknowledgement.

    • updateRoute: (name: string, route: Route) => Promise<unknown>

      PUT /api/routes/{name} — replaces the named route; returns the API's JSON acknowledgement.

    Handlers live in src/admin/routes.rs (routes), src/admin/policies.rs (policies, plugins, scripts), and src/admin/status.rs (status, reload).