{
  "repo": "tidbcloud/internal-portal",
  "binary": "server",
  "binary_path": "cmd/server/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {},
  "services": [
    {
      "name": "PortalHealthAPI",
      "type": "http",
      "methods": [
        {
          "name": "Ping",
          "name_key": "PortalHealthAPI.Ping",
          "path": "/ping",
          "method": "GET",
          "description": "Kubernetes health probe on the portal Gin server."
        },
        {
          "name": "Healthz",
          "name_key": "PortalHealthAPI.Healthz",
          "path": "/healthz",
          "method": "GET",
          "description": "Alias health probe on the portal Gin server."
        }
      ]
    },
    {
      "name": "UserAlertWebhook",
      "type": "http",
      "methods": [
        {
          "name": "FireAlert",
          "name_key": "UserAlertWebhook.FireAlert",
          "path": "/api/useralerts/v1/alert",
          "method": "POST",
          "description": "Accept Alertmanager-style alert payloads and fan out user notification emails."
        }
      ]
    },
    {
      "name": "UserDebugAPI",
      "type": "http",
      "methods": [
        {
          "name": "GetFeatures",
          "name_key": "UserDebugAPI.GetFeatures",
          "path": "/api/userdebug/v1/:organization/features",
          "method": "GET",
          "description": "List feature flags visible to the authenticated organization context."
        },
        {
          "name": "ListAuthorizations",
          "name_key": "UserDebugAPI.ListAuthorizations",
          "path": "/api/userdebug/v1/:organization/authorizations",
          "method": "GET",
          "description": "List user debug authorization records for an organization."
        },
        {
          "name": "GetAuthorizationDetail",
          "name_key": "UserDebugAPI.GetAuthorizationDetail",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization/details/:auth_id",
          "method": "GET",
          "description": "Return one authorization detail record for a cluster."
        },
        {
          "name": "GetAuthorizationCode",
          "name_key": "UserDebugAPI.GetAuthorizationCode",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization",
          "method": "GET",
          "description": "Fetch the active debug authorization code for a cluster."
        },
        {
          "name": "CreateAuthorization",
          "name_key": "UserDebugAPI.CreateAuthorization",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization",
          "method": "POST",
          "description": "Create a new debug authorization for a cluster."
        },
        {
          "name": "DeleteAuthorization",
          "name_key": "UserDebugAPI.DeleteAuthorization",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization",
          "method": "DELETE",
          "description": "Revoke the active debug authorization for a cluster."
        },
        {
          "name": "ListAuthorizationRecords",
          "name_key": "UserDebugAPI.ListAuthorizationRecords",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization/records",
          "method": "GET",
          "description": "List historical authorization records for a cluster."
        },
        {
          "name": "GetAuthorizationRecord",
          "name_key": "UserDebugAPI.GetAuthorizationRecord",
          "path": "/api/userdebug/v1/:organization/:cluster/authorization/records/:auth_id",
          "method": "GET",
          "description": "Return one historical authorization record."
        }
      ]
    },
    {
      "name": "CentralGatewayHTTP",
      "type": "http",
      "methods": [
        {
          "name": "Healthz",
          "name_key": "CentralGatewayHTTP.Healthz",
          "path": "/healthz",
          "method": "GET",
          "description": "Health probe on the Gin host that wraps the grpc-gateway and admin API."
        },
        {
          "name": "Version",
          "name_key": "CentralGatewayHTTP.Version",
          "path": "/version",
          "method": "GET",
          "description": "Return git hash and central DB schema version."
        },
        {
          "name": "GetUserAlertList",
          "name_key": "CentralGatewayHTTP.GetUserAlertList",
          "path": "/api/v1/orgs/{org_id}/projects/{project_id}/user_alert",
          "method": "GET",
          "description": "grpc-gateway route for listing subscribed project user alerts."
        },
        {
          "name": "SubscribeUserAlert",
          "name_key": "CentralGatewayHTTP.SubscribeUserAlert",
          "path": "/api/v1/orgs/{org_id}/projects/{project_id}/user_alert",
          "method": "POST",
          "description": "grpc-gateway route for creating a user alert subscription."
        },
        {
          "name": "UnsubscribeUserAlert",
          "name_key": "CentralGatewayHTTP.UnsubscribeUserAlert",
          "path": "/api/v1/orgs/{org_id}/projects/{project_id}/user_alert/{user_alert_id}",
          "method": "DELETE",
          "description": "grpc-gateway route for deleting a user alert subscription."
        }
      ]
    },
    {
      "name": "AdminHTTPAPI",
      "type": "http",
      "methods": [
        {
          "name": "ReplaceNodeAndSKUByYaml",
          "name_key": "AdminHTTPAPI.ReplaceNodeAndSKUByYaml",
          "path": "/external-api/v1/orgs/profile/replace_node_and_sku",
          "method": "POST",
          "description": "API key protected profile replacement entrypoint for external automation."
        },
        {
          "name": "ListTenantClusters",
          "name_key": "AdminHTTPAPI.ListTenantClusters",
          "path": "/api/v1/admin/orgs/:org_id/clusters",
          "method": "GET",
          "description": "List clusters for one tenant in the admin surface."
        },
        {
          "name": "DeleteTenantCluster",
          "name_key": "AdminHTTPAPI.DeleteTenantCluster",
          "path": "/api/v1/admin/orgs/:org_id/clusters/:cluster_id",
          "method": "DELETE",
          "description": "Delete a tenant cluster from the admin surface."
        },
        {
          "name": "ScaleTenantCluster",
          "name_key": "AdminHTTPAPI.ScaleTenantCluster",
          "path": "/api/v1/admin/orgs/:org_id/clusters/:cluster_id/components",
          "method": "PUT",
          "description": "Scale cluster components from the admin surface."
        },
        {
          "name": "PauseTenantCluster",
          "name_key": "AdminHTTPAPI.PauseTenantCluster",
          "path": "/api/v1/admin/orgs/:org_id/clusters/:cluster_id/pause",
          "method": "POST",
          "description": "Pause a tenant cluster."
        },
        {
          "name": "ResumeTenantCluster",
          "name_key": "AdminHTTPAPI.ResumeTenantCluster",
          "path": "/api/v1/admin/orgs/:org_id/clusters/:cluster_id/resume",
          "method": "POST",
          "description": "Resume a paused tenant cluster."
        },
        {
          "name": "GetDashboardLinks",
          "name_key": "AdminHTTPAPI.GetDashboardLinks",
          "path": "/api/v1/admin/orgs/:org_id/clusters/:cluster_id/dashboard_links",
          "method": "GET",
          "description": "Return Grafana or dashboard links for a tenant cluster."
        },
        {
          "name": "ListTenantClusterLifeCycle",
          "name_key": "AdminHTTPAPI.ListTenantClusterLifeCycle",
          "path": "/api/v1/admin/orgs/:org_id/cluster-lifecycles",
          "method": "GET",
          "description": "List cluster lifecycle records for one tenant."
        },
        {
          "name": "AddProvider",
          "name_key": "AdminHTTPAPI.AddProvider",
          "path": "/api/v1/admin/providers",
          "method": "POST",
          "description": "Create a cloud provider record."
        },
        {
          "name": "ListProviders",
          "name_key": "AdminHTTPAPI.ListProviders",
          "path": "/api/v1/admin/providers",
          "method": "GET",
          "description": "List configured cloud providers."
        },
        {
          "name": "AddRegion",
          "name_key": "AdminHTTPAPI.AddRegion",
          "path": "/api/v1/admin/providers/:provider/regions",
          "method": "POST",
          "description": "Create a provider region record."
        },
        {
          "name": "UpdateRegion",
          "name_key": "AdminHTTPAPI.UpdateRegion",
          "path": "/api/v1/admin/providers/:provider/regions/:region_id",
          "method": "PUT",
          "description": "Update a provider region record."
        },
        {
          "name": "ListRegions",
          "name_key": "AdminHTTPAPI.ListRegions",
          "path": "/api/v1/admin/providers/:provider/regions",
          "method": "GET",
          "description": "List regions for one provider."
        },
        {
          "name": "GetRegionByID",
          "name_key": "AdminHTTPAPI.GetRegionByID",
          "path": "/api/v1/admin/providers/:provider/regions/:region_id",
          "method": "GET",
          "description": "Get one provider region by id."
        },
        {
          "name": "CalcNodeProfiles",
          "name_key": "AdminHTTPAPI.CalcNodeProfiles",
          "path": "/api/v1/admin/profile/query",
          "method": "POST",
          "description": "Calculate node profile recommendations from the admin surface."
        }
      ]
    },
    {
      "name": "UserAlertService",
      "type": "grpc",
      "methods": [
        {
          "name": "GetUserAlertList",
          "name_key": "UserAlertService.GetUserAlertList",
          "description": "List user alert subscriptions for one project."
        },
        {
          "name": "SubscribeUserAlert",
          "name_key": "UserAlertService.SubscribeUserAlert",
          "description": "Create a project-level user alert subscription."
        },
        {
          "name": "UnsubscribeUserAlert",
          "name_key": "UserAlertService.UnsubscribeUserAlert",
          "description": "Delete a project-level user alert subscription."
        }
      ]
    }
  ]
}
