MCP Connectors

Get connector cache statistics

Returns the caller's cached-connector count. The response is tenant-scoped (platform/agent/connector_refresh_api.go:350-355): cached_connectors is the authenticated tenant's own count, not the deployment's.

The cache-health counters are operator telemetry. hits, misses, evictions, factory_creations, factory_failures, connection_errors, hit_rate_percent, last_eviction and last_factory_create are deployment-wide figures. They appear here only inside a deployment object, and only for the internal-service credential (platform/agent/connector_refresh_api.go:356-369). A tenant caller must not read their absence as zero — it has no cache-health data on this surface.

Un-scoped equivalents for five of them are always available to operators on /prometheus as axonflow_connector_cache_stats{stat="cached_connectors"|"hits"|"misses"|"evictions"|"hit_rate"}, refreshed on every call to this endpoint (platform/agent/connector_refresh_api.go:338-342). factory_creations, factory_failures, connection_errors, last_eviction and last_factory_create have no Prometheus series — the deployment block is their only surface.

Authentication. Wrapped in apiAuthMiddleware (platform/agent/connector_refresh_api.go:132). This route takes no {tenant_id} path segment, so it never returns 403.

(Historical note: this route was registered with no auth middleware at all and served the deployment-wide counters to anonymous callers — #2883, where the evictions delta was an existence oracle for (tenant, connector) pairs. Authenticated and scoped as of #3067.)

get/api/v1/connectors/cache/stats

Request

Response

Cache statistics

tenant_idstring

The authenticated tenant cached_connectors is scoped to. For an internal-service caller this is whatever X-Tenant-ID was sent, or the synthetic orchestrator-internal client id when it was not (platform/agent/authenticator.go:127-130).

cached_connectorsinteger

The number of connectors cached for tenant_id (registry.CountByTenant), not for the deployment. It is typically 0 for an internal-service caller that sent no X-Tenant-ID — read deployment.cached_connectors instead.

registry_enabledboolean

Always true when the endpoint answers 200 — a disabled or uninitialized registry returns 503 before this body is built.

timestampstring date-time

Server time (UTC) at which the body was built

Example response

{
  "tenant_id": "acme-corp"
}

Changes

No recorded changes to this operation across all 1 revision of this API.