{
  "repo": "tidbcloud/clusterproxy",
  "binary": "proxy",
  "binary_path": "cmd/proxy/main.go",
  "surface_kind": "http_service",
  "type": "http_service",
  "extensions": {
    "notes": [
      "HTTP proxy that resolves TiDB Cloud cluster coordinates and dispatches requests to TiDB, PD, TiCDC, TiFlash, Prometheus, Kubernetes Dashboard, and terminal helper services.",
      "All /proxy/... methods are wrapped by metrics.Middleware and auth.Middleware; in non-dev mode the Auth0 JWT middleware validates every request and loads JWKS from Auth0 during startup.",
      "All *ByNamespacedCluster methods route through resolve.ByNamespacedName; on monitor-name cache miss it lists TidbMonitor CRs to populate cl.MonitorName, even when the downstream handler is not Prometheus-specific.",
      "TiCDCProxyByClusterID uses resolve.ByID, which probes the shared TiCDC Service to decide whether the runtime cluster name should stay db or switch to db-cdc.",
      "The separate versioncheck binary is a CLI schema validator only; it remains skipped from deep scan output generation."
    ]
  },
  "services": [
    {
      "name": "HealthService",
      "methods": [
        {
          "name": "Readyz",
          "name_key": "HealthService.Readyz",
          "http_method": "GET",
          "path": "/readyz",
          "input": "none",
          "output": "void",
          "auth_required": false,
          "type": "http"
        }
      ]
    },
    {
      "name": "CentralService",
      "methods": [
        {
          "name": "TestConnectionByClusterID",
          "name_key": "CentralService.TestConnectionByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1/test_connection",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/test_connection",
            "/proxy/cluster/{cluster_id}/v1beta1/test_connection",
            "/proxy/cluster/{cluster_id}/test_connection"
          ],
          "input": "connectionModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "TestConnectionByNamespacedCluster",
          "name_key": "CentralService.TestConnectionByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1/test_connection",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/test_connection",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/test_connection",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/test_connection"
          ],
          "input": "connectionModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "ChangePasswordByClusterID",
          "name_key": "CentralService.ChangePasswordByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1/change_password",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/change_password",
            "/proxy/cluster/{cluster_id}/v1beta1/change_password",
            "/proxy/cluster/{cluster_id}/change_password"
          ],
          "input": "passwordModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "ChangePasswordByNamespacedCluster",
          "name_key": "CentralService.ChangePasswordByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1/change_password",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/change_password",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/change_password",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/change_password"
          ],
          "input": "passwordModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        }
      ]
    },
    {
      "name": "ClusterProxyService",
      "methods": [
        {
          "name": "TiCDCProxyByClusterID",
          "name_key": "ClusterProxyService.TiCDCProxyByClusterID",
          "http_method": "ANY",
          "path": "/proxy/cluster/{cluster_id}/ticdc/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied TiCDC response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "TiCDCProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.TiCDCProxyByNamespacedCluster",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/ticdc/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied TiCDC response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "KubernetesDashboardProxyByClusterID",
          "name_key": "ClusterProxyService.KubernetesDashboardProxyByClusterID",
          "http_method": "ANY",
          "path": "/proxy/cluster/{cluster_id}/kubernetes_dashboard/{subpath:*}",
          "input": "HTTP request + Portal-Authorization header",
          "output": "proxied Kubernetes Dashboard response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "KubernetesDashboardProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.KubernetesDashboardProxyByNamespacedCluster",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/kubernetes_dashboard/{subpath:*}",
          "input": "HTTP request + Portal-Authorization header",
          "output": "proxied Kubernetes Dashboard response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "PDProxyByClusterID",
          "name_key": "ClusterProxyService.PDProxyByClusterID",
          "http_method": "ANY",
          "path": "/proxy/cluster/{cluster_id}/pd/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied PD response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "PDProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.PDProxyByNamespacedCluster",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/pd/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied PD response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "PrometheusProxyByClusterID",
          "name_key": "ClusterProxyService.PrometheusProxyByClusterID",
          "http_method": "ANY",
          "path": "/proxy/cluster/{cluster_id}/prometheus/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied Prometheus response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "PrometheusProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.PrometheusProxyByNamespacedCluster",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/prometheus/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied Prometheus response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "PrometheusProxyByMonitorName",
          "name_key": "ClusterProxyService.PrometheusProxyByMonitorName",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/tidbmonitor/{monitor_name}/prometheus/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied Prometheus response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "TiFlashProxyByClusterID",
          "name_key": "ClusterProxyService.TiFlashProxyByClusterID",
          "http_method": "ANY",
          "path": "/proxy/cluster/{cluster_id}/tiflash/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied TiFlash response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "TiFlashProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.TiFlashProxyByNamespacedCluster",
          "http_method": "ANY",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/tiflash/{subpath:*}",
          "input": "HTTP request",
          "output": "proxied TiFlash response",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "TerminalProxyByClusterID",
          "name_key": "ClusterProxyService.TerminalProxyByClusterID",
          "http_method": "GET",
          "path": "/proxy/cluster/{cluster_id}/terminal/{user}/{subpath:*}",
          "input": "HTTP request + x-user-id header",
          "output": "proxied terminal session",
          "auth_required": true,
          "type": "http_proxy"
        },
        {
          "name": "TerminalProxyByNamespacedCluster",
          "name_key": "ClusterProxyService.TerminalProxyByNamespacedCluster",
          "http_method": "GET",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/terminal/{user}/{subpath:*}",
          "input": "HTTP request + x-user-id header",
          "output": "proxied terminal session",
          "auth_required": true,
          "type": "http_proxy"
        }
      ]
    },
    {
      "name": "TiDBService",
      "methods": [
        {
          "name": "AuditCheckByClusterID",
          "name_key": "TiDBService.AuditCheckByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1/audit-check",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/audit-check",
            "/proxy/cluster/{cluster_id}/v1beta1/audit-check",
            "/proxy/cluster/{cluster_id}/audit-check"
          ],
          "input": "auditReq",
          "output": "auditResp",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "AuditCheckByNamespacedCluster",
          "name_key": "TiDBService.AuditCheckByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1/audit-check",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/audit-check",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/audit-check",
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/audit-check"
          ],
          "input": "auditReq",
          "output": "auditResp",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "CreateAdminByClusterID",
          "name_key": "TiDBService.CreateAdminByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1beta1/create_admin",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/create_admin"
          ],
          "input": "createAdminModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "CreateAdminByNamespacedCluster",
          "name_key": "TiDBService.CreateAdminByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/create_admin",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/create_admin"
          ],
          "input": "createAdminModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "ExecuteByClusterID",
          "name_key": "TiDBService.ExecuteByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1beta1/execute",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/execute"
          ],
          "input": "executeModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "ExecuteByNamespacedCluster",
          "name_key": "TiDBService.ExecuteByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/execute",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/execute"
          ],
          "input": "executeModel",
          "output": "void",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "QueryByClusterID",
          "name_key": "TiDBService.QueryByClusterID",
          "http_method": "POST",
          "path": "/proxy/cluster/{cluster_id}/v1beta1/query",
          "aliases": [
            "/proxy/cluster/{cluster_id}/v1alpha1/query"
          ],
          "input": "queryModel",
          "output": "JSON row set",
          "auth_required": true,
          "type": "http"
        },
        {
          "name": "QueryByNamespacedCluster",
          "name_key": "TiDBService.QueryByNamespacedCluster",
          "http_method": "POST",
          "path": "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1beta1/query",
          "aliases": [
            "/proxy/namespace/{namespace}/cluster/{cluster_name}/v1alpha1/query"
          ],
          "input": "queryModel",
          "output": "JSON row set",
          "auth_required": true,
          "type": "http"
        }
      ]
    }
  ]
}
