{
  "repo": "tidbcloud/aws-shared-provider",
  "binary": "tidb-http-gateway",
  "binary_path": "cmd/tidb-http-gateway/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {},
  "services": [
    {
      "name": "HealthService",
      "type": "http",
      "methods": [
        {
          "name": "GET /healthz",
          "name_key": "HTTP GET /healthz",
          "description": "Health check endpoint"
        }
      ],
      "endpoints": [
        {
          "path": "/healthz",
          "method": "GET",
          "description": "Health check endpoint"
        }
      ]
    },
    {
      "name": "MetricsService",
      "type": "http",
      "methods": [
        {
          "name": "GET /metrics",
          "name_key": "HTTP GET /metrics",
          "description": "Prometheus metrics endpoint"
        }
      ],
      "endpoints": [
        {
          "path": "/metrics",
          "method": "GET",
          "description": "Prometheus metrics endpoint",
          "port": 9090
        }
      ]
    },
    {
      "name": "SQLService",
      "type": "http",
      "methods": [
        {
          "name": "POST /v1beta/sql",
          "name_key": "HTTP POST /v1beta/sql",
          "description": "Execute SQL query (stateless)"
        },
        {
          "name": "POST /v1beta/sql/proxy",
          "name_key": "HTTP POST /v1beta/sql/proxy",
          "description": "Execute SQL query proxied from other gateway pods"
        },
        {
          "name": "HandleStatefulTxnRequest",
          "name_key": "Runtime SQLService.HandleStatefulTxnRequest",
          "description": "Execute requests in a stateful transaction session"
        },
        {
          "name": "HandleStatefulNonTxnRequest",
          "name_key": "Runtime SQLService.HandleStatefulNonTxnRequest",
          "description": "Execute requests in a stateful non-transaction session"
        },
        {
          "name": "Cleanup",
          "name_key": "Runtime GCSession.Cleanup",
          "description": "Cleanup expired sessions on the periodic GC loop"
        }
      ],
      "endpoints": [
        {
          "path": "/v1beta/sql",
          "method": "POST",
          "description": "Execute SQL query (stateless)"
        },
        {
          "path": "/v1beta/sql/proxy",
          "method": "POST",
          "description": "Execute SQL query (proxied from other gateway pods)"
        }
      ],
      "headers": [
        {
          "name": "TiDB-Database",
          "description": "Target database name"
        },
        {
          "name": "TiDB-Session",
          "description": "Session identifier for stateful connections"
        },
        {
          "name": "TiDB-Isolation-Level",
          "description": "Transaction isolation level"
        },
        {
          "name": "TiDB-Stateful-Action",
          "description": "Action for stateful connections (open/close)"
        }
      ],
      "session_types": [
        {
          "name": "StatelessSession",
          "description": "Single query without transaction"
        },
        {
          "name": "StatefulTransactionSession",
          "description": "Multi-statement transaction with BEGIN/COMMIT"
        },
        {
          "name": "StatefulNonTransactionSession",
          "description": "Persistent connection without transaction"
        }
      ]
    }
  ]
}
