basePath: /clinic/api/v1
definitions:
  activities.ActivityGroup:
    properties:
      activities:
        items:
          $ref: '#/definitions/activityhub_client.Activity'
        type: array
      application_id:
        type: string
      concept_id:
        type: string
      context_id:
        type: string
      name:
        type: string
      rule:
        items:
          type: string
        type: array
      severity:
        type: integer
      status:
        type: string
      target_id:
        type: string
      timeout:
        type: integer
    type: object
  activities.GetActivityGroupResponse:
    properties:
      activities:
        items:
          $ref: '#/definitions/activityhub_client.Activity'
        type: array
      application_id:
        type: string
      concept_id:
        type: string
      context_id:
        type: string
      name:
        type: string
      rule:
        items:
          type: string
        type: array
      severity:
        type: integer
      status:
        type: string
      target_id:
        type: string
      timeout:
        type: integer
    type: object
  activities.GetActivityResponse:
    properties:
      activity_id:
        type: string
      application_id:
        type: string
      author:
        type: string
      calibration_time:
        type: integer
      catalog:
        type: string
      concept_id:
        type: string
      context:
        items:
          type: string
        type: array
      context_id:
        type: string
      display_name:
        type: string
      name:
        type: string
      payload: {}
      severity:
        type: integer
      source:
        type: string
      tags:
        additionalProperties:
          type: string
        type: object
      target_id:
        type: string
      type:
        type: string
    type: object
  activities.QueryActivitiesResponse:
    properties:
      activities:
        items:
          $ref: '#/definitions/activityhub_client.Activity'
        type: array
      cursor:
        type: string
      partial:
        type: boolean
    type: object
  activities.QueryActivityGroupsResponse:
    properties:
      activity_groups:
        items:
          $ref: '#/definitions/activities.ActivityGroup'
        type: array
    type: object
  activityhub_client.Activity:
    properties:
      activity_id:
        type: string
      application_id:
        type: string
      author:
        type: string
      calibration_time:
        type: integer
      catalog:
        type: string
      concept_id:
        type: string
      context:
        items:
          type: string
        type: array
      context_id:
        type: string
      display_name:
        type: string
      name:
        type: string
      payload: {}
      severity:
        type: integer
      source:
        type: string
      tags:
        additionalProperties:
          type: string
        type: object
      target_id:
        type: string
      type:
        type: string
    type: object
  cloud.ActiveQPSResp:
    properties:
      items:
        items:
          $ref: '#/definitions/cloud.clusterInfo'
        type: array
      total:
        type: integer
    type: object
  cloud.DashboardResp:
    properties:
      has_more:
        type: boolean
      items:
        items:
          $ref: '#/definitions/view.DashboardItemExternal'
        type: array
      total:
        type: integer
    type: object
  cloud.RegionsResp:
    properties:
      items:
        items:
          type: string
        type: array
      total:
        type: integer
    type: object
  cloud.clusterInfo:
    properties:
      cluster_id:
        type: string
      cluster_name:
        type: string
      deploy_type:
        type: string
      duration:
        type: number
      max_qps:
        type: number
      org_id:
        description: clinic org_id
        type: string
      region:
        type: string
      report_uuid:
        type: string
      tenant_id:
        type: string
      tenant_name:
        type: string
      timestamp:
        type: integer
    type: object
  cluster.Cluster:
    properties:
      branches:
        items:
          type: string
        type: array
      clusterType:
        type: string
      components:
        additionalProperties:
          $ref: '#/definitions/db.ClusterComponent'
        type: object
      controlPlaneArch:
        type: string
      created:
        type: integer
      dataPlaneName:
        type: string
      dataSizeLimit:
        type: integer
      dataSizeUsed:
        description: Usage by the cluster in bytes
        type: integer
      deployType:
        type: string
      deployTypeV2:
        type: string
      endTime:
        type: integer
      featureGates:
        $ref: '#/definitions/cluster.ClusterFeatureGates'
      id:
        type: string
      k8sNamespace:
        type: string
      keyspaceID:
        description: keyspace id for serverless cluster
        type: integer
      keyspaceName:
        description: keyspace name for serverless cluster
        type: string
      lastestUpdated:
        type: integer
      maxRCU:
        description: nextgen max rcu
        type: integer
      minRCU:
        description: nextgen min rcu
        type: integer
      name:
        type: string
      networkName:
        type: string
      note:
        type: string
      parentID:
        description: nextgen physic cluster id
        type: string
      projectID:
        type: string
      provider:
        type: string
      region:
        type: string
      ruVersion:
        description: resource unit version from mgmt (Essential/Premium)
        type: integer
      shootName:
        type: string
      spendLimit:
        description: spend limit for serverless cluster
        type: integer
      startTime:
        type: integer
      status:
        type: string
      topology:
        $ref: '#/definitions/db.Topology'
      totalOncall:
        type: integer
      totalReport:
        description: PackageCount int64 `json:"package_count"`
        type: integer
      version:
        type: string
    type: object
  cluster.ClusterFeatureGates:
    properties:
      benchmarkReportEnabled:
        type: boolean
      comparisonReportEnabled:
        type: boolean
      conProfEnabled:
        type: boolean
      logsEnabled:
        type: boolean
      materializedViewEnabled:
        type: boolean
      slowQueryEnabled:
        type: boolean
      slowQueryVisualEnabled:
        type: boolean
      systemCheckReportEnabled:
        type: boolean
      topSQLEnabled:
        type: boolean
    type: object
  cluster.ClusterMetrics:
    properties:
      events:
        type: integer
      maxCpu:
        $ref: '#/definitions/cluster.MetricValue'
      maxMemory:
        $ref: '#/definitions/cluster.MetricValue'
      minUpTime:
        $ref: '#/definitions/cluster.MetricValue'
      reports:
        type: integer
      sla:
        type: string
      storageSize:
        type: string
    type: object
  cluster.DataInfo:
    properties:
      collectors:
        items:
          type: string
        type: array
      endTime:
        type: integer
      filename:
        type: string
      haveConfig:
        type: boolean
      haveLog:
        type: boolean
      haveMetric:
        type: boolean
      itemID:
        type: string
      startTime:
        type: integer
    type: object
  cluster.DataSummaryResponse:
    properties:
      dataInfos:
        items:
          $ref: '#/definitions/cluster.DataInfo'
        type: array
      total:
        type: integer
    type: object
  cluster.DataUrl:
    properties:
      name:
        type: string
      url:
        description: Uid   string `json:"uid"`
        type: string
    type: object
  cluster.DefaultConfiguration:
    properties:
      items:
        additionalProperties:
          items:
            $ref: '#/definitions/db.DefaultConfiguration'
          type: array
        type: object
    type: object
  cluster.FileMeta:
    properties:
      briefSize:
        type: string
      collectors:
        items:
          type: string
        type: array
      filename:
        type: string
      totalSize:
        type: string
    type: object
  cluster.ListClustersResp:
    properties:
      items:
        items:
          $ref: '#/definitions/cluster.Cluster'
        type: array
      total:
        type: integer
    type: object
  cluster.MetricValue:
    properties:
      component:
        type: string
      value:
        type: string
    type: object
  cluster.SimpleClusterResponse:
    properties:
      clusterId:
        type: string
      createdAt:
        type: integer
      deployType:
        type: string
      deployTypeV2:
        type: string
      name:
        type: string
      orgId:
        type: integer
      projectId:
        type: string
      provider:
        type: string
      region:
        type: string
      status:
        type: string
      tenantId:
        type: integer
      updatedAt:
        type: integer
      version:
        type: string
    type: object
  cluster.SloganResp:
    properties:
      createAt:
        type: integer
      id:
        type: integer
      text:
        type: string
    type: object
  cluster.SloganRespList:
    properties:
      items:
        items:
          $ref: '#/definitions/cluster.SloganResp'
        type: array
      total:
        type: integer
    type: object
  cluster.SlowQueryProfile:
    additionalProperties: {}
    type: object
  cluster.UpdateClusterReq:
    properties:
      description:
        type: string
      name:
        type: string
    type: object
  common.FlushResponse:
    properties:
      result:
        type: string
    type: object
  common.PreCreateResponse:
    properties:
      blockbytes:
        type: integer
      sequence:
        type: integer
    type: object
  common.Rebuild:
    properties:
      clusterID:
        type: string
      dataType:
        type: integer
      healthReport:
        description: if build health report
        type: boolean
      healthReportEndUnix:
        description: only used when health report is for cluster under cloud org
        type: integer
      healthReportStartUnix:
        description: only used when health report is for cluster under cloud org
        type: integer
      itemID:
        type: string
      orgID:
        type: integer
      orgType:
        type: string
    type: object
  common.SuccessResp:
    properties:
      status:
        type: string
    type: object
  common.TaskStatus:
    properties:
      endTime:
        type: integer
      itemID:
        type: string
      startTime:
        type: integer
      status:
        type: integer
      taskType:
        type: integer
    type: object
  common.TaskStatusResp:
    properties:
      items:
        items:
          $ref: '#/definitions/common.TaskStatus'
        type: array
    type: object
  compute_engine.ComparisonReport:
    properties:
      args:
        $ref: '#/definitions/compute_engine.ComparisonReportArgs'
      created_at:
        type: integer
      data:
        $ref: '#/definitions/compute_engine.ComparisonReportData'
      hook:
        type: string
      id:
        type: string
      name:
        type: string
      status:
        type: string
      tags:
        additionalProperties: {}
        type: object
      updated_at:
        type: integer
    type: object
  compute_engine.ComparisonReportArgs:
    properties:
      cluster:
        type: string
      org_id:
        type: string
      org_type:
        type: string
      package_id_1:
        items:
          type: string
        type: array
      package_id_2:
        items:
          type: string
        type: array
      start_ts_1:
        type: integer
      start_ts_2:
        type: integer
      stop_ts_1:
        type: integer
      stop_ts_2:
        type: integer
    type: object
  compute_engine.ComparisonReportData:
    properties:
      businessMetricsComparison:
        items:
          properties:
            subValues:
              items:
                properties:
                  subValues: {}
                  values:
                    properties:
                      components:
                        type: string
                      description:
                        properties:
                          key:
                            type: string
                          variables: {}
                        type: object
                      diff:
                        type: number
                      grafanaLocation:
                        type: string
                      label:
                        type: string
                      metrics:
                        type: string
                      t1AverageValue:
                        type: string
                      t2AverageValue:
                        type: string
                    type: object
                type: object
              type: array
            values:
              properties:
                components:
                  type: string
                description:
                  properties:
                    key:
                      type: string
                    variables: {}
                  type: object
                diff:
                  type: number
                grafanaLocation:
                  type: string
                label:
                  type: string
                metrics:
                  type: string
                t1AverageValue:
                  type: string
                t2AverageValue:
                  type: string
              type: object
          type: object
        type: array
      comparisonTimeRange:
        items:
          properties:
            subValues: {}
            values:
              properties:
                t1EndTime:
                  type: integer
                t1StartTime:
                  type: integer
                t2EndTime:
                  type: integer
                t2StartTime:
                  type: integer
              type: object
          type: object
        type: array
      errorMessage:
        type: string
      keyMetricsComparison:
        items:
          properties:
            subValues:
              items:
                properties:
                  subValues: {}
                  values:
                    properties:
                      components:
                        type: string
                      description:
                        properties:
                          key:
                            type: string
                          variables: {}
                        type: object
                      diff:
                        type: number
                      grafanaLocation:
                        type: string
                      label:
                        type: string
                      metrics:
                        type: string
                      t1AverageValue:
                        type: string
                      t2AverageValue:
                        type: string
                    type: object
                type: object
              type: array
            values:
              properties:
                components:
                  type: string
                description:
                  properties:
                    key:
                      type: string
                    variables: {}
                  type: object
                diff:
                  type: number
                grafanaLocation:
                  type: string
                label:
                  type: string
                metrics:
                  type: string
                t1AverageValue:
                  type: string
                t2AverageValue:
                  type: string
              type: object
          type: object
        type: array
      logComparison:
        items:
          properties:
            subValues: {}
            values:
              properties:
                diff:
                  type: integer
                name:
                  type: string
                t1Percentage:
                  type: string
                t2Percentage:
                  type: string
              type: object
          type: object
        type: array
      performanceMetricsComparison:
        properties:
          Perf_basic:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff: {}
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue: {}
                    t2AverageValue: {}
                  type: object
              type: object
            type: array
          Perf_detailed:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff:
                      type: number
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue:
                      type: string
                    t2AverageValue:
                      type: string
                  type: object
              type: object
            type: array
          Perf_durbytype:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff:
                      type: number
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue:
                      type: string
                    t2AverageValue:
                      type: string
                  type: object
              type: object
            type: array
          Perf_kvrequest:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff: {}
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue: {}
                    t2AverageValue: {}
                  type: object
              type: object
            type: array
          Perf_phase:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff:
                      type: number
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue:
                      type: string
                    t2AverageValue:
                      type: string
                  type: object
              type: object
            type: array
          Perf_sqlexecute:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key: {}
                        variables: {}
                      type: object
                    diff:
                      type: number
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue:
                      type: string
                    t2AverageValue:
                      type: string
                  type: object
              type: object
            type: array
          Perf_type:
            items:
              properties:
                subValues: {}
                values:
                  properties:
                    components:
                      type: string
                    description:
                      properties:
                        key:
                          type: string
                        variables: {}
                      type: object
                    diff:
                      type: number
                    grafanaLocation:
                      type: string
                    label:
                      type: string
                    metrics:
                      type: string
                    t1AverageValue:
                      type: string
                    t2AverageValue:
                      type: string
                  type: object
              type: object
            type: array
        type: object
      resourceMetricsComparison:
        items:
          properties:
            subValues:
              items:
                properties:
                  subValues: {}
                  values:
                    properties:
                      components:
                        type: string
                      description:
                        properties:
                          key:
                            type: string
                          variables: {}
                        type: object
                      diff:
                        type: number
                      grafanaLocation:
                        type: string
                      label:
                        type: string
                      metrics:
                        type: string
                      t1AverageValue:
                        type: string
                      t2AverageValue:
                        type: string
                    type: object
                type: object
              type: array
            values:
              properties:
                components:
                  type: string
                description:
                  properties:
                    key:
                      type: string
                    variables: {}
                  type: object
                diff:
                  type: integer
                grafanaLocation:
                  type: string
                label:
                  type: string
                metrics:
                  type: string
                t1AverageValue:
                  type: string
                t2AverageValue:
                  type: string
              type: object
          type: object
        type: array
    type: object
  compute_engine.HealthDataResult:
    properties:
      log:
        $ref: '#/definitions/compute_engine.HealthLogResult'
      metric:
        $ref: '#/definitions/compute_engine.HealthMetricResult'
    type: object
  compute_engine.HealthLogAdvice:
    properties:
      category:
        items:
          type: string
        type: array
      component:
        type: string
      conditions:
        items:
          type: string
        type: array
      content:
        properties:
          key:
            type: string
          variables:
            additionalProperties: {}
            type: object
        type: object
      count:
        type: integer
      id:
        type: integer
      instance:
        type: string
      kb:
        type: string
      level:
        type: string
      name:
        type: string
      type:
        type: string
    type: object
  compute_engine.HealthLogResult:
    properties:
      advice:
        items:
          $ref: '#/definitions/compute_engine.HealthLogAdvice'
        type: array
      source:
        type: string
      stats:
        $ref: '#/definitions/compute_engine.HealthLogStats'
      timestamp:
        type: integer
    type: object
  compute_engine.HealthLogStats:
    properties:
      scannedLogs:
        type: integer
    type: object
  compute_engine.HealthMetricAdvice:
    properties:
      category:
        items:
          type: string
        type: array
      component:
        type: string
      content:
        properties:
          key:
            type: string
          variables:
            additionalProperties: {}
            type: object
        type: object
      id:
        type: integer
      instance:
        type: string
      kb:
        type: string
      level:
        type: string
      name:
        type: string
      qualified:
        type: boolean
      type:
        type: string
    type: object
  compute_engine.HealthMetricResult:
    properties:
      advice:
        items:
          $ref: '#/definitions/compute_engine.HealthMetricAdvice'
        type: array
      source:
        type: string
      stats:
        $ref: '#/definitions/compute_engine.HealthMetricStats'
      timestamp:
        type: integer
    type: object
  compute_engine.HealthMetricStats:
    properties:
      checkedRules:
        type: integer
      scannedMetrics:
        type: integer
    type: object
  compute_engine.HealthReportArgs:
    properties:
      cluster:
        type: string
      start_ts:
        type: integer
      stop_ts:
        type: integer
    type: object
  compute_engine.Report:
    properties:
      args:
        $ref: '#/definitions/compute_engine.HealthReportArgs'
      created_at:
        type: integer
      data:
        $ref: '#/definitions/compute_engine.HealthDataResult'
      hook:
        type: string
      id:
        type: string
      name:
        type: string
      status:
        type: string
      tags:
        additionalProperties: {}
        type: object
      updated_at:
        type: integer
    type: object
  db.ClusterComponent:
    properties:
      TidbGroupId:
        type: integer
      cpuNum:
        type: integer
      memoryGi:
        type: integer
      replicas:
        type: integer
      storageInstanceType:
        type: string
      storageSizeGi:
        type: integer
      storageType:
        description: StorageType only used for tikv and tiflash
        type: string
      storages:
        additionalProperties:
          $ref: '#/definitions/db.ComponentStorage'
        type: object
      tidbGroupDisplayName:
        type: string
      tidbGroups:
        items:
          $ref: '#/definitions/db.TidbGroup'
        type: array
      tierName:
        type: string
    type: object
  db.ComparisonArg:
    properties:
      endTime1:
        type: integer
      endTime2:
        type: integer
      packageID1:
        items:
          type: string
        type: array
      packageID2:
        items:
          type: string
        type: array
      startTime1:
        type: integer
      startTime2:
        type: integer
    type: object
  db.ComponentStorage:
    properties:
      additional_iops:
        type: integer
      disk_type:
        type: string
      iops:
        type: integer
      size_gi:
        type: integer
      throughput_mibps:
        type: integer
      volume_type:
        type: string
    type: object
  db.DefaultConfiguration:
    properties:
      defaultValue:
        type: string
      itemName:
        type: string
      valueType:
        type: string
    type: object
  db.TidbGroup:
    properties:
      cpuNum:
        type: integer
      createdAt:
        type: string
      deletedAt:
        type: string
      displayName:
        type: string
      id:
        type: integer
      isDefault:
        type: boolean
      memoryGi:
        type: integer
      replicas:
        type: integer
      tierName:
        type: string
    type: object
  db.Topology:
    properties:
      dmMaster:
        type: integer
      dmWorker:
        type: integer
      pd:
        type: integer
      tidb:
        type: integer
      tiflash:
        type: integer
      tikv:
        type: integer
    type: object
  healthcheck.CheckItem:
    properties:
      checkType:
        description: sql, metrics, log, etc.
        type: string
      description:
        description: Item description
        type: string
      enabled:
        description: Whether this item is enabled
        type: boolean
      errorMsg:
        description: Error message if failed
        type: string
      failed:
        description: Whether this item failed during execution
        type: boolean
      name:
        description: Item name (unique within strategy)
        type: string
      params:
        description: JSON formatted parameters
        type: string
    required:
    - checkType
    - name
    type: object
  healthcheck.HealthCheckCombinedReport:
    properties:
      clusterId:
        type: string
      createdAt:
        type: string
      dbaasOrgId:
        type: string
      items:
        items:
          $ref: '#/definitions/healthcheck.HealthCheckItemReport'
        type: array
      status:
        description: success, partial, failed
        type: string
      strategyUuid:
        type: string
      timeRangeAEnd:
        type: string
      timeRangeAStart:
        type: string
      timeRangeBEnd:
        type: string
      timeRangeBStart:
        type: string
    type: object
  healthcheck.HealthCheckItemReport:
    properties:
      checkType:
        type: string
      content:
        description: The actual report content from S3
        type: object
      description:
        type: string
      errorMsg:
        type: string
      name:
        type: string
      params:
        type: object
      status:
        description: success, failed
        type: string
    type: object
  healthcheck.HealthCheckResultResp:
    properties:
      clusterId:
        type: string
      createdAt:
        type: string
      creator:
        type: string
      dbaasOrgId:
        description: dbaas org id from URL
        type: string
      errorMsg:
        type: string
      itemsToRun:
        description: Items to run (from strategy)
        items:
          type: string
        type: array
      metadata:
        type: string
      status:
        type: string
      strategyUuid:
        type: string
      timeRangeAEnd:
        type: string
      timeRangeAStart:
        type: string
      timeRangeBEnd:
        type: string
      timeRangeBStart:
        type: string
      updatedAt:
        type: string
      uuid:
        type: string
    type: object
  healthcheck.HealthCheckStrategyReq:
    properties:
      description:
        type: string
      items:
        description: Check items as structured array
        items:
          $ref: '#/definitions/healthcheck.CheckItem'
        type: array
      name:
        type: string
      scheduleExpr:
        description: cron expression
        type: string
      scheduleType:
        description: Schedule configuration
        type: string
      timeRangeAEnd:
        type: string
      timeRangeAStart:
        description: |-
          Default time range for all check items (string format)
          Supported formats:
          - "now": current time
          - numeric string (e.g., "-3600"): relative time offset in seconds from now
          - time string (e.g., "2026-01-01T00:00:00Z"): absolute time
          - "HH:MM" (range A only, both ends): a time-of-day inspection window. For
            cron strategies the backend resolves it to the most recent occurrence
            before the trigger, interpreting the clock in the CRON_TZ timezone.
        type: string
      timeRangeBEnd:
        type: string
      timeRangeBStart:
        type: string
    required:
    - name
    type: object
  healthcheck.HealthCheckStrategyResp:
    properties:
      clusterId:
        type: string
      createdAt:
        type: string
      creator:
        type: string
      creatorId:
        type: integer
      dbaasOrgId:
        description: dbaas org id from URL
        type: string
      description:
        type: string
      items:
        description: Check items as structured array
        items:
          $ref: '#/definitions/healthcheck.CheckItem'
        type: array
      lastRunAt:
        type: string
      name:
        type: string
      nextRunAt:
        type: string
      scheduleExpr:
        type: string
      scheduleType:
        type: string
      status:
        type: string
      timeRangeAEnd:
        type: string
      timeRangeAStart:
        type: string
      timeRangeBEnd:
        type: string
      timeRangeBStart:
        type: string
      updatedAt:
        type: string
      uuid:
        type: string
    type: object
  healthcheck.HealthCheckTaskResp:
    properties:
      resultUuid:
        type: string
    type: object
  healthcheck.ListHealthCheckResultResp:
    properties:
      results:
        items:
          $ref: '#/definitions/healthcheck.HealthCheckResultResp'
        type: array
      total:
        type: integer
    type: object
  healthcheck.ListHealthCheckStrategyResp:
    properties:
      strategies:
        items:
          $ref: '#/definitions/healthcheck.HealthCheckStrategyResp'
        type: array
      total:
        type: integer
    type: object
  healthcheck.TriggerHealthCheckReq:
    properties:
      itemNames:
        description: 'Optional: specific item names to run (if empty, run all enabled
          items)'
        items:
          type: string
        type: array
      timeRangeAEnd:
        type: string
      timeRangeAStart:
        description: |-
          Optional time range override (string format)
          Supported formats:
          - "now": current time
          - numeric string (e.g., "-3600"): relative time offset in seconds from now
          - time string (e.g., "2026-01-01T00:00:00Z"): absolute time
        type: string
      timeRangeBEnd:
        type: string
      timeRangeBStart:
        type: string
    type: object
  internal_api.ClusterDataURLsResponse:
    properties:
      clinicTenantId:
        type: string
      clusterId:
        type: string
      clusterMetricsUrl:
        type: string
      clusterName:
        type: string
      createTime:
        type: integer
      dataPlaneMetricsUrl:
        type: string
      deployType:
        type: string
      deployTypeV2:
        type: string
      logStatsS3Url:
        type: string
      lokiUrl:
        type: string
      orgId:
        type: string
      parentId:
        description: nextgen physical cluster id, for Premium/Byoc dataplane metrics
        type: string
      projectId:
        type: string
      provider:
        type: string
      region:
        type: string
      slowQueryS3Url:
        type: string
      statementsS3Url:
        type: string
      status:
        type: string
      topsqlS3Url:
        type: string
    type: object
  internal_key.CreateKeyRequest:
    properties:
      expires_in:
        description: Optional expiration in seconds
        type: integer
      name:
        type: string
    type: object
  internal_key.KeyResponse:
    properties:
      created_at:
        type: integer
      expires_at:
        type: integer
      id:
        type: integer
      key:
        description: Only returned on creation
        type: string
      name:
        type: string
      status:
        type: string
    type: object
  internal_key.ListKeysResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/internal_key.KeyResponse'
        type: array
      total:
        type: integer
    type: object
  login.OAuthInfoResp:
    properties:
      auth_url:
        type: string
    type: object
  login.Validation:
    properties:
      code:
        type: string
      redirect_uri:
        type: string
      state:
        type: string
    type: object
  login.ValidationResp:
    properties:
      session_key:
        type: string
    type: object
  nextgen_client.GeneratePlanReplayerFileDownloadURLRequest:
    properties:
      fileName:
        type: string
    type: object
  nextgen_client.GeneratePlanReplayerFileDownloadURLResponse:
    properties:
      downloadUrl:
        type: string
      expireTime:
        type: string
    type: object
  nextgen_client.ListPlanReplayerFilesResponse:
    properties:
      files:
        items:
          $ref: '#/definitions/nextgen_client.PlanReplayerFile'
        type: array
      nextPageToken:
        type: string
    type: object
  nextgen_client.PlanReplayerFile:
    properties:
      fileName:
        type: string
      lastModified:
        type: string
      sizeBytes:
        type: string
      storageUri:
        type: string
    type: object
  oldreport.ComparisonReport:
    properties:
      args:
        $ref: '#/definitions/db.ComparisonArg'
      createdAt:
        type: integer
      creator:
        type: string
      id:
        type: integer
      status:
        type: string
    type: object
  oldreport.ComparisonReportResp:
    properties:
      reports:
        items:
          $ref: '#/definitions/oldreport.ComparisonReport'
        type: array
      total:
        type: integer
    type: object
  oldreport.HealthData:
    properties:
      createdAt:
        type: integer
      data:
        $ref: '#/definitions/compute_engine.Report'
      updatedAt:
        type: integer
    type: object
  oldreport.HealthReport:
    properties:
      endTime:
        type: integer
      existed:
        type: boolean
      healthData:
        $ref: '#/definitions/oldreport.HealthData'
      inRebuild:
        type: boolean
      itemID:
        type: string
      progress:
        type: integer
      startTime:
        type: integer
      status:
        type: string
    type: object
  oldreport.HealthReportReq:
    properties:
      endTime:
        description: unix seconds, used when the health report is for cluster under
          cloud org.
        type: integer
      itemID:
        type: string
      startTime:
        description: unix seconds, used when the health report is for cluster under
          cloud org.
        type: integer
    type: object
  oldreport.HealthReportResp:
    properties:
      reports:
        items:
          $ref: '#/definitions/oldreport.HealthReport'
        type: array
    type: object
  oldreport.ListTrafficComparisonReportResp:
    properties:
      reports:
        items:
          $ref: '#/definitions/oldreport.TrafficComparisonReport'
        type: array
      total:
        type: integer
    type: object
  oldreport.ReportResp:
    properties:
      taskID:
        type: string
    type: object
  oldreport.TouchComparisonReportReq:
    properties:
      endTime1:
        type: integer
      endTime2:
        type: integer
      packageID1:
        items:
          type: string
        type: array
      packageID2:
        items:
          type: string
        type: array
      startTime1:
        type: integer
      startTime2:
        type: integer
    type: object
  oldreport.TouchTrafficComparisonReportReq:
    properties:
      clusterID1:
        type: string
      clusterID2:
        type: string
      endTime1:
        type: integer
      endTime2:
        type: integer
      name:
        type: string
      startTime1:
        type: integer
      startTime2:
        type: integer
    type: object
  oldreport.TrafficComparisonReport:
    properties:
      clusterID1:
        type: string
      clusterID2:
        type: string
      createdAt:
        type: integer
      creator:
        type: string
      data:
        $ref: '#/definitions/oldreport.TrafficComparisonReportData'
      datetimeDiff:
        type: integer
      endTime1:
        type: integer
      endTime2:
        type: integer
      error:
        type: string
      id:
        type: string
      name:
        type: string
      overAllDiff:
        type: integer
      startTime1:
        type: integer
      startTime2:
        type: integer
      status:
        type: string
    type: object
  oldreport.TrafficComparisonReportData:
    properties:
      metricsDiff: {}
      sqlDiff: {}
    type: object
  org.ApiKeyResponse:
    properties:
      createdTime:
        type: integer
      id:
        type: integer
      key:
        description: Name string `json:"name"`
        type: string
    type: object
  org.Invite:
    properties:
      role:
        type: integer
      userName:
        type: string
    type: object
  org.InvitesReq:
    properties:
      invites:
        items:
          $ref: '#/definitions/org.Invite'
        type: array
    type: object
  org.ListApiKeyResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/org.ApiKeyResponse'
        type: array
      total:
        type: integer
    type: object
  org.ListOrganizationsResp:
    properties:
      items:
        items:
          $ref: '#/definitions/org.Organization'
        type: array
      total:
        type: integer
    type: object
  org.ListProjectsResp:
    properties:
      items:
        items:
          $ref: '#/definitions/org.Project'
        type: array
      total:
        type: integer
    type: object
  org.ListUsersResp:
    properties:
      items:
        items:
          $ref: '#/definitions/org.User'
        type: array
      total:
        type: integer
    type: object
  org.Organization:
    properties:
      clusterCount:
        type: integer
      description:
        type: string
      emailDomain:
        type: string
      externalID:
        type: string
      id:
        type: string
      isStarred:
        type: boolean
      lastUpdated:
        type: integer
      name:
        type: string
      owner:
        type: string
      roleNames:
        description: 'TODO: it should be in new api but UI hope to put in this response'
        items:
          type: string
        type: array
      type:
        type: string
    type: object
  org.Project:
    properties:
      id:
        type: string
      name:
        type: string
    type: object
  org.Role:
    properties:
      id:
        type: integer
      name:
        type: string
    type: object
  org.TaskStatus:
    properties:
      name:
        type: string
      process:
        type: integer
      size:
        type: integer
      taskType:
        type: string
    type: object
  org.UpdateOrganizationReq:
    properties:
      description:
        type: string
      name:
        type: string
    type: object
  org.User:
    properties:
      roleName:
        type: string
      userID:
        type: integer
      userName:
        type: string
    type: object
  report.GetReportResponse:
    properties:
      args: {}
      createdAt:
        type: integer
      creator:
        type: string
      data: {}
      progress:
        type: integer
      status:
        type: string
    type: object
  report.ListReportResponse:
    properties:
      reports:
        items:
          $ref: '#/definitions/report.reportOverview'
        type: array
      total:
        type: integer
    type: object
  report.PutReportRequest:
    properties:
      data: {}
      progress:
        type: integer
      status:
        type: string
    type: object
  report.ReportStatistics:
    properties:
      count:
        type: integer
    type: object
  report.TouchReportRequest:
    properties:
      begin_ts:
        description: these field exist for validate, other field will also pass to
          compute-engine
        type: integer
      end_ts:
        type: integer
      package_id:
        type: string
    type: object
  report.TouchReportResponse:
    properties:
      report_id:
        description: Status   string `json:"status"`
        type: string
    type: object
  report.reportOverview:
    properties:
      args: {}
      createdAt:
        type: integer
      creator:
        type: string
      progress:
        type: integer
      report_id:
        type: string
      report_type:
        type: string
      status:
        type: string
    type: object
  user.UserResp:
    properties:
      createdAt:
        type: integer
      email:
        type: string
      internal:
        type: boolean
      userName:
        type: string
    type: object
  view.DashboardItemExternal:
    properties:
      clusterCreatedAt:
        type: integer
      clusterDataPlaneName:
        type: string
      clusterDeletedAt:
        type: integer
      clusterDeployType:
        type: string
      clusterDeployTypeV2:
        type: string
      clusterDuration:
        type: string
      clusterID:
        type: string
      clusterK8sNamespace:
        type: string
      clusterName:
        type: string
      clusterNetworkName:
        type: string
      clusterProviderName:
        type: string
      clusterRegionName:
        type: string
      clusterShootName:
        type: string
      clusterStatus:
        type: string
      clusterType:
        type: string
      clusterVersion:
        type: string
      controlPlaneArch:
        type: string
      orgID:
        type: string
      parentID:
        type: string
      projectID:
        type: string
      tenantID:
        type: string
      tenantName:
        type: string
      tenantPlan:
        type: string
      topology:
        $ref: '#/definitions/db.Topology'
    type: object
  view.ResourcePoolComponent:
    properties:
      component_type:
        type: string
      cpu:
        type: integer
      id:
        description: id means the component group id
        type: string
      image:
        $ref: '#/definitions/view.ResourcePoolImage'
      max_node_count:
        type: integer
      memory_gi:
        type: integer
      min_node_count:
        type: integer
      node_count:
        type: integer
      phase:
        type: string
      storages:
        description: include storage and tikv additional storage
        items:
          $ref: '#/definitions/view.ResourcePoolStorage'
        type: array
      version:
        type: string
    type: object
  view.ResourcePoolImage:
    properties:
      repo:
        type: string
      tag:
        type: string
    type: object
  view.ResourcePoolStorage:
    properties:
      iops:
        description: the storage iops
        type: integer
      name:
        description: the storage name
        type: string
      size_gi:
        description: the storage size
        type: integer
      throughput_mbs:
        description: the storage throughput
        type: integer
      type:
        description: |-
          the storage type
          aws s3/io2 or gcp gcs
          or azure blob
        type: string
    type: object
info:
  contact: {}
  description: This is a Clinic server.
  title: Clinic Example API
  version: "1.0"
paths:
  /activityhub/applications/{application_id}/targets/{target_id}/activities:
    get:
      consumes:
      - application/json
      description: list activities
      parameters:
      - description: application_id
        in: path
        name: application_id
        required: true
        type: string
      - description: target_id
        in: path
        name: target_id
        required: true
        type: string
      - description: begin_ts
        in: query
        name: begin_ts
        required: true
        type: integer
      - description: end_ts
        in: query
        name: end_ts
        required: true
        type: integer
      - description: catalog
        in: query
        name: catalog
        type: string
      - description: type
        in: query
        name: type
        type: string
      - description: name
        in: query
        name: name
        type: string
      - description: severity
        in: query
        name: severity
        type: integer
      - description: limit
        in: query
        name: limit
        type: integer
      - description: coursor for page limit
        in: header
        name: cursor
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/activities.QueryActivitiesResponse'
      summary: list activities
  /activityhub/applications/{application_id}/targets/{target_id}/activities/{activity_id}:
    get:
      consumes:
      - application/json
      description: get activity
      parameters:
      - description: application_id
        in: path
        name: application_id
        required: true
        type: string
      - description: target_id
        in: path
        name: target_id
        required: true
        type: string
      - description: activity id
        in: path
        name: activity_id
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/activities.GetActivityResponse'
      summary: get activity
  /activityhub/applications/{application_id}/targets/{target_id}/activitygroups:
    get:
      consumes:
      - application/json
      description: list activity groups
      parameters:
      - description: application_id
        in: path
        name: application_id
        required: true
        type: string
      - description: target_id
        in: path
        name: target_id
        required: true
        type: string
      - description: begin_ts
        in: query
        name: begin_ts
        required: true
        type: integer
      - description: end_ts
        in: query
        name: end_ts
        required: true
        type: integer
      - description: severity
        in: query
        name: severity
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/activities.QueryActivityGroupsResponse'
      summary: list activity groups
  /activityhub/applications/{application_id}/targets/{target_id}/activitygroups/{context_id}:
    get:
      consumes:
      - application/json
      description: get activitygroup
      parameters:
      - description: application_id
        in: path
        name: application_id
        required: true
        type: string
      - description: target_id
        in: path
        name: target_id
        required: true
        type: string
      - description: context id
        in: path
        name: context_id
        required: true
        type: string
      - description: type
        in: query
        name: type
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/activities.GetActivityGroupResponse'
      summary: get activitygroup
  /activityhub/applications/{application_id}/targets/{target_id}/contexts/{context_id}:
    post:
      description: post gitops activity
      parameters:
      - description: application_id
        in: path
        name: application_id
        required: true
        type: string
      - description: target_id
        in: path
        name: target_id
        required: true
        type: string
      - description: context id
        in: path
        name: context_id
        required: true
        type: string
      - description: type
        in: query
        name: type
        type: string
      - description: summary
        in: query
        name: summary
        type: string
      responses:
        "202":
          description: Accepted
          schema:
            type: string
      summary: post gitops activity
  /activityhub/file/download:
    get:
      description: download activity file
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: ActivityHub activity id
        in: query
        name: activity_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: file
      summary: Download activity file
  /activityhub/file/view:
    get:
      description: view activity file
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: ActivityHub activity id
        in: query
        name: activity_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: View activity file
  /clinic/api/v1/healthcheck/ai/analyze:
    post:
      consumes:
      - application/json
      description: AI analyze for health check (internal users only)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            additionalProperties: true
            type: object
      summary: AI Health Check Analyze
      tags:
      - HealthCheck
  /clusters/{cid}:
    get:
      description: Get cluster basic information by cluster id (lightweight direct
        DB lookup)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.SimpleClusterResponse'
      summary: Get cluster basic info by ID
      tags:
      - Cluster
  /compute-engine/{oid}/{cid}/comparison:
    get:
      consumes:
      - application/json
      description: list comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.ComparisonReportResp'
      summary: list comparison report
      tags:
      - Report
    post:
      consumes:
      - application/json
      description: touch report in on cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: comparison report param
        in: body
        name: report-param
        required: true
        schema:
          $ref: '#/definitions/oldreport.TouchComparisonReportReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.ReportResp'
      summary: Touch New Comparison Report Job
      tags:
      - Report
  /compute-engine/{oid}/{cid}/comparison/{rid}:
    delete:
      consumes:
      - application/json
      description: delete comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: delete comparison report
      tags:
      - Report
    get:
      consumes:
      - application/json
      description: list comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/compute_engine.ComparisonReport'
      summary: get comparison report
      tags:
      - Report
  /compute-engine/{oid}/{cid}/health:
    get:
      consumes:
      - application/json
      description: list health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: start time
        in: query
        name: startTime
        type: integer
      - description: end time
        in: query
        name: endTime
        type: integer
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.HealthReportResp'
      summary: list health report
      tags:
      - HealthReport
    post:
      consumes:
      - application/json
      description: touch Health report in on cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: health report param
        in: body
        name: reportParams
        required: true
        schema:
          $ref: '#/definitions/oldreport.HealthReportReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.ReportResp'
      summary: Touch New Health Report Job
      tags:
      - HealthReport
  /compute-engine/{oid}/{cid}/health/{rid}:
    delete:
      consumes:
      - application/json
      description: delete health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: delete health report
      tags:
      - HealthReport
    get:
      consumes:
      - application/json
      description: list health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/compute_engine.Report'
      summary: get health report
      tags:
      - HealthReport
  /compute-engine/{oid}/{cid}/healthcheck/result:
    get:
      consumes:
      - application/json
      description: list health check results for a cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: the page index
        in: query
        name: page
        type: integer
      - description: the count per page
        in: query
        name: limit
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.ListHealthCheckResultResp'
      summary: List Health Check Results
      tags:
      - HealthCheck
  /compute-engine/{oid}/{cid}/healthcheck/result/{uuid}:
    delete:
      consumes:
      - application/json
      description: delete a health check result
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: result uuid
        in: path
        name: uuid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Delete Health Check Result
      tags:
      - HealthCheck
    get:
      consumes:
      - application/json
      description: get a combined health check report by result uuid (returns all
        check items for the same report)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: result uuid
        in: path
        name: uuid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.HealthCheckCombinedReport'
      summary: Get Health Check Result
      tags:
      - HealthCheck
  /compute-engine/{oid}/{cid}/healthcheck/strategy:
    get:
      consumes:
      - application/json
      description: list health check strategies for a cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: the page index
        in: query
        name: page
        type: integer
      - description: the count per page
        in: query
        name: limit
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.ListHealthCheckStrategyResp'
      summary: List Health Check Strategies
      tags:
      - HealthCheck
    post:
      consumes:
      - application/json
      description: create a new health check strategy with check items
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: health check strategy
        in: body
        name: strategy
        required: true
        schema:
          $ref: '#/definitions/healthcheck.HealthCheckStrategyReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.HealthCheckStrategyResp'
      summary: Create Health Check Strategy
      tags:
      - HealthCheck
  /compute-engine/{oid}/{cid}/healthcheck/strategy/{uuid}:
    delete:
      consumes:
      - application/json
      description: delete a health check strategy
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: strategy uuid
        in: path
        name: uuid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Delete Health Check Strategy
      tags:
      - HealthCheck
    get:
      consumes:
      - application/json
      description: get a health check strategy by uuid
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: strategy uuid
        in: path
        name: uuid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.HealthCheckStrategyResp'
      summary: Get Health Check Strategy
      tags:
      - HealthCheck
    put:
      consumes:
      - application/json
      description: update a health check strategy (including items)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: strategy uuid
        in: path
        name: uuid
        required: true
        type: string
      - description: health check strategy
        in: body
        name: strategy
        required: true
        schema:
          $ref: '#/definitions/healthcheck.HealthCheckStrategyReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.HealthCheckStrategyResp'
      summary: Update Health Check Strategy
      tags:
      - HealthCheck
  /compute-engine/{oid}/{cid}/healthcheck/strategy/{uuid}/trigger:
    post:
      consumes:
      - application/json
      description: trigger health check for a strategy (runs all enabled items or
        specified items)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: strategy uuid
        in: path
        name: uuid
        required: true
        type: string
      - description: optional item selection and time range override
        in: body
        name: trigger
        schema:
          $ref: '#/definitions/healthcheck.TriggerHealthCheckReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/healthcheck.HealthCheckTaskResp'
      summary: Trigger Health Check
      tags:
      - HealthCheck
  /compute-engine/{oid}/{cid}/trafficcomparison:
    get:
      consumes:
      - application/json
      description: list traffic comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.ListTrafficComparisonReportResp'
      summary: list traffic comparison report
      tags:
      - Report
    post:
      consumes:
      - application/json
      description: touch report in on cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: traffic comparison report param
        in: body
        name: report-param
        required: true
        schema:
          $ref: '#/definitions/oldreport.TouchTrafficComparisonReportReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.ReportResp'
      summary: Touch New Traffic Comparison Report Job
      tags:
      - Report
  /compute-engine/{oid}/{cid}/trafficcomparison/{rid}:
    delete:
      consumes:
      - application/json
      description: delete traffic comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: delete traffic comparison report
      tags:
      - Report
    get:
      consumes:
      - application/json
      description: list traffic comparison report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      - description: if need data
        in: query
        name: brief
        type: boolean
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/oldreport.TrafficComparisonReport'
      summary: get traffic comparison report
      tags:
      - Report
  /dashboard/activeqps:
    get:
      consumes:
      - application/json
      description: list cloud clusters QPS status
      parameters:
      - description: threshold
        in: query
        name: threshold
        required: true
        type: string
      - description: search tenant name/id or cluster name/id
        in: query
        name: search
        type: string
      - collectionFormat: multi
        description: cluster region filter
        in: query
        items:
          type: string
        name: region
        type: array
      - collectionFormat: multi
        description: deploy type filter
        in: query
        items:
          type: string
        name: deploy_type
        type: array
      - description: begin_ts
        in: query
        name: begin_ts
        required: true
        type: integer
      - description: end_ts
        in: query
        name: end_ts
        required: true
        type: integer
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cloud.ActiveQPSResp'
      summary: list cloud clusters QPS status
      tags:
      - GlobalDashboard
  /dashboard/clusters:
    get:
      consumes:
      - application/json
      description: list cloud clusters status
      parameters:
      - description: search data from tenant id, tenant name, cluster id and cluster
          name
        in: query
        name: query
        type: string
      - description: show deleted cluster
        in: query
        name: show_deleted
        type: boolean
      - collectionFormat: multi
        description: cluster id
        in: query
        items:
          type: string
        name: cluster_id
        type: array
      - collectionFormat: multi
        description: cluster status
        in: query
        items:
          type: string
        name: cluster_status
        type: array
      - collectionFormat: multi
        description: cluster version
        in: query
        items:
          type: string
        name: cluster_version
        type: array
      - collectionFormat: multi
        description: deploy type
        in: query
        items:
          type: string
        name: deploy_type
        type: array
      - collectionFormat: multi
        description: deploy type v2
        in: query
        items:
          type: string
        name: deploy_type_v2
        type: array
      - collectionFormat: multi
        description: tenant plan
        in: query
        items:
          type: string
        name: tenant_plan
        type: array
      - collectionFormat: multi
        description: control plane
        in: query
        items:
          type: string
        name: control_plane
        type: array
      - collectionFormat: multi
        description: cloud provider
        in: query
        items:
          type: string
        name: provider
        type: array
      - collectionFormat: multi
        description: cloud region
        in: query
        items:
          type: string
        name: region
        type: array
      - description: sort
        in: query
        name: sort
        type: string
      - description: order
        in: query
        name: order
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      - default: false
        description: include the exact total
        in: query
        name: include_total
        type: boolean
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cloud.DashboardResp'
      summary: list cloud clusters status
      tags:
      - GlobalDashboard
  /dashboard/clusters2:
    get:
      consumes:
      - application/json
      description: list cloud clusters status form local db
      parameters:
      - description: search data from tenant id, tenant name, cluster id and cluster
          name
        in: query
        name: query
        type: string
      - collectionFormat: multi
        description: cluster id
        in: query
        items:
          type: string
        name: cluster_id
        type: array
      - collectionFormat: multi
        description: cluster status
        in: query
        items:
          type: string
        name: cluster_status
        type: array
      - collectionFormat: multi
        description: cluster version
        in: query
        items:
          type: string
        name: cluster_version
        type: array
      - collectionFormat: multi
        description: deploy type
        in: query
        items:
          type: string
        name: deploy_type
        type: array
      - collectionFormat: multi
        description: deploy type v2
        in: query
        items:
          type: string
        name: deploy_type_v2
        type: array
      - collectionFormat: multi
        description: tenant plan
        in: query
        items:
          type: string
        name: tenant_plan
        type: array
      - description: show deleted cluster
        in: query
        name: show_deleted
        type: boolean
      - collectionFormat: multi
        description: control plane
        in: query
        items:
          type: string
        name: control_plane
        type: array
      - collectionFormat: multi
        description: cloud provider
        in: query
        items:
          type: string
        name: provider
        type: array
      - collectionFormat: multi
        description: cloud region
        in: query
        items:
          type: string
        name: region
        type: array
      - description: created_at timestamp from
        in: query
        name: created_ts_from
        type: integer
      - description: created_at timestamp to
        in: query
        name: created_ts_to
        type: integer
      - description: deleted_at timestamp from
        in: query
        name: deleted_ts_from
        type: integer
      - description: deleted_at timestamp to
        in: query
        name: deleted_ts_to
        type: integer
      - description: sort
        in: query
        name: sort
        type: string
      - description: order
        in: query
        name: order
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      - default: false
        description: include the exact total
        in: query
        name: include_total
        type: boolean
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cloud.DashboardResp'
      summary: list cloud clusters status form local db
      tags:
      - GlobalDashboard
  /dashboard/proxy:
    get:
      consumes:
      - application/json
      description: proxy dashboard
      parameters:
      - description: the proxy host
        in: query
        name: host
        required: true
        type: string
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/cloud.DashboardResp'
            type: array
      summary: proxy dashboard
      tags:
      - GlobalDashboard
  /dashboard/regions:
    get:
      consumes:
      - application/json
      description: list regions
      parameters:
      - collectionFormat: csv
        description: cloud provdier, default for all providers
        in: query
        items:
          type: string
        name: provider
        type: array
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cloud.RegionsResp'
      summary: list regions
      tags:
      - GlobalDashboard
  /data/control_plane/metrics:
    get:
      consumes:
      - application/json
      description: get the dbaas control plane metrics data
      parameters:
      - description: the control plane info
        in: header
        name: control_plane_info
        required: true
        type: string
      - description: prometheus query
        in: query
        name: query
        required: true
        type: string
      - description: the start timestamp of query data
        in: query
        name: start
        type: integer
      - description: the end timestamp of query data
        in: query
        name: end
        type: integer
      - description: prometheus step
        in: query
        name: step
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: Get the dbaas control plane metrics data
      tags:
      - Metric
  /data/metrics:
    get:
      consumes:
      - application/json
      description: get the metrics data
      parameters:
      - description: string enums
        enum:
        - cloud
        - op
        in: header
        name: X-OrgType
        required: true
        type: string
      - description: the org id in clinic
        in: header
        name: X-OrgID
        required: true
        type: string
      - description: cluster id
        in: header
        name: X-ClusterID
        required: true
        type: string
      - description: prometheus query
        in: query
        name: query
        required: true
        type: string
      - description: the start timestamp of query data
        in: query
        name: start
        type: integer
      - description: the end timestamp of query data
        in: query
        name: end
        type: integer
      - description: prometheus step
        in: query
        name: step
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: Get the metrics data
      tags:
      - Metric
  /diag/flush:
    post:
      consumes:
      - multipart/form-data
      description: call flush api after all parts of file are uploaded
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: an optional issue Jira issue ID this package should be connected
          to
        in: query
        name: issue
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.FlushResponse'
      summary: Flush
      tags:
      - Upload
  /diag/precreate:
    post:
      consumes:
      - multipart/form-data
      description: precreate
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: the size of the file
        in: query
        name: length
        required: true
        type: integer
      - description: an optional alias of filename
        in: query
        name: alias
        type: string
      - description: actual name of the file
        in: query
        name: filename
        required: true
        type: string
      - description: file
        in: formData
        name: file
        required: true
        type: file
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.PreCreateResponse'
      summary: Precreate
      tags:
      - Upload
  /diag/upload:
    post:
      consumes:
      - application/octet-stream
      description: upload file part api
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: the serial number of the file part
        in: query
        name: sequence
        required: true
        type: integer
      - description: the length of the file part
        in: query
        name: length
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: Upload
      tags:
      - Upload
  /internal/clusters/{cluster_id}/cluster-dataurls:
    get:
      consumes:
      - application/json
      description: Get comprehensive cluster information including data URLs (internal
        API)
      parameters:
      - description: cluster id (cluster_id field, not the primary key id)
        in: path
        name: cluster_id
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/internal_api.ClusterDataURLsResponse'
      summary: Get cluster data URLs
      tags:
      - Internal
  /internal/keys:
    get:
      consumes:
      - application/json
      description: List all API keys for the current internal user
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/internal_key.ListKeysResponse'
      summary: List internal API keys
      tags:
      - Internal Key
    post:
      consumes:
      - application/json
      description: Create an API key for internal users (internal=true only)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: optional key name and expiration
        in: body
        name: body
        schema:
          $ref: '#/definitions/internal_key.CreateKeyRequest'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/internal_key.KeyResponse'
      summary: Create internal API key
      tags:
      - Internal Key
  /internal/keys/{id}:
    delete:
      consumes:
      - application/json
      description: Delete an API key for the current internal user
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: key id
        in: path
        name: id
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Delete internal API key
      tags:
      - Internal Key
  /login/logout:
    post:
      description: log out
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Logout
      tags:
      - OAuth
  /login/oauth/{name}/info:
    get:
      description: get oauth config
      parameters:
      - description: string enums
        enum:
        - internal
        - ask_tug
        - tidbcloud
        - pingkai
        in: path
        name: name
        required: true
        type: string
      - description: the redirect_uri request parameter is used as a callback URL
        in: query
        name: redirect_uri
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/login.OAuthInfoResp'
      summary: Config the user
      tags:
      - OAuth
  /login/oauth/{name}/validate:
    post:
      consumes:
      - application/json
      description: set auth header
      parameters:
      - description: string enums
        enum:
        - internal
        - ask_tug
        - tidbcloud
        - pingkai
        in: path
        name: name
        required: true
        type: string
      - description: validation
        in: body
        name: validation
        required: true
        schema:
          $ref: '#/definitions/login.Validation'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/login.ValidationResp'
      summary: Validate the user
      tags:
      - OAuth
  /orgs:
    get:
      consumes:
      - application/json
      description: list organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: the organization name
        in: query
        name: query
        type: string
      - description: filter condition, can be all,starred,mine
        in: query
        name: filter
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ListOrganizationsResp'
      summary: List the organizations
      tags:
      - Organization
    post:
      consumes:
      - application/json
      description: create organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization
        in: body
        name: organization
        required: true
        schema:
          $ref: '#/definitions/org.Organization'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.Organization'
      summary: Create the organization
      tags:
      - Organization
  /orgs/{oid}:
    delete:
      description: delete Organization and data
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: delete Organization
      tags:
      - Organization
    get:
      consumes:
      - application/json
      description: get organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.Organization'
      summary: Get the organization
      tags:
      - Organization
    put:
      consumes:
      - application/json
      description: update organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: organization
        in: body
        name: organization
        required: true
        schema:
          $ref: '#/definitions/org.UpdateOrganizationReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.Organization'
      summary: Update the organization
      tags:
      - Organization
  /orgs/{oid}/clusters:
    get:
      description: list cluster of the specified organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the query of cluster
        in: query
        name: query
        type: string
      - description: the page index
        in: query
        name: page
        type: integer
      - description: project id
        in: query
        name: pid
        type: string
      - description: show deleted cluster
        in: query
        name: show_deleted
        type: boolean
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.ListClustersResp'
      summary: List clusters
      tags:
      - Cluster
    post:
      description: add a cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Add cluster
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}:
    delete:
      description: delete cluster and data
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: delete cluster and data
      tags:
      - Cluster
    get:
      description: list packages of the specified cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.Cluster'
      summary: List info of the specified cluster
      tags:
      - Cluster
    put:
      description: update cluster information
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: cluster information
        in: body
        name: cluster
        required: true
        schema:
          $ref: '#/definitions/cluster.UpdateClusterReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: update cluster information
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/{itemid}/meta:
    get:
      description: meta information of package file
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: item id
        in: path
        name: itemid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.FileMeta'
      summary: meta information of package file
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/dashboard:
    get:
      description: list dashboard user can access
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: startTime of dashboard show
        in: query
        name: startTime
        type: integer
      - description: endTime of dashboard show
        in: query
        name: endTime
        type: integer
      - description: tidb version
        in: query
        name: version
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/cluster.DataUrl'
            type: array
      summary: list dashboard user can access
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/dashboard-versions:
    get:
      description: list available dashboard version
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              type: string
            type: array
      summary: list available dashboard version
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/data:
    get:
      description: get the detail information of the specified timerange in cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: start time
        in: query
        name: startTime
        type: integer
      - description: end time
        in: query
        name: endTime
        type: integer
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.DataSummaryResponse'
      summary: get the detail information of the specified timerange in cluster
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/data_status:
    get:
      description: get data status of the specified cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: startTime
        in: query
        name: startTime
        required: true
        type: integer
      - description: endTime
        in: query
        name: endTime
        required: true
        type: integer
      - description: int enums
        enum:
        - 1
        - 2
        - 3
        - 4
        in: query
        name: data_type
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.TaskStatusResp'
      summary: get data status of the cluster
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/defaultconf:
    get:
      description: list default values of the specified cluster version
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.DefaultConfiguration'
      summary: List default value of current version
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/download/{itemid}:
    get:
      description: download file
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: item id
        in: path
        name: itemid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: file
      summary: download total package
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/downloadConf/{itemid}:
    get:
      description: download file
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: item id
        in: path
        name: itemid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: file
      summary: download total package
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/logurl/{itemid}:
    get:
      description: get log url
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: item id
        in: path
        name: itemid
        required: true
        type: string
      - description: startTime of dashboard show
        in: query
        name: startTime
        type: integer
      - description: endTime of dashboard show
        in: query
        name: endTime
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.DataUrl'
      summary: log url
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/metrics:
    get:
      description: list overview metrics of the specified cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.ClusterMetrics'
      summary: List metric information of the specified cluster
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/plan-replayer/files:
    get:
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: logical cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: page size, default 100, max 1000
        in: query
        name: pageSize
        type: integer
      - description: opaque page token
        in: query
        name: pageToken
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/nextgen_client.ListPlanReplayerFilesResponse'
      summary: List Plan Replayer files
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/plan-replayer/files/download-url:
    post:
      consumes:
      - application/json
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: logical cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: file name from list response
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/nextgen_client.GeneratePlanReplayerFileDownloadURLRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/nextgen_client.GeneratePlanReplayerFileDownloadURLResponse'
      summary: Generate a Plan Replayer download URL
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/rebuild:
    put:
      description: rebuild data for the specified package
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: rebuild
        in: body
        name: rebuild
        required: true
        schema:
          $ref: '#/definitions/common.Rebuild'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: rebuild data for the specified package
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/resource-pool/components:
    get:
      description: Get resourcePool components for premium, premium reserved, essential
        v2, byoc, and byoc resource pool clusters
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/view.ResourcePoolComponent'
            type: array
      summary: Get resource pool components
      tags:
      - ResourcePool
  /orgs/{oid}/clusters/{cid}/slogans:
    get:
      consumes:
      - application/json
      description: get cluster slogan
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.SloganRespList'
      summary: get cluster slogan
      tags:
      - Cluster Slogan
  /orgs/{oid}/clusters/{cid}/slowqueries:
    get:
      description: get slow log list in cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: package id
        in: query
        name: itemID
        required: true
        type: string
      - description: start time
        in: query
        name: begin_time
        type: integer
      - description: end time
        in: query
        name: end_time
        type: integer
      - collectionFormat: csv
        description: db list
        in: query
        items:
          type: string
        name: db
        type: array
      - description: limit
        in: query
        name: limit
        type: integer
      - description: text
        in: query
        name: text
        type: string
      - description: orderBy
        in: query
        name: orderBy
        type: string
      - description: desc
        in: query
        name: desc
        type: boolean
      - collectionFormat: csv
        description: plans
        in: query
        items:
          type: string
        name: plans
        type: array
      - description: digest
        in: query
        name: digest
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/cluster.SlowQueryProfile'
            type: array
      summary: get slow log list
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/slowqueries/{queryid}:
    get:
      description: get slow log detail in cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: package id
        in: query
        name: itemID
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: log id
        in: path
        name: queryid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/cluster.SlowQueryProfile'
      summary: get slow log detail
      tags:
      - Cluster
  /orgs/{oid}/clusters/{cid}/update_status:
    post:
      description: update cluster status
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: cluster information
        in: body
        name: cluster
        required: true
        schema:
          $ref: '#/definitions/cluster.UpdateClusterReq'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: update cluster status
      tags:
      - Cluster
  /orgs/{oid}/diag/flush:
    post:
      consumes:
      - multipart/form-data
      description: call flush api after all parts of file are uploaded
      parameters:
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: an optional issue Jira issue ID this package should be connected
          to
        in: query
        name: issue
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.FlushResponse'
      summary: Flush
      tags:
      - Upload
  /orgs/{oid}/diag/precreate:
    post:
      consumes:
      - multipart/form-data
      description: precreate
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: the size of the file
        in: query
        name: length
        required: true
        type: integer
      - description: an optional alias of filename
        in: query
        name: alias
        type: string
      - description: actual name of the file
        in: query
        name: filename
        required: true
        type: string
      - description: file
        in: formData
        name: file
        required: true
        type: file
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.PreCreateResponse'
      summary: Precreate
      tags:
      - Upload
  /orgs/{oid}/diag/upload:
    post:
      consumes:
      - application/octet-stream
      description: upload file part api
      parameters:
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: a custom hash combining package’s filename, size and modify time
        in: query
        name: uuid
        required: true
        type: string
      - description: the serial number of the file part
        in: query
        name: sequence
        required: true
        type: integer
      - description: the length of the file part
        in: query
        name: length
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            type: string
      summary: Upload
      tags:
      - Upload
  /orgs/{oid}/keys:
    get:
      description: list upload key of the user in current organizatioin
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ListApiKeyResponse'
      summary: List upload key
      tags:
      - Api Key
    post:
      consumes:
      - application/json
      description: create api key
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ApiKeyResponse'
      summary: Create api key
      tags:
      - Api Key
  /orgs/{oid}/keys/{id}:
    delete:
      consumes:
      - application/json
      description: create api key
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: key id
        in: path
        name: id
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ApiKeyResponse'
      summary: Delete api key
      tags:
      - Api Key
  /orgs/{oid}/projects:
    get:
      description: list projects of the specified organization (only for cloud orgs)
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ListProjectsResp'
      summary: List projects
      tags:
      - Organization
  /orgs/{oid}/roles:
    get:
      consumes:
      - application/json
      description: list organization roles
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/org.Role'
            type: array
      summary: List the organizations roles
      tags:
      - Organization
  /orgs/{oid}/star:
    delete:
      consumes:
      - application/json
      description: unstar organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: UnStar the organization
      tags:
      - Organization
    post:
      consumes:
      - application/json
      description: star organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Star the organization
      tags:
      - Organization
  /orgs/{oid}/tasks:
    get:
      consumes:
      - application/json
      description: get organization task list
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/org.TaskStatus'
            type: array
      summary: Get the organization task list
      tags:
      - Organization
  /orgs/{oid}/users:
    get:
      consumes:
      - application/json
      description: list users of the organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.ListUsersResp'
      summary: List users
      tags:
      - Organization
  /orgs/{oid}/users/{id}:
    delete:
      consumes:
      - application/json
      description: delete user from organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: user id
        in: path
        name: id
        required: true
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Delete user from organization
      tags:
      - Organization
    put:
      consumes:
      - application/json
      description: update user role in organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: user id
        in: path
        name: id
        required: true
        type: integer
      - description: user role
        in: body
        name: role
        required: true
        schema:
          $ref: '#/definitions/org.Role'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Update user role in organization
      tags:
      - Organization
  /orgs/{oid}/users/invite:
    post:
      consumes:
      - application/json
      description: invite user to join the organization
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: invite user
        in: body
        name: invite
        required: true
        schema:
          $ref: '#/definitions/org.InvitesReq'
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: Invite user
      tags:
      - Organization
  /orgs/external/{eid}:
    get:
      consumes:
      - application/json
      description: get organization by external id
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: external id
        in: path
        name: eid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/org.Organization'
      summary: Get the organization by external id
      tags:
      - Organization
  /reports/{oid}/{cid}:
    get:
      consumes:
      - application/json
      description: list health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report type
        in: query
        name: report_type
        required: true
        type: string
      - description: the count per page
        in: query
        name: limit
        type: integer
      - description: the page index
        in: query
        name: page
        type: integer
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/report.ListReportResponse'
      summary: list health report
      tags:
      - Reports
    post:
      consumes:
      - application/json
      description: touch report on cluster
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report type
        in: query
        name: report_type
        required: true
        type: string
      - description: report param
        in: body
        name: reportParams
        required: true
        schema:
          $ref: '#/definitions/report.TouchReportRequest'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/report.TouchReportResponse'
      summary: Touch New Report Job
      tags:
      - Reports
  /reports/{oid}/{cid}/{rid}:
    delete:
      consumes:
      - application/json
      description: delete health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: delete report
      tags:
      - Reports
    get:
      consumes:
      - application/json
      description: list report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/report.GetReportResponse'
      summary: get report
      tags:
      - Reports
    post:
      consumes:
      - application/json
      description: delete health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: rebuild report
      tags:
      - Reports
    put:
      consumes:
      - application/json
      description: put health report
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: organization id
        in: path
        name: oid
        required: true
        type: string
      - description: cluster id
        in: path
        name: cid
        required: true
        type: string
      - description: report id
        in: path
        name: rid
        required: true
        type: string
      - description: report information
        in: body
        name: reportParams
        required: true
        schema:
          $ref: '#/definitions/report.PutReportRequest'
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/common.SuccessResp'
      summary: put report
      tags:
      - Reports
  /reports/statistics:
    get:
      consumes:
      - application/json
      description: get report statistics
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      - description: event name
        in: query
        name: event
        required: true
        type: string
      - description: hash value
        in: query
        name: hash
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/report.ReportStatistics'
      summary: get report statistics
      tags:
      - Reports
  /user/profile:
    get:
      description: get profile
      parameters:
      - description: get value from login.ValidationResp response
        in: header
        name: x-csrf-token
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/user.UserResp'
      summary: Get profile
      tags:
      - User
swagger: "2.0"
