basePath: /api/v1/admin
definitions:
  forms.AccessLog:
    properties:
      content:
        type: string
      happened_on:
        type: integer
      id:
        example: "0"
        type: string
      user:
        type: string
    type: object
  forms.AddTrailCredit:
    properties:
      credit_amount:
        type: integer
    type: object
  forms.CalcNodeProfileResp:
    properties:
      code:
        type: integer
      component_node_profiles:
        items:
          $ref: '#/definitions/forms.NodeProfilesWithComponentType'
        type: array
      message:
        type: string
    type: object
  forms.CentralUser:
    properties:
      email:
        type: string
      first_name:
        type: string
      id:
        example: "0"
        type: string
      last_name:
        type: string
      roles:
        items:
          type: string
        type: array
    type: object
  forms.CentralUserProfile:
    properties:
      email:
        type: string
      id:
        example: "0"
        type: string
      name:
        type: string
      roles:
        items:
          type: string
        type: array
    type: object
  forms.ClusterTCU:
    properties:
      tcu_number:
        type: integer
    type: object
  forms.ComponentScale:
    properties:
      component_type:
        type: string
      node_profile_id:
        example: "0"
        type: string
      replicas:
        type: integer
      storage_size_gi:
        type: integer
    required:
    - component_type
    - node_profile_id
    - replicas
    type: object
  forms.CreateAPIKey:
    properties:
      creator_user_id:
        example: "0"
        type: string
      key_name:
        type: string
      tenant_id:
        example: "0"
        type: string
    type: object
  forms.CreateAPIKeyResp:
    properties:
      api_key:
        type: string
    type: object
  forms.CreditsHistoryItem:
    properties:
      amount:
        type: integer
      created:
        type: integer
    type: object
  forms.DashboardLink:
    properties:
      link:
        type: string
      name:
        type: string
    type: object
  forms.DevTierStats:
    properties:
      aws_active_clusters_count:
        type: integer
      gcp_active_clusters_count:
        type: integer
    type: object
  forms.Discount:
    properties:
      discount:
        type: integer
    type: object
  forms.EmptyResponse:
    type: object
  forms.EnableDevTier:
    properties:
      enable_on_aws:
        type: boolean
      enable_on_gcp:
        type: boolean
    type: object
  forms.GetDashboardLinksResp:
    properties:
      dashboards:
        items:
          $ref: '#/definitions/forms.DashboardLink'
        type: array
    type: object
  forms.GetDashboardStatsResq:
    properties:
      dev_tier:
        $ref: '#/definitions/forms.DevTierStats'
    type: object
  forms.GlobalDiscount:
    properties:
      discount:
        type: integer
    type: object
  forms.ListAccessLogResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.AccessLog'
        type: array
      total:
        type: integer
    type: object
  forms.ListCentralUsersResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.CentralUser'
        type: array
      total:
        type: integer
    type: object
  forms.ListProvidersResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.Provider'
        type: array
      total:
        type: integer
    type: object
  forms.ListRegionResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.ProviderRegion'
        type: array
      total:
        type: integer
    type: object
  forms.ListRolesResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.Role'
        type: array
      total:
        type: integer
    type: object
  forms.ListTenantClusterLifeCycleResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.TenantClusterLifecycle'
        type: array
      total:
        type: integer
    type: object
  forms.ListTenantClustersResp:
    properties:
      code:
        type: integer
      items:
        items:
          $ref: '#/definitions/forms.TenantCluster'
        type: array
      message:
        type: string
      total:
        type: integer
    type: object
  forms.ListTenantResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.Tenant'
        type: array
      total:
        type: integer
    type: object
  forms.ListTenantUsersResp:
    properties:
      items:
        items:
          $ref: '#/definitions/forms.TenantUser'
        type: array
      total:
        type: integer
    type: object
  forms.NodeProfile:
    properties:
      default_node_num:
        type: integer
      id:
        example: "0"
        type: string
      max_storage_size_gi:
        type: integer
      min_storage_size_gi:
        type: integer
      name:
        type: string
    type: object
  forms.NodeProfileCompute:
    properties:
      cpu:
        type: integer
      memory_mi:
        type: integer
    type: object
  forms.NodeProfileOfComponent:
    properties:
      compute:
        $ref: '#/definitions/forms.NodeProfileCompute'
      name:
        type: string
      node_profile_id:
        example: "0"
        type: string
      storage_gi:
        type: integer
    type: object
  forms.NodeProfilesWithComponentType:
    properties:
      component_type:
        description: core.proto:ComponentType.string()
        type: string
      profiles:
        items:
          $ref: '#/definitions/forms.NodeProfile'
        type: array
    type: object
  forms.PatchTenantReq:
    properties:
      account_manager:
        description: the email address of account manager, must end with @pingcap.com
        type: string
      alias:
        type: string
      kind:
        type: string
    type: object
  forms.Privilege:
    properties:
      operation:
        type: string
      resource:
        type: string
    required:
    - operation
    - resource
    type: object
  forms.Provider:
    properties:
      name:
        type: string
      status:
        type: string
    required:
    - name
    type: object
  forms.ProviderRegion:
    properties:
      default_backup_time:
        type: string
      display_name:
        type: string
      id:
        example: "0"
        type: string
      is_public:
        type: boolean
      name:
        type: string
      opened_org_ids:
        items:
          type: string
        type: array
      provider:
        type: string
      status:
        type: string
      zones:
        items:
          type: string
        type: array
    type: object
  forms.ReplaceProfileResponse:
    properties:
      code:
        type: integer
      message:
        type: string
      version_id:
        type: integer
    type: object
  forms.Role:
    properties:
      id:
        example: "0"
        type: string
      name:
        type: string
      privileges:
        items:
          $ref: '#/definitions/forms.Privilege'
        type: array
    required:
    - name
    - privileges
    type: object
  forms.ScaleComponentReq:
    properties:
      components:
        items:
          $ref: '#/definitions/forms.ComponentScale'
        type: array
    required:
    - components
    type: object
  forms.SystemSettings:
    properties:
      enable_dev_tier:
        $ref: '#/definitions/forms.EnableDevTier'
    type: object
  forms.Tenant:
    properties:
      account_manager:
        type: string
      alias:
        type: string
      country:
        type: string
      created_at:
        type: integer
      discount:
        type: integer
      discount_description:
        type: string
      email:
        type: string
      has_discount:
        type: boolean
      id:
        example: "0"
        type: string
      kind:
        type: string
      name:
        type: string
      plan:
        type: string
      remaining_credit:
        type: integer
      status:
        type: string
      third_party_account_code:
        type: string
      third_party_account_provider:
        type: string
      timezone:
        type: integer
      total_credit:
        type: integer
    type: object
  forms.TenantCluster:
    properties:
      create_time:
        type: integer
      cross_account_deployment_id:
        example: "0"
        type: string
      id:
        example: "0"
        type: string
      is_dev_tier:
        type: boolean
      name:
        type: string
      profile:
        type: string
      project_id:
        example: "0"
        type: string
      project_name:
        type: string
      provider:
        type: string
      region:
        type: string
      status:
        type: string
      tenant_components:
        $ref: '#/definitions/forms.TenantComponents'
      version:
        type: string
    type: object
  forms.TenantClusterLifecycle:
    properties:
      created_at:
        type: integer
      deleted_at:
        type: integer
      id:
        example: "0"
        type: string
      project_id:
        example: "0"
        type: string
    type: object
  forms.TenantComponent:
    properties:
      machineType:
        description: 'TODO(chenfei): remove. used by gitops to overlay configuration
          for component for now'
        type: string
      node_profile:
        $ref: '#/definitions/forms.NodeProfileOfComponent'
      replicas:
        type: integer
    type: object
  forms.TenantComponents:
    properties:
      pd:
        $ref: '#/definitions/forms.TenantComponent'
      tidb:
        $ref: '#/definitions/forms.TenantComponent'
      tiflash:
        $ref: '#/definitions/forms.TenantComponent'
      tikv:
        $ref: '#/definitions/forms.TenantComponent'
    type: object
  forms.TenantCreditsHistory:
    properties:
      amount:
        type: integer
      history:
        items:
          $ref: '#/definitions/forms.CreditsHistoryItem'
        type: array
    type: object
  forms.TenantRemaingCredits:
    properties:
      remaining_credit:
        type: integer
    type: object
  forms.TenantUser:
    properties:
      email:
        type: string
      first_name:
        type: string
      id:
        example: "0"
        type: string
      last_name:
        type: string
      org_id:
        example: "0"
        type: string
      role:
        type: string
      roles:
        items:
          type: string
        type: array
      status:
        type: string
    type: object
  forms.UpdateOrgPocStatusReq:
    properties:
      approve:
        type: boolean
      org_id:
        example: "0"
        type: string
    type: object
host: 127.0.0.1:8080
info:
  contact: {}
  description: This is a management portal server
  title: Management Portal API
  version: "1.0"
paths:
  /access-logs:
    get:
      consumes:
      - application/json
      parameters:
      - in: query
        name: content
        type: string
      - in: query
        name: end_time
        type: integer
      - in: query
        name: org_id
        type: integer
      - in: query
        name: start_time
        type: integer
      - in: query
        name: user
        type: string
      - in: query
        name: page
        type: integer
      - in: query
        name: per_page
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListAccessLogResp'
      summary: Search Management Portal access logs
      tags:
      - AccessLog
  /api/v1/admin/profile/query:
    post:
      consumes:
      - multipart/form-data
      description: CalcNodeProfiles
      parameters:
      - in: formData
        name: is_dev_tier
        type: boolean
      - example: "0"
        in: formData
        name: org_id
        type: string
      - in: formData
        name: provider
        type: string
      - in: formData
        name: region
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CalcNodeProfileResp'
      summary: CalcNodeProfiles
      tags:
      - Profile
  /api_key:
    post:
      consumes:
      - application/json
      parameters:
      - description: Add API key
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.CreateAPIKey'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CreateAPIKeyResp'
      summary: Add API Key
      tags:
      - ApiKey
  /dashboard/stats:
    get:
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.GetDashboardStatsResq'
      summary: GetDashboardStats
      tags:
      - System
  /external-api/v1/orgs/profile/replace_node_and_sku:
    post:
      consumes:
      - multipart/form-data
      description: ReplaceNodeAndSKUByYaml
      parameters:
      - in: formData
        name: dryrun
        type: string
      - example: the file of node, named by nodes.yaml
        in: formData
        name: node
        type: string
      - example: the file of sku, named by skus.yaml
        in: formData
        name: sku
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ReplaceProfileResponse'
      summary: ReplaceNodeAndSKUByYaml
      tags:
      - Profile
  /global-discounts:
    get:
      consumes:
      - application/json
      description: Update global discount
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.GlobalDiscount'
      summary: Get Global Discount
      tags:
      - Discount
    put:
      consumes:
      - application/json
      description: Update global discount
      parameters:
      - description: discount
        in: body
        name: discount
        required: true
        schema:
          $ref: '#/definitions/forms.GlobalDiscount'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.GlobalDiscount'
      summary: Update Global Discount
      tags:
      - Discount
  /me:
    get:
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CentralUserProfile'
      summary: GetCentralUserProfile
      tags:
      - ManagementPortalUser
  /orgs:
    get:
      consumes:
      - application/json
      parameters:
      - in: query
        name: page
        type: integer
      - in: query
        name: per_page
        type: integer
      - in: query
        name: alias
        type: string
      - in: query
        name: brief
        type: boolean
      - in: query
        name: email
        type: string
      - in: query
        name: id
        type: integer
      - in: query
        items:
          type: string
        name: kind
        type: array
      - in: query
        name: name
        type: string
      - in: query
        name: no_limit
        type: boolean
      - description: 'options: asc or desc'
        in: query
        name: order
        type: string
      - in: query
        items:
          type: string
        name: plan
        type: array
      - description: 'options: timezone, created_at'
        in: query
        name: sort_by
        type: string
      - in: query
        items:
          type: string
        name: status
        type: array
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListTenantResp'
      summary: List Tenant
      tags:
      - Tenant
  /orgs/{org_id}:
    delete:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Delete Tenant By ID
      tags:
      - Tenant
    get:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Tenant'
      summary: Get Tenant By ID
      tags:
      - Tenant
    patch:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: patch tenant
        in: body
        name: req
        required: true
        schema:
          $ref: '#/definitions/forms.PatchTenantReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: PatchTenant
      tags:
      - Tenant
  /orgs/{org_id}/access-logs:
    get:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - in: query
        name: content
        type: string
      - in: query
        name: end_time
        type: integer
      - in: query
        name: org_id
        type: integer
      - in: query
        name: start_time
        type: integer
      - in: query
        name: user
        type: string
      - in: query
        name: page
        type: integer
      - in: query
        name: per_page
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListAccessLogResp'
      summary: Serach Tenant access logs
      tags:
      - AccessLog
  /orgs/{org_id}/cluster-lifecycles:
    get:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - in: query
        name: end
        required: true
        type: integer
      - in: query
        name: start
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListTenantClusterLifeCycleResp'
      summary: ListTenantClusterLifeCycle
      tags:
      - Tenant
  /orgs/{org_id}/clusters:
    get:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - in: query
        name: page
        type: integer
      - in: query
        name: per_page
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListTenantClustersResp'
      summary: List Tenant Cluster
      tags:
      - TenantCuster
  /orgs/{org_id}/clusters/{cluster_id}:
    delete:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_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/forms.EmptyResponse'
      summary: Delete Tenant Cluster
      tags:
      - TenantCuster
  /orgs/{org_id}/clusters/{cluster_id}/components:
    put:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: cluster_id
        in: path
        name: cluster_id
        required: true
        type: string
      - description: scale cluster component
        in: body
        name: scale
        required: true
        schema:
          $ref: '#/definitions/forms.ScaleComponentReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Scale Tenant Cluster
      tags:
      - TenantCuster
  /orgs/{org_id}/clusters/{cluster_id}/dashboard_links:
    get:
      consumes:
      - application/json
      description: GetDashboardLinks
      parameters:
      - description: org_id
        in: path
        name: org_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/forms.GetDashboardLinksResp'
      summary: GetDashboardLinks
      tags:
      - TenantCuster
  /orgs/{org_id}/clusters/{cluster_id}/tcu:
    get:
      consumes:
      - application/json
      description: Get cluster TCU
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ClusterTCU'
      summary: Get cluster TCU
      tags:
      - GetClusterTCU
    put:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: cluster tcu
        in: body
        name: tcu
        required: true
        schema:
          $ref: '#/definitions/forms.ClusterTCU'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Update Cluster TCU
      tags:
      - Salesforce
  /orgs/{org_id}/credits_history:
    get:
      consumes:
      - application/json
      description: Tenant Credits History
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.TenantCreditsHistory'
      summary: Get Tenant Credits History
      tags:
      - Billing
  /orgs/{org_id}/discounts:
    get:
      consumes:
      - application/json
      description: Get discount
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Discount'
      summary: Get Tenant Discount
      tags:
      - Discount
    put:
      consumes:
      - application/json
      description: update discount
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: discount
        in: body
        name: discount
        required: true
        schema:
          $ref: '#/definitions/forms.Discount'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Discount'
      summary: Update Tenant Discount
      tags:
      - Discount
  /orgs/{org_id}/impersonation:
    delete:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Delete Impersonation
      tags:
      - Impersonation
    post:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: AddImpersonation
      tags:
      - Impersonation
  /orgs/{org_id}/poc:
    put:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: update poc status
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.UpdateOrgPocStatusReq'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Update POC Status
      tags:
      - poc
  /orgs/{org_id}/projects/{project_id}:
    delete:
      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
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Delete Tenant Project
      tags:
      - TenantProject
  /orgs/{org_id}/salesforce:
    post:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Sync Salesforce Leads
      tags:
      - Salesforce
  /orgs/{org_id}/trial_credit:
    get:
      consumes:
      - application/json
      description: Get Tenant Billing Status
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.TenantRemaingCredits'
      summary: Get Tenant Billing Status
      tags:
      - Billing
    post:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: add trial credit
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.AddTrailCredit'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Add Trial Credit
      tags:
      - Credit
  /orgs/{org_id}/users:
    get:
      consumes:
      - application/json
      description: List tenant user
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListTenantUsersResp'
      summary: List Tenant Users
      tags:
      - TenantUser
    post:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: Add User
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.TenantUser'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.TenantUser'
      summary: Add Tenant User
      tags:
      - TenantUser
  /orgs/{org_id}/users/{user_id}:
    delete:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Delete Tenant User
      tags:
      - TenantUser
    get:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.TenantUser'
      summary: Get Tenant User
      tags:
      - TenantUser
    put:
      consumes:
      - application/json
      parameters:
      - description: org_id
        in: path
        name: org_id
        required: true
        type: string
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      - description: update User
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.TenantUser'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.TenantUser'
      summary: Update Tenant User
      tags:
      - TenantUser
  /providers:
    get:
      consumes:
      - application/json
      description: ListProviders
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListProvidersResp'
      summary: ListProviders
      tags:
      - Provider
    post:
      consumes:
      - application/json
      description: AddProvider
      parameters:
      - description: provider
        in: body
        name: provider
        required: true
        schema:
          $ref: '#/definitions/forms.Provider'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: AddProvider
      tags:
      - Provider
  /providers/{provider}/regions:
    get:
      consumes:
      - application/json
      description: ListRegions
      parameters:
      - description: provider
        in: path
        name: provider
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListRegionResp'
      summary: ListRegions
      tags:
      - Provider
    post:
      consumes:
      - application/json
      description: AddRegion
      parameters:
      - description: provider
        in: path
        name: provider
        required: true
        type: string
      - description: region
        in: body
        name: region
        required: true
        schema:
          $ref: '#/definitions/forms.ProviderRegion'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ProviderRegion'
      summary: AddRegion
      tags:
      - Provider
  /providers/{provider}/regions/{region_id}:
    delete:
      consumes:
      - application/json
      description: DeleteRegion
      parameters:
      - description: provider
        in: path
        name: provider
        required: true
        type: string
      - description: region_id
        in: path
        name: region_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: DeleteRegion
      tags:
      - Provider
    get:
      consumes:
      - application/json
      description: GetRegionByID
      parameters:
      - description: provider
        in: path
        name: provider
        required: true
        type: string
      - description: region_id
        in: path
        name: region_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ProviderRegion'
      summary: GetRegionByID
      tags:
      - Provider
    put:
      consumes:
      - application/json
      description: UpdateRegion
      parameters:
      - description: provider
        in: path
        name: provider
        required: true
        type: string
      - description: region_id
        in: path
        name: region_id
        required: true
        type: string
      - description: region
        in: body
        name: region
        required: true
        schema:
          $ref: '#/definitions/forms.ProviderRegion'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ProviderRegion'
      summary: UpdateRegion
      tags:
      - Provider
  /roles:
    get:
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListRolesResp'
      summary: ListCentralRoles
      tags:
      - ManagementPortalUser
    post:
      consumes:
      - application/json
      parameters:
      - description: AddCentralRole
        in: body
        name: role
        required: true
        schema:
          $ref: '#/definitions/forms.Role'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Role'
      summary: AddCentralRole
      tags:
      - ManagementPortalUser
  /roles/{role_id}:
    delete:
      consumes:
      - application/json
      description: DeleteCentralRole
      parameters:
      - description: role_id
        in: path
        name: role_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: DeleteCentralRole
      tags:
      - ManagementPortalUser
    get:
      consumes:
      - application/json
      description: GetCentralRole
      parameters:
      - description: role_id
        in: path
        name: role_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Role'
      summary: GetCentralRole
      tags:
      - ManagementPortalUser
    put:
      consumes:
      - application/json
      description: UpdateCentralRole
      parameters:
      - description: role_id
        in: path
        name: role_id
        required: true
        type: string
      - description: UpdateCentralRole
        in: body
        name: role
        required: true
        schema:
          $ref: '#/definitions/forms.Role'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.Role'
      summary: UpdateCentralRole
      tags:
      - ManagementPortalUser
  /system-settings:
    get:
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.SystemSettings'
      summary: GetSystemSettings
      tags:
      - System
    put:
      consumes:
      - application/json
      parameters:
      - description: update system settings
        in: body
        name: settings
        required: true
        schema:
          $ref: '#/definitions/forms.SystemSettings'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.SystemSettings'
      summary: UpdateSystemSettings
      tags:
      - System
  /upload:
    post:
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: UploadFile
  /uploaded/{file_path}:
    get:
      responses: {}
      summary: DownloadFile
  /users:
    get:
      consumes:
      - application/json
      parameters:
      - in: query
        name: page
        type: integer
      - in: query
        name: per_page
        type: integer
      - in: query
        name: email
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.ListCentralUsersResp'
      summary: ListCentralUsers
      tags:
      - ManagementPortalUser
    post:
      consumes:
      - application/json
      parameters:
      - description: Add management portal user
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.CentralUser'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CentralUser'
      summary: Add Management Portal User
      tags:
      - ManagementPortalUser
  /users/{user_id}:
    delete:
      consumes:
      - application/json
      parameters:
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.EmptyResponse'
      summary: Delete Management Portal User
      tags:
      - ManagementPortalUser
    get:
      consumes:
      - application/json
      parameters:
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CentralUser'
      summary: Get Management Portal User
      tags:
      - ManagementPortalUser
    put:
      consumes:
      - application/json
      parameters:
      - description: user_id
        in: path
        name: user_id
        required: true
        type: string
      - description: update management portal user
        in: body
        name: user
        required: true
        schema:
          $ref: '#/definitions/forms.CentralUser'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.CentralUser'
      summary: Update Management Portal User
      tags:
      - ManagementPortalUser
swagger: "2.0"
