basePath: /api/v1/dataservices/central
definitions:
  dto.AppClusterInfo:
    properties:
      cloud:
        type: string
      cluster_id:
        example: "0"
        type: string
      cluster_name:
        type: string
      dataapp_id:
        type: integer
      region:
        type: string
      tier_type:
        type: string
    type: object
  dto.BaseResp:
    properties:
      err_code:
        type: integer
      err_msg:
        type: string
    type: object
  dto.BatchGetCodeExampleRes:
    properties:
      code:
        type: integer
      data:
        properties:
          endpoint_examples:
            items:
              $ref: '#/definitions/dto.EndpointCodeExample'
            type: array
        type: object
      message:
        type: string
    type: object
  dto.CheckPostmanStatusRes:
    properties:
      code:
        type: integer
      data:
        type: boolean
      message:
        type: string
    type: object
  dto.CheckSampleStatusRes:
    properties:
      code:
        type: integer
      data:
        properties:
          app_status:
            description: 'dataapp current status: normal,initializing'
            type: string
          task_records:
            items:
              $ref: '#/definitions/entity.SampleDataTaskRecord'
            type: array
        type: object
      message:
        type: string
    type: object
  dto.ClusterLinkedAPPResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        items:
          $ref: '#/definitions/dto.DataAppInfo'
        type: array
    type: object
  dto.CodeExample:
    properties:
      code:
        type: string
      type:
        type: string
    type: object
  dto.CommonApiResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
    type: object
  dto.CommonEndpointsRankRes:
    properties:
      code:
        type: integer
      message:
        type: string
      rank:
        items:
          $ref: '#/definitions/dto.EndpointsRankItem'
        type: array
    type: object
  dto.CommonPromMetricsRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.PromData'
      message:
        type: string
      status:
        type: string
    type: object
  dto.CreateAPIKeyRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.RbacApiKey'
      message:
        type: string
    type: object
  dto.CreateAppClusterReq:
    properties:
      cluster_ids:
        items:
          type: string
        type: array
      org_id:
        type: integer
      project_id:
        type: integer
    required:
    - cluster_ids
    type: object
  dto.CreateAutoGenerateEndpointRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.EndpointFormat'
        type: array
      message:
        type: string
    type: object
  dto.CreateDataAppOut:
    properties:
      app_info:
        $ref: '#/definitions/dto.DataAppInfo'
      endpoint:
        $ref: '#/definitions/dto.EndpointSummary'
    type: object
  dto.CreateDataAppRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.CreateDataAppOut'
      message:
        type: string
    type: object
  dto.CreateEndpointRes:
    properties:
      code:
        type: integer
      endpoint:
        $ref: '#/definitions/dto.EndpointFormat'
      message:
        type: string
    type: object
  dto.CreateSessionOut:
    properties:
      session_id:
        type: string
    type: object
  dto.CreateSessionRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.CreateSessionOut'
      message:
        type: string
    type: object
  dto.CustomDomainRequest:
    properties:
      custom_domain_name:
        type: string
      custom_path:
        type: string
      default_domain_name:
        type: string
    type: object
  dto.CustomDomainResponse:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/entity.CustomDomain'
    type: object
  dto.DBColumn:
    properties:
      col:
        type: string
      data_type:
        type: string
      nullable:
        type: boolean
    type: object
  dto.DBRow:
    additionalProperties:
      type: string
    type: object
  dto.DataAppInfo:
    properties:
      apikey_max_rpm:
        type: integer
      app_name:
        type: string
      app_type:
        type: string
      app_version:
        type: string
      base_url:
        type: string
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      deployment_region:
        type: string
      description:
        type: string
      endpoints:
        items:
          $ref: '#/definitions/dto.EndpointSummary'
        type: array
      external_app_id:
        type: string
      id:
        type: integer
      oas_authorized:
        type: boolean
      open_api_link:
        type: string
      org_id:
        type: string
      project_id:
        type: string
      settings:
        $ref: '#/definitions/entity.DataAppSettings'
      status:
        description: 'dataapp current status: normal,initializing'
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
    type: object
  dto.DataAppLogEntry:
    properties:
      client_info:
        type: string
      date_time:
        type: integer
      endpoint_id:
        type: string
      endpoint_name:
        type: string
      http_code:
        type: integer
      http_code_message:
        type: string
      method:
        type: string
      query_param:
        type: string
      req_body:
        type: string
      req_header:
        type: string
      req_url:
        type: string
      request_id:
        type: string
      resp_row_count:
        type: integer
      response_body:
        type: string
      response_size:
        type: string
      response_time:
        type: string
      rsp_cached:
        type: boolean
      status:
        type: string
      trace_id:
        type: string
      type:
        type: string
    type: object
  dto.DataAppMiscStatusRes:
    properties:
      code:
        type: integer
      dataapp_available:
        type: boolean
      endpoint:
        $ref: '#/definitions/dto.EndpointStatistic'
      message:
        type: string
      unique_user:
        type: integer
    type: object
  dto.DataappExportLinkRes:
    properties:
      code:
        type: integer
      data:
        type: string
      message:
        type: string
    type: object
  dto.DataappPostmanAPI:
    properties:
      name:
        type: string
      protocolProfileBehavior:
        properties:
          followAuthorizationHeader:
            type: boolean
          followOriginalHttpMethod:
            type: boolean
          followRedirects:
            type: boolean
        type: object
      request:
        properties:
          body:
            $ref: '#/definitions/dto.DataappPostmanBody'
          header:
            items:
              $ref: '#/definitions/dto.DataappPostmanVal'
            type: array
          method:
            type: string
          url:
            type: string
        type: object
    type: object
  dto.DataappPostmanBody:
    properties:
      mode:
        type: string
      options:
        additionalProperties: true
        type: object
      raw:
        type: string
    type: object
  dto.DataappPostmanCollection:
    properties:
      auth:
        properties:
          digest:
            items:
              $ref: '#/definitions/dto.DataappPostmanVal'
            type: array
          type:
            type: string
        type: object
      info:
        properties:
          description:
            type: string
          name:
            type: string
          schema:
            type: string
        type: object
      item:
        items:
          $ref: '#/definitions/dto.DataappPostmanCollectionFolder'
        type: array
      variable:
        items:
          $ref: '#/definitions/dto.DataappPostmanVal'
        type: array
    type: object
  dto.DataappPostmanCollectionFolder:
    properties:
      item:
        items:
          $ref: '#/definitions/dto.DataappPostmanAPI'
        type: array
      name:
        type: string
    type: object
  dto.DataappPostmanVal:
    properties:
      key:
        type: string
      type:
        type: string
      value:
        type: string
    type: object
  dto.DownloadDataAPPLogTaskStatusRes:
    properties:
      code:
        type: integer
      download_url:
        description: only availiable when status is sucess
        type: string
      message:
        type: string
      status:
        description: 'Enum: [processing failed success]'
        type: string
    type: object
  dto.DumpEndpointRes:
    properties:
      code:
        type: integer
      endpoint:
        $ref: '#/definitions/dto.EndpointFormat'
      message:
        type: string
    type: object
  dto.EndpointBaseUrlRes:
    properties:
      code:
        type: integer
      data:
        type: string
      message:
        type: string
    type: object
  dto.EndpointCodeExample:
    properties:
      examples:
        items:
          $ref: '#/definitions/dto.CodeExample'
        type: array
      method:
        type: string
      path:
        type: string
    type: object
  dto.EndpointConfig:
    properties:
      is_enabled:
        type: boolean
      key:
        type: string
      type:
        type: string
    required:
      - key
    type: object
  dto.EndpointDataRes:
    properties:
      columns:
        items:
          $ref: '#/definitions/dto.DBColumn'
        type: array
      end_ms:
        type: integer
      err_code:
        type: integer
      err_message:
        type: string
      latency:
        type: string
      limit:
        type: integer
      query:
        type: string
      row_affect:
        type: integer
      row_count:
        type: integer
      rows:
        items:
          items:
            type: string
          type: array
        type: array
      start_ms:
        type: integer
      warn_count:
        type: integer
      warn_messages:
        items:
          type: string
        type: array
    type: object
  dto.EndpointDeployRes:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        properties:
          completed:
            type: boolean
          version:
            type: string
        type: object
    type: object
  dto.EndpointFormat:
    properties:
      args:
        items:
          $ref: '#/definitions/entity.EndpointArgs'
        type: array
      batch:
        type: boolean
      cluster_id:
        type: string
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      dataappp_id:
        type: integer
      database:
        type: string
      description:
        type: string
      endpoint:
        type: string
      has_modified:
        type: boolean
      id:
        type: integer
      is_online:
        type: boolean
      method:
        type: string
      name:
        type: string
      service_url:
        type: string
      settings:
        $ref: '#/definitions/entity.EndpointSettings'
      sql_template:
        type: string
      tag:
        type: string
      type:
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
      vid:
        example: "0"
        type: string
    type: object
  dto.EndpointPublishHistory:
    properties:
      dataappp_id:
        type: integer
      endpoint_id:
        type: integer
      is_online:
        type: integer
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      version:
        type: string
    type: object
  dto.EndpointPublishRes:
    properties:
      code:
        type: integer
      data:
        properties:
          version:
            type: string
        type: object
      message:
        type: string
    type: object
  dto.EndpointResult:
    properties:
      data:
        properties:
          columns:
            items:
              $ref: '#/definitions/dto.DBColumn'
            type: array
          result:
            properties:
              code:
                type: integer
              end_ms:
                type: integer
              latency:
                type: string
              limit:
                type: integer
              message:
                type: string
              row_affect:
                type: integer
              row_count:
                type: integer
              start_ms:
                type: integer
            type: object
          rows:
            items:
              $ref: '#/definitions/dto.DBRow'
            type: array
        type: object
      type:
        type: string
    type: object
  dto.EndpointStatistic:
    properties:
      deployed:
        type: integer
      draft:
        type: integer
    type: object
  dto.EndpointSummary:
    properties:
      cluster_id:
        type: string
      dataappp_id:
        type: integer
      endpoint:
        type: string
      has_modified:
        type: boolean
      id:
        type: integer
      is_online:
        type: integer
      method:
        type: string
      name:
        type: string
      type:
        type: string
      vid:
        example: "0"
        type: string
    type: object
  dto.EndpointsRankItem:
    properties:
      endpoint_id:
        type: string
      endpoint_name:
        type: string
      rank_value:
        type: string
    type: object
  dto.FieldError:
    properties:
      error:
        type: string
      field:
        type: string
    type: object
  dto.GenericSuccessApiResponse:
    properties:
      code:
        type: integer
      data:
        type: string
      message:
        type: string
    type: object
  dto.GetAuthorizeUrl:
    properties:
      preflight_request_id:
        type: string
      url:
        type: string
    type: object
  dto.GetAuthorizeUrlResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/dto.GetAuthorizeUrl'
    type: object
  dto.GetDataAppDeployDiffRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/entity.SnapshotDiff'
      message:
        type: string
    type: object
  dto.GetDataAppDeploySettingRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/entity.DataAppDeploymentSetting'
      message:
        type: string
    type: object
  dto.GetDataAppLogRes:
    properties:
      code:
        type: integer
      has_more:
        type: boolean
      logs:
        items:
          $ref: '#/definitions/dto.DataAppLogEntry'
        type: array
      message:
        type: string
      passback:
        type: string
    type: object
  dto.GetDataAppRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/entity.DataApp'
      message:
        type: string
    type: object
  dto.GetDeploymentStatus:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/entity.DeploymentStatus'
      message:
        type: string
    type: object
  dto.GetEndpointRes:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.EndpointFormat'
      message:
        type: string
    type: object
  dto.GetOpenApiSpecificationResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/dto.OpenApiSpecification'
    type: object
  dto.GetSystemEndpointConfigResp:
    properties:
      code:
        type: integer
      data:
        $ref: '#/definitions/dto.SystemEndpointConfigData'
      message:
        type: string
    type: object
  dto.GithubLinkageStatusResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/dto.GithubLinkageStatusResult'
    type: object
  dto.GithubLinkageStatusResult:
    properties:
      authorized:
        type: boolean
      branch:
        type: string
      directory:
        type: string
      enable_automatic_deployment:
        type: boolean
      installation_id:
        type: integer
      repository_full_name:
        type: string
      repository_id:
        type: integer
    type: object
  dto.GithubRepository:
    properties:
      full_name:
        type: string
      id:
        type: integer
      installation_id:
        type: integer
      private:
        type: boolean
    type: object
  dto.GithubRepositoryBranch:
    properties:
      name:
        type: string
      protected:
        type: boolean
    type: object
  dto.ListAPIKeysRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.RbacApiKey'
        type: array
      message:
        type: string
    type: object
  dto.ListAppClusterResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        items:
          $ref: '#/definitions/dto.AppClusterInfo'
        type: array
    type: object
  dto.ListAuthorizedRepositoriesResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        items:
          $ref: '#/definitions/dto.GithubRepository'
        type: array
    type: object
  dto.ListBranchesResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        items:
          $ref: '#/definitions/dto.GithubRepositoryBranch'
        type: array
    type: object
  dto.ListCustomDomainsResponse:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        items:
          $ref: '#/definitions/entity.CustomDomain'
        type: array
    type: object
  dto.ListDataAppDeployLogsRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/entity.DataAppDeploymentLog'
        type: array
      message:
        type: string
    type: object
  dto.ListDataAppRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.DataAppInfo'
        type: array
      message:
        type: string
    type: object
  dto.ListDefaultDomainsData:
    properties:
      base_urls:
        items:
          type: string
        type: array
      default_domain_names:
        items:
          type: string
        type: array
      default_path:
        type: string
    type: object
  dto.ListDefaultDomainsResponse:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/dto.ListDefaultDomainsData'
    type: object
  dto.ListEndpointPublishLogRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.EndpointPublishHistory'
        type: array
      message:
        type: string
    type: object
  dto.ListEndpointRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.EndpointSummary'
        type: array
      message:
        type: string
    type: object
  dto.OKType:
    properties:
      status:
        example: ok
        type: string
    type: object
  dto.OpenApiSpecification:
    properties:
      document:
        type: string
      filename:
        type: string
    type: object
  dto.PromData:
    properties:
      result:
        items:
          $ref: '#/definitions/dto.PromResult'
        type: array
      resultType:
        type: string
    type: object
  dto.PromResult:
    properties:
      metric:
        additionalProperties:
          type: string
        description: not used
        type: object
      values:
        description: see https://prometheus.io/docs/prometheus/latest/querying/api/#range-vectors
        items:
          items: { }
          type: array
        type: array
    type: object
  dto.RbacApiKey:
    properties:
      access_key:
        type: string
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      id:
        type: integer
      name:
        type: string
      rate_limit_rpm:
        type: integer
      role:
        type: string
      secret_key:
        type: string
      source:
        description: Base64Key    string         `json:"base64_key,omitempty"`
        type: string
      ttl_in_min:
        type: integer
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
    type: object
  dto.RepoBranchDirValidateReq:
    properties:
      branch:
        type: string
      directory:
        type: string
    type: object
  dto.RepoBranchDirValidateResp:
    properties:
      base_resp:
        $ref: '#/definitions/dto.BaseResp'
      data:
        $ref: '#/definitions/dto.RepoBranchDirValidateResult'
    type: object
  dto.RepoBranchDirValidateResult:
    properties:
      conflict:
        type: boolean
      external_app_id:
        type: string
    type: object
  dto.ShowDBsRes:
    properties:
      code:
        type: integer
      data:
        items:
          type: string
        type: array
      message:
        type: string
    type: object
  dto.ShowTablesRes:
    properties:
      code:
        type: integer
      data:
        items:
          type: string
        type: array
      message:
        type: string
    type: object
  dto.ShowVectorFieldsRes:
    properties:
      code:
        type: integer
      data:
        items:
          type: string
        type: array
      message:
        type: string
    type: object
  dto.StatementsRes:
    properties:
      code:
        type: integer
      data:
        items:
          $ref: '#/definitions/dto.EndpointDataRes'
        type: array
      message:
        type: string
    type: object
  dto.SubmitDownloadDataAPPLogTaskRes:
    properties:
      code:
        type: integer
      message:
        type: string
      task_id:
        type: string
    type: object
  dto.SystemEndpointConfigData:
    properties:
      data_endpoints:
        items:
          $ref: '#/definitions/dto.EndpointConfig'
        type: array
    type: object
  dto.TestEndpointRes:
    properties:
      data:
        $ref: '#/definitions/dto.EndpointResult'
    type: object
  dto.UpdateEndpointRes:
    properties:
      code:
        type: integer
      endpoint:
        $ref: '#/definitions/dto.EndpointFormat'
      field_errors:
        items:
          $ref: '#/definitions/dto.FieldError'
        type: array
      message:
        type: string
    type: object
  entity.AppClusterDiff:
    properties:
      added:
        items:
          type: integer
        type: array
      deleted:
        items:
          type: integer
        type: array
    type: object
  entity.AutoGenerateConfiguration:
    properties:
      batch:
        type: boolean
      is_deploy:
        type: boolean
      tag:
        type: string
      timeout:
        type: integer
    type: object
  entity.AutoGenerateEndpoint:
    properties:
      cluster_id:
        type: string
      configuration:
        $ref: '#/definitions/entity.AutoGenerateConfiguration'
      db:
        type: string
      operations:
        items:
          type: string
        type: array
      region:
        type: string
      table:
        type: string
      vector_search_operations:
        $ref: '#/definitions/entity.VectorSearchOperations'
    type: object
  entity.ChangeLogResponseBodySwitchParam:
    properties:
      new_status:
        description: 'Enum: [on off]'
        type: string
    type: object
  entity.CreateAPIKeyParam:
    properties:
      name:
        type: string
      rate_limit_rpm:
        type: integer
      role:
        type: string
      ttl_in_min:
        type: integer
    required:
    - name
    - role
    type: object
  entity.CreateDataAppParam:
    properties:
      app_name:
        type: string
      app_type:
        enum:
          - dataapi
          - chat2query
        type: string
      app_version:
        type: string
      cluster_ids:
        items:
          type: string
        type: array
      deployment_config:
        properties:
          branch:
            type: string
          directory:
            type: string
          installation_id:
            type: integer
          preflight_request_id:
            type: string
          repository_id:
            type: integer
        type: object
      deployment_region:
        type: string
      description:
        type: string
      is_sample:
        type: boolean
    required:
    - app_name
    - app_type
    type: object
  entity.CreateEndpointParam:
    properties:
      args:
        items:
          $ref: '#/definitions/entity.EndpointArgs'
        type: array
      batch:
        type: boolean
      cluster_id:
        type: string
      database:
        type: string
      description:
        type: string
      endpoint:
        type: string
      method:
        type: string
      name:
        type: string
      settings:
        $ref: '#/definitions/entity.EndpointSettings'
      sql_template:
        type: string
      tag:
        type: string
      vid:
        example: "0"
        type: string
    type: object
  entity.CreateSessionParam:
    properties:
      cluster_id:
        example: "0"
        type: string
      database:
        type: string
    required:
      - cluster_id
    type: object
  entity.CustomDomain:
    properties:
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      custom_domain_name:
        type: string
      custom_path:
        type: string
      dataapp_id:
        type: integer
      default_domain_name:
        type: string
      expired:
        type: boolean
      external_app_id:
        type: string
      id:
        type: integer
      reason:
        type: string
      state:
        description: Additional not persisted status
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
    type: object
  entity.DataApp:
    properties:
      app_name:
        type: string
      app_type:
        type: string
      app_version:
        type: string
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      deployment_region:
        type: string
      description:
        type: string
      external_app_id:
        type: string
      id:
        type: integer
      is_deleted:
        type: integer
      oas_authorized:
        type: boolean
      org_id:
        type: integer
      project_id:
        type: integer
      settings:
        $ref: '#/definitions/entity.DataAppSettings'
      status:
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
    type: object
  entity.DataAppDeploymentLog:
    properties:
      commit_id:
        type: string
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      dataapp_id:
        type: integer
      deployed_at:
        $ref: '#/definitions/utils.JsonTime'
      diff_url:
        type: string
      finished_at:
        $ref: '#/definitions/utils.JsonTime'
      id:
        type: integer
      name:
        type: string
      origin:
        type: string
      ran_at:
        $ref: '#/definitions/utils.JsonTime'
      redeploy_from_id:
        type: integer
      snapshot:
        type: string
      status:
        type: string
      status_error_msg:
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
    type: object
  entity.DataAppDeploymentSetting:
    properties:
      automatic_deployment_provider:
        type: string
      automatic_deployment_setting:
        type: string
      dataapp_id:
        type: integer
      enable_automatic_deployment:
        type: boolean
      enable_ui_drafts:
        type: boolean
      github_branch:
        type: string
      github_directory:
        type: string
      github_installation_id:
        type: integer
      github_repo_id:
        type: integer
      has_deploy_conflict:
        type: boolean
      id:
        type: integer
    type: object
  entity.DataAppDiff:
    properties:
      modify:
        $ref: '#/definitions/entity.DataApp'
    type: object
  entity.DataAppSettings:
    properties:
      log_exec_result:
        type: boolean
    type: object
  entity.DeployDataAppParam:
    properties:
      deploy_name:
        type: string
    type: object
  entity.DeployEndpointReq:
    properties:
      deploy_name:
        type: string
    type: object
  entity.DeploymentStatus:
    properties:
      action_time:
        $ref: '#/definitions/utils.JsonTime'
      action_type:
        type: string
      button_status:
        type: string
      message:
        type: string
      origin:
        type: string
    type: object
  entity.DeploymentSwithConfig:
    properties:
      enable_automatic_deployment:
        type: boolean
      enable_ui_drafts:
        type: boolean
    type: object
  entity.Endpoint:
    properties:
      args:
        type: string
      batch:
        type: boolean
      cluster_id:
        type: integer
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      dataappp_id:
        type: integer
      database:
        type: string
      description:
        type: string
      endpoint:
        type: string
      id:
        type: integer
      is_deleted:
        type: integer
      method:
        type: string
      name:
        type: string
      rw_mode:
        type: string
      settings:
        type: string
      sql_template:
        type: string
      tag:
        type: string
      type:
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
      vid:
        type: integer
    type: object
  entity.EndpointArgs:
    properties:
      default:
        type: string
      description:
        type: string
      enum:
        type: string
      is_path_parameter:
        type: boolean
      item_type:
        type: string
      name:
        type: string
      required:
        type: integer
      type:
        type: string
    type: object
  entity.EndpointPublish:
    properties:
      args:
        type: string
      batch:
        type: boolean
      cluster_id:
        type: integer
      created_at:
        $ref: '#/definitions/utils.JsonTime'
      created_by:
        type: string
      dataappp_id:
        type: integer
      database:
        type: string
      endpoint:
        type: string
      endpoint_id:
        type: integer
      id:
        type: integer
      method:
        type: string
      rw_mode:
        type: string
      settings:
        type: string
      sql_template:
        type: string
      tag:
        type: string
      type:
        type: string
      updated_at:
        $ref: '#/definitions/utils.JsonTime'
      updated_by:
        type: string
      version:
        type: string
    type: object
  entity.EndpointSettings:
    properties:
      cache_enabled:
        type: integer
      cache_ttl:
        type: integer
      enable_pagination:
        description: enable pagination, 0 or 1
        type: integer
      row_limit:
        type: integer
      timeout:
        type: integer
    type: object
  entity.EndpointsDiff:
    properties:
      added:
        items:
          $ref: '#/definitions/entity.Endpoint'
        type: array
      deleted:
        items:
          $ref: '#/definitions/entity.Endpoint'
        type: array
      deleted_publish:
        items:
          $ref: '#/definitions/entity.EndpointPublish'
        type: array
      modified:
        items:
          $ref: '#/definitions/entity.Endpoint'
        type: array
      modified_detail:
        items:
          additionalProperties: true
          type: object
        type: array
      modified_publish:
        items:
          $ref: '#/definitions/entity.EndpointPublish'
        type: array
      no_change:
        items:
          $ref: '#/definitions/entity.Endpoint'
        type: array
    type: object
  entity.LinkGithubParam:
    properties:
      branch:
        type: string
      directory:
        type: string
      enable_automatic_deployment:
        type: boolean
      installation_id:
        type: integer
      repository_id:
        type: integer
    type: object
  entity.SampleDataTaskRecord:
    properties:
      message:
        type: string
      start_time:
        $ref: '#/definitions/utils.JsonTime'
      state:
        description: import_data,create_endpoint,deploy_endpoint,success,fail
        type: string
    type: object
  entity.SaveDeploymentLogParam:
    properties:
      deploy_name:
        type: string
    required:
      - deploy_name
    type: object
  entity.SnapshotDiff:
    properties:
      app_clusters_diff:
        $ref: '#/definitions/entity.AppClusterDiff'
      data_app_diff:
        $ref: '#/definitions/entity.DataAppDiff'
      endpoints_diff:
        $ref: '#/definitions/entity.EndpointsDiff'
      has_diff:
        type: boolean
      text_diff:
        type: string
    type: object
  entity.StatementArgs:
    properties:
      default:
        type: string
      description:
        type: string
      enum:
        type: string
      is_path_parameter:
        type: boolean
      item_type:
        type: string
      name:
        type: string
      required:
        type: integer
      type:
        type: string
      value: { }
    type: object
  entity.StatementParamV2:
    properties:
      args:
        items:
          items:
            $ref: '#/definitions/entity.StatementArgs'
          type: array
        type: array
      cluster_id:
        type: string
      database:
        type: string
      session_id:
        type: string
      settings:
        $ref: '#/definitions/entity.EndpointSettings'
      sql:
        type: string
    required:
    - cluster_id
    - session_id
    - sql
    type: object
  entity.TestEndpointArgs:
    properties:
      name:
        type: string
      type:
        type: string
      value: { }
    required:
      - name
      - type
    type: object
  entity.TestEndpointParamV2:
    properties:
      args:
        items:
          items:
            $ref: '#/definitions/entity.TestEndpointArgs'
          type: array
        type: array
    type: object
  entity.UpdateAPIKeyParam:
    properties:
      name:
        type: string
      new_role:
        type: string
      new_ttl_in_min:
        type: integer
      old_role:
        type: string
      old_ttl_in_min:
        type: integer
      rate_limit_rpm:
        type: integer
    required:
    - name
    type: object
  entity.UpdateDataAppParam:
    properties:
      app_name:
        type: string
      app_version:
        type: string
      deployment_region:
        type: string
      description:
        type: string
    required:
      - app_name
    type: object
  entity.VectorSearchOperations:
    properties:
      distance_func:
        type: string
      field:
        type: string
      is_enabled:
        type: boolean
    type: object
  utils.JsonTime:
    properties:
      time.Time:
        type: string
    type: object
host: 127.0.0.1:8080
info:
  contact: {}
  description: This is Data API server
  title: DataAPI API
  version: "1.0"
paths:
  /external/appexport/openapi:
    get:
      consumes:
      - application/json
      description: Export dataapp to openapi doc
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DataappPostmanCollection'
      summary: Export dataapp to openapi doc
      tags:
      - dataapi
  /external/appexport/postman:
    get:
      consumes:
      - application/json
      description: Export dataapp to postman collection
      parameters:
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DataappPostmanCollection'
      summary: Export dataapp to postman collection
      tags:
      - dataapi
  /orgs/:org_id/projects/:project_id/apps/:app_id/auto/endpoints:
    post:
      consumes:
      - application/json
      description: create auto generate endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.AutoGenerateEndpoint'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CreateAutoGenerateEndpointRes'
      summary: create auto generate endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps:
    get:
      consumes:
      - application/json
      description: list data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: 'app type, multiple split by commas. Example: dataapi,chat2query'
        in: query
        name: apptype
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListDataAppRes'
      summary: list data app
      tags:
      - dataapi
    post:
      consumes:
      - application/json
      description: create data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CreateDataAppRes'
      summary: create data app
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}:
    delete:
      consumes:
      - application/json
      description: delete data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: delete data app
      tags:
      - dataapi
    get:
      consumes:
      - application/json
      description: show data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppRes'
      summary: show data app
      tags:
      - dataapi
    put:
      consumes:
      - application/json
      description: update data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.UpdateDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: update data app
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/apikeys:
    get:
      consumes:
      - application/json
      description: list api keys
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: app key source, multiple split by commas
        in: query
        name: source
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListAPIKeysRes'
      summary: list api keys
      tags:
      - dataapi
    post:
      consumes:
      - application/json
      description: create api key
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateAPIKeyParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CreateAPIKeyRes'
      summary: create api key
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/apikeys/{apikey_id}:
    delete:
      consumes:
      - application/json
      description: delete api key
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: apikey ID
        in: path
        name: apikey_id
        required: true
        type: string
      - description: current role
        in: query
        name: role
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: delete api key
      tags:
      - dataapi
    put:
      consumes:
      - application/json
      description: update api key
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.UpdateAPIKeyParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: update api key
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/apikeys/{apikey_id}/expire_key:
    post:
      consumes:
      - application/json
      description: expire api key
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: apikey ID
        in: path
        name: apikey_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: expire assigned api key
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/apikeys/expire_all:
    post:
      consumes:
      - application/json
      description: expire all api keys
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: expire all api keys
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/authorize-url:
    get:
      description: get url of authoriztion
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetAuthorizeUrlResp'
      summary: get url of authoriztion
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/batchexample:
    get:
      consumes:
      - application/json
      description: batch get sample dataapp code example
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.BatchGetCodeExampleRes'
      summary: batch get sample dataapp code example
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/clusters:
    get:
      consumes:
      - application/json
      description: list app cluster
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListAppClusterResp'
      summary: list app cluster
      tags:
      - dataapi
    post:
      consumes:
      - application/json
      description: create app cluster
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: dataapp ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.CreateAppClusterReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: create app cluster
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/clusters/{cluster_id}:
    delete:
      consumes:
      - application/json
      description: delete app cluster
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: delete app cluster
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/clusters/{cluster_id}/dbs:
    get:
      consumes:
      - application/json
      description: show db list
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: 'value: true or false'
        in: query
        name: show_system_db
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ShowDBsRes'
      summary: show db list
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/clusters/{cluster_id}/dbs/{db_name}/tables:
    get:
      consumes:
      - application/json
      description: show table list
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: db name
        in: path
        name: db_name
        required: true
        type: string
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ShowTablesRes'
      summary: show table list
      tags:
        - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/clusters/{cluster_id}/dbs/{db_name}/tables/{table_name}/vector/fields:
    get:
      consumes:
        - application/json
      description: show vector field list
      parameters:
        - description: org ID
          in: path
          name: org_id
          required: true
          type: string
        - description: project ID
          in: path
          name: project_id
          required: true
          type: string
        - description: app ID
          in: path
          name: app_id
          required: true
          type: string
        - description: cluster ID
          in: path
          name: cluster_id
          required: true
          type: string
        - description: db name
          in: path
          name: db_name
          required: true
          type: string
        - description: table name
          in: path
          name: table_name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ShowVectorFieldsRes'
      summary: show vector field list
      tags:
        - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/custom-domains:
    get:
      description: list custom domain
      parameters:
        - description: org ID
          in: path
          name: org_id
          required: true
          type: string
        - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListCustomDomainsResponse'
      summary: list custom domain
      tags:
      - customdomain
    post:
      consumes:
      - application/json
      description: create custom domain
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.CustomDomainRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CustomDomainResponse'
      summary: create custom domain
      tags:
      - customdomain
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/custom-domains/{custom_domain_id}:
    delete:
      description: delete custom domain
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: delete custom domain
      tags:
      - customdomain
    put:
      consumes:
      - application/json
      description: edit custom domain
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.CustomDomainRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CustomDomainResponse'
      summary: edit custom domain
      tags:
      - customdomain
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/default-domains:
    get:
      description: list default domain
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListDefaultDomainsResponse'
      summary: list default domain
      tags:
      - customdomain
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy:
    post:
      consumes:
      - application/json
      description: deploy dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeployDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: deploy dataapp
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/config:
    get:
      consumes:
      - application/json
      description: get dataapp deployment setting
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppDeploySettingRes'
      summary: get dataapp deployment setting
      tags:
      - dataapi
    put:
      consumes:
      - application/json
      description: save dataapp deployment setting
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeploymentSwithConfig'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: save dataapp deployment setting
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/diff:
    get:
      consumes:
      - application/json
      description: get dataapp deploy diff
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: struct/text
        in: query
        name: diff_type
        required: true
        type: string
      - description: endpoint ID
        in: query
        name: endpoint_id
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppDeployDiffRes'
      summary: get dataapp deploy diff
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/logs:
    get:
      consumes:
      - application/json
      description: list dataapp deploy logs
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: before timestamp
        in: query
        name: before
        required: true
        type: string
      - description: limit
        in: query
        name: limit
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListDataAppDeployLogsRes'
      summary: list dataapp deploy logs
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/logs/:log_id/deploy:
    post:
      consumes:
      - application/json
      description: redeploy dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeployDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: redeploy dataapp
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/logs/{log_id}:
    post:
      consumes:
      - application/json
      description: save deployment log name
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: deployment log ID
        in: path
        name: log_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.SaveDeploymentLogParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: save deployment log name
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/logs/{log_id}/diff:
    get:
      consumes:
      - application/json
      description: get dataapp deploy log diff
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: log ID
        in: query
        name: log_id
        type: string
      - description: 'options: struct/text. default is struct'
        in: query
        name: diff_type
        type: string
      - description: 'options: redeploy/detail'
        in: query
        name: sence
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppDeployDiffRes'
      summary: get dataapp deploy log diff
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/deploy/status:
    get:
      consumes:
      - application/json
      description: get deployment status (message bar)
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDeploymentStatus'
      summary: get deployment status (message bar)
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/discard:
    post:
      consumes:
      - application/json
      description: discard dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeployDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: discard dataapp
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/download_log_task:
    post:
      description: submit download log task
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: cluster filter
        in: query
        name: cluster_id
        required: true
        type: string
      - description: endpoint filter
        in: query
        name: endpoint_id
        required: true
        type: string
      - description: enum OK/Error/All
        in: query
        name: status
        type: string
      - description: type filter,enum all/endpoints
        in: query
        name: type
        type: string
      - description: request id filter
        in: query
        name: request_id
        type: string
      - description: trace id filter
        in: query
        name: trace_id
        type: string
      - description: 'passback, fetch from the latest query result, omit when create
          new query: first query/user change query conditions/click Refresh button'
        in: query
        name: passback
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.SubmitDownloadDataAPPLogTaskRes'
      summary: submit download log task
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/download_log_task/{task_id}:
    get:
      description: get download log task status
      parameters:
      - description: download task id
        in: path
        name: task_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DownloadDataAPPLogTaskStatusRes'
      summary: get download log task status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints:
    get:
      consumes:
      - application/json
      description: list endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListEndpointRes'
      summary: list endpoints
      tags:
      - dataapi
    post:
      consumes:
      - application/json
      description: create endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateEndpointParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CreateEndpointRes'
      summary: create endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}:
    delete:
      consumes:
      - application/json
      description: delete endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: delete endpoints
      tags:
      - dataapi
    get:
      consumes:
      - application/json
      description: get endpoint by id
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetEndpointRes'
      summary: get endpoint by id
      tags:
      - dataapi
    patch:
      consumes:
      - application/json
      description: patch endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateEndpointParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.UpdateEndpointRes'
      summary: patch endpoints
      tags:
      - dataapi
    put:
      consumes:
      - application/json
      description: update endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateEndpointParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.UpdateEndpointRes'
      summary: update endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/baseurl:
    get:
      consumes:
      - application/json
      description: get endpoint base url
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: cluster ID
        in: query
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.EndpointBaseUrlRes'
      summary: get endpoint base url
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/discard:
    post:
      consumes:
      - application/json
      description: discard endpoint
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeployDataAppParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: discard endpoint
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/draft/diff:
    post:
      consumes:
      - application/json
      description: Get endpoint draft diff
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: 'options: struct/text. default is struct'
        in: query
        name: diff_type
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateEndpointParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppDeployDiffRes'
      summary: Get endpoint draft diff
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/dump:
    post:
      consumes:
      - application/json
      description: dump endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DumpEndpointRes'
      summary: dump endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/example:
    get:
      consumes:
      - application/json
      description: get endpoint code example
      parameters:
        - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
        - description: endpoint ID
          in: path
          name: endpoint_id
          required: true
          type: string
        - description: 'enum: basic/digest, default value is digest'
          in: query
          name: auth_type
          type: string
        - description: 'enum: curl/js, default value is curl'
          in: query
          name: language
          type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.TestEndpointRes'
      summary: get endpoint code example
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/offline:
    put:
      consumes:
      - application/json
      description: offline endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.BaseResp'
      summary: offline endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/online:
    post:
      consumes:
      - application/json
      description: online endpoints
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.DeployEndpointReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.EndpointPublishRes'
      summary: online endpoints
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/sessions:
    post:
      consumes:
      - application/json
      description: create session
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.CreateSessionParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CreateSessionRes'
      summary: create session
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/statements:
    post:
      consumes:
      - application/json
      description: run endpoint sql
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.StatementParamV2'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.StatementsRes'
      summary: run endpoint sql
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/test:
    post:
      consumes:
      - application/json
      description: test endpoint
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.TestEndpointParamV2'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.TestEndpointRes'
      summary: test endpoint
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/version/{version}/status:
    get:
      consumes:
      - application/json
      description: check endpoint deploy status
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      - description: version
        in: path
        name: version
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.EndpointDeployRes'
      summary: check endpoint deploy status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/endpoints/{endpoint_id}/versions:
    get:
      consumes:
      - application/json
      description: list endpoint versions by endpointid
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListEndpointPublishLogRes'
      summary: list endpoint versions by endpointid
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/exportlink:
    get:
      consumes:
      - application/json
      description: Get dataapp export url
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DataappExportLinkRes'
      summary: Get dataapp export url
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/github:
    get:
      description: get github linkage status
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GithubLinkageStatusResp'
      summary: get github linkage status
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/github/link:
    post:
      consumes:
      - application/json
      description: link dataapp with github
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.LinkGithubParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: link dataapp with github
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/github/unlink:
    post:
      description: unlink dataapp with github
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: unlink dataapp with github
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/log:
    get:
      description: query dataapp log
      parameters:
        - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: cluster filter
        in: query
        name: cluster_id
        required: true
        type: string
      - description: endpoint filter
        in: query
        name: endpoint_id
        required: true
        type: string
      - description: page number, starts from 1
        in: query
        name: page
        required: true
        type: integer
      - description: enum OK/Error/All
        in: query
        name: status
        type: string
        - description: type filter,enum all/endpoints
          in: query
          name: type
          type: string
      - description: request id filter
        in: query
        name: request_id
        type: string
      - description: trace id filter
        in: query
        name: trace_id
        type: string
      - description: 'passback, fetch from the latest query result, omit when create
          new query: first query/user change query conditions/click Refresh button'
        in: query
        name: passback
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetDataAppLogRes'
      summary: query dataapp log
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/log_response_body_switch:
    post:
      consumes:
      - application/json
      description: change log response body switch status
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/entity.ChangeLogResponseBodySwitchParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: change log response body switch status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/avg_request_rate:
    get:
      description: get DataApp average request rate
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: invertal duration sec
        in: query
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonPromMetricsRes'
      summary: get DataApp average request rate
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/avg_response_time:
    get:
      description: get DataApp avg response time
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: invertal duration sec
        in: query
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonPromMetricsRes'
      summary: get DataApp avg response time
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/endpoints_rank/high_latency:
    get:
      description: get DataApp high latency  endpoints rank
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: top k
        in: query
        name: topK
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonEndpointsRankRes'
      summary: get DataApp high latency  endpoints rank
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/endpoints_rank/most_error:
    get:
      description: get DataApp most error endpoints rank
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: top k
        in: query
        name: topK
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonEndpointsRankRes'
      summary: get DataApp most error endpoints rank
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/endpoints_rank/most_request:
    get:
      description: get DataApp most request endpoints rank
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: top k
        in: query
        name: topK
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonEndpointsRankRes'
      summary: get DataApp most request endpoints rank
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/error_rate:
    get:
      description: get DataApp error rate
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: invertal duration sec
        in: query
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonPromMetricsRes'
      summary: get DataApp error rate
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/misc_statistic:
    get:
      description: Query DataApp misc statistic
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: from
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: to
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.DataAppMiscStatusRes'
      summary: Query DataApp misc statistic
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/response_time_tp99:
    get:
      description: get DataApp tp99 response time
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: invertal duration sec
        in: query
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonPromMetricsRes'
      summary: get DataApp tp99 response time
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/metrics/unauth_req_num:
    get:
      description: get DataApp unauth req num
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: query start timestamp
        in: query
        name: start
        required: true
        type: integer
      - description: query end timestamp
        in: query
        name: end
        required: true
        type: integer
      - description: invertal duration sec
        in: query
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonPromMetricsRes'
      summary: get DataApp unauth req num
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/oas:
    get:
      consumes:
      - application/json
      description: get oas
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: openapi specification format
        in: query
        name: format
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetOpenApiSpecificationResp'
      summary: get oas
      tags:
      - oas
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/oas/authorize:
    post:
      consumes:
      - application/json
      description: authorize oas
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CommonApiResp'
      summary: authorize oas
      tags:
      - oas
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/oas/download:
    get:
      consumes:
      - application/json
      description: download oas
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: openapi specification format
        in: query
        name: format
        required: true
        type: string
      produces:
      - application/json
      responses: {}
      summary: download oas
      tags:
      - oas
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/postmanstatus:
    get:
      consumes:
      - application/json
      description: check run in postman status
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CheckPostmanStatusRes'
      summary: run in postman status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/repositories:
    get:
      description: list authorized github repositories of a dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListAuthorizedRepositoriesResp'
      summary: list authorized github repositories of a dataapp
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/repositories/{repo_id}/branches:
    get:
      description: list authorized github branches of a dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: ghtub repository ID
        in: path
        name: repo_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListBranchesResp'
      summary: list authorized github branches of a data app
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/repositories/{repo_id}/validate:
    post:
      description: validate repo/branch/direcotory a preflight request
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: ghtub repository ID
        in: path
        name: repo_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.RepoBranchDirValidateReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.RepoBranchDirValidateResp'
      summary: validate repo/branch/direcotory a preflight request
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/samplestatus:
    get:
      consumes:
      - application/json
      description: check sample dataapp status
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.CheckSampleStatusRes'
      summary: check sample dataapp status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/systemendpoint:
    get:
      consumes:
      - application/json
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetSystemEndpointConfigResp'
      summary: Get system endpoint configuration
      tags:
      - dataapi
    post:
      consumes:
      - application/json
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.SystemEndpointConfigData'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: Save system endpoint configuration
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/apps/{app_id}/updatestatus:
    post:
      consumes:
      - application/json
      description: update sample dataapp status to normal
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: app_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GenericSuccessApiResponse'
      summary: update sample dataapp status
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/apps:
    get:
      consumes:
      - application/json
      description: count app cluster
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ClusterLinkedAPPResp'
      summary: count app cluster
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/external-apps/{external_app_id}/oas:
    get:
      consumes:
      - application/json
      description: get oas
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: app ID
        in: path
        name: external_app_id
        required: true
        type: string
      - description: openapi specification format
        in: query
        name: format
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetOpenApiSpecificationResp'
      summary: get oas
      tags:
      - oas
  /orgs/{org_id}/projects/{project_id}/list_dataapp_usage:
    get:
      consumes:
      - application/json
      description: list data app Usage
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Type
        in: path
        name: type
        required: true
        type: string
      - description: month
        in: path
        name: month
        required: true
        type: integer
      - description: year
        in: path
        name: year
        required: true
        type: integer
      - description: class
        in: path
        name: class
        required: true
        type: string
      - description: region
        in: path
        name: region
        required: true
        type: string
      - description: dataapp_id
        in: path
        name: dataapp_id
        required: true
        type: integer
      - description: start
        in: path
        name: start
        required: true
        type: integer
      - description: end
        in: path
        name: end
        required: true
        type: integer
      - description: step
        in: path
        name: step
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.OKType'
      summary: list data app Usage
      tags:
      - dataapi
  /orgs/{org_id}/projects/{project_id}/preflight-request:
    post:
      description: generate the preflight request
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.GetAuthorizeUrlResp'
      summary: generate the preflight request
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/preflight-request/{request_id}/repositories:
    get:
      description: list authorized github repositories of a preflight request
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: preflight request ID
        in: path
        name: request_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListAuthorizedRepositoriesResp'
      summary: list authorized github repositories of a preflight request
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/preflight-request/{request_id}/repositories/{repo_id}/branches:
    get:
      description: list authorized github branches of a dataapp
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: preflight request ID
        in: path
        name: request_id
        required: true
        type: string
      - description: ghtub repository ID
        in: path
        name: repo_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.ListBranchesResp'
      summary: list authorized github branches of a data app
      tags:
      - github_integration
  /orgs/{org_id}/projects/{project_id}/preflight-request/{request_id}/repositories/{repo_id}/validate:
    post:
      description: validate repo/branch/direcotory a data app
      parameters:
      - description: org ID
        in: path
        name: org_id
        required: true
        type: string
      - description: project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: preflight request ID
        in: path
        name: request_id
        required: true
        type: string
      - description: ghtub repository ID
        in: path
        name: repo_id
        required: true
        type: string
      - description: request_body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dto.RepoBranchDirValidateReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dto.RepoBranchDirValidateResp'
      summary: validate repo/branch/direcotory a data app
      tags:
      - github_integration
swagger: "2.0"
