> ## Documentation Index
> Fetch the complete documentation index at: https://www.qovery.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Start cluster analysis

> Starts a read-only analysis for the cluster. The result and logs can be retrieved later from the cluster analysis endpoints.



## OpenAPI

````yaml /api-reference/openapi.yaml post /clusters/{clusterId}/analysis
openapi: 3.0.0
info:
  version: 1.0.4
  title: Qovery API
  description: >
    - Qovery is the fastest way to deploy your full-stack apps on any Cloud
    provider.

    - ℹ️ The API is stable and still in development.
  contact:
    name: Qovery Product Team
    url: https://www.qovery.com
    email: support+api+documentation@qovery.com
  x-logo:
    url: https://console.qovery.com/assets/logos/logo-white.svg
    altText: Qovery
servers:
  - url: https://api.qovery.com
security:
  - bearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: Account
  - name: Account Info
  - name: Alert Receivers
  - name: Alert Rules
  - name: Admin
  - name: ArgoCD
  - name: Application
  - name: Application Actions
  - name: Application Configuration
  - name: Application Database
  - name: Application Deployment Restriction
  - name: Application Deployment History
  - name: Application Environment Variable
  - name: Application Logs
  - name: Application Main Calls
  - name: Application Secret
  - name: Application Annotations Group
  - name: Applications
  - name: AutoscalingPolicy
  - name: Container
  - name: Container Actions
  - name: Container Configuration
  - name: Container Database
  - name: Container Deployment History
  - name: Container Environment Variable
  - name: Container Logs
  - name: Container Main Calls
  - name: Container Registry
  - name: Container Secret
  - name: Container Annotations Group
  - name: Containers
  - name: Deployment Stage Main Calls
  - name: Job
  - name: Job Actions
  - name: Job Configuration
  - name: Job Database
  - name: Job Deployment Restriction
  - name: Job Deployment History
  - name: Job Environment Variable
  - name: Job Logs
  - name: Job Main Calls
  - name: Job Registry
  - name: Job Secret
  - name: Job Annotations Group
  - name: Jobs
  - name: KedaTriggerAuthentication
  - name: Helm
  - name: Helm Actions
  - name: Helm Configuration
  - name: Helm Database
  - name: Helm Deployment Restriction
  - name: Helm Deployment History
  - name: Helm Logs
  - name: Helm Main Calls
  - name: Helm Repository
  - name: Helms
  - name: Backups
  - name: Billing
  - name: Blueprint Catalog
  - name: Cloud Provider
  - name: Cloud Provider Credentials
  - name: Clusters
  - name: Custom Domain
  - name: Container Custom Domain
  - name: Database
  - name: Database Actions
  - name: Database Application
  - name: Database Container
  - name: Database Deployment History
  - name: Database Main Calls
  - name: Database Annotations Group
  - name: Databases
  - name: Environment
  - name: Environment Actions
  - name: Environment Deployment History
  - name: Environment Deployment Rule
  - name: Environment Logs
  - name: Environment Main Calls
  - name: Environment Secret
  - name: Environment Variable
  - name: Environments
  - name: Git
  - name: Github App
  - name: Git repositories
  - name: Members
  - name: Organization
  - name: Organization Account Git Repositories
  - name: Organization Cluster Lock
  - name: Organization Main Calls
  - name: Organization Custom Role
  - name: Organization Event
  - name: Organization Api Token
  - name: Organization Webhook
  - name: Organization Annotations Group
  - name: Organization Labels Group
  - name: Organization Enterprise Connection
  - name: Project
  - name: Project Deployment Rule
  - name: Project Environment Variable
  - name: Project Main Calls
  - name: Project Secret
  - name: Projects
  - name: Referral & Rewards
  - name: Secret Manager Access
  - name: Terraforms
  - name: Terraform Main Calls
  - name: Terraform Resources
  - name: Terraform Deployment History
  - name: Terraform Deployment Restriction
  - name: Container Registries
  - name: Helm Repositories
  - name: User Sign Up
  - name: Variable Main Calls
  - name: Helm Custom Domain
  - name: Lifecycle Template Main Calls
  - name: Blueprint Main Calls
paths:
  /clusters/{clusterId}/analysis:
    post:
      tags:
        - Clusters
      summary: Start cluster analysis
      description: >-
        Starts a read-only analysis for the cluster. The result and logs can be
        retrieved later from the cluster analysis endpoints.
      operationId: startClusterAnalysis
      parameters:
        - $ref: '#/components/parameters/clusterId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterAnalysisRequest'
      responses:
        '202':
          description: Cluster analysis started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterAnalysisResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          description: A cluster analysis is already in progress for this cluster
components:
  parameters:
    clusterId:
      name: clusterId
      in: path
      description: Cluster ID
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ClusterAnalysisRequest:
      type: object
      required:
        - kind
        - output_format
      properties:
        kind:
          $ref: '#/components/schemas/ClusterAnalysisKind'
        output_format:
          $ref: '#/components/schemas/ClusterAnalysisOutputFormat'
        prometheus_url:
          type: string
          nullable: true
          description: >-
            Optional Prometheus URL for COST_RECOMMENDATION analysis. When
            omitted, the engine resolves the default Qovery OBS endpoint.
        cmd_args:
          type: array
          description: >-
            Optional allowlisted KRR arguments for COST_RECOMMENDATION analysis.
            The engine validates and rejects unsupported or unsafe KRR flags.
          items:
            type: string
          example:
            - '--history_duration'
            - '336'
            - '--timeframe_duration'
            - '2.5'
            - '--cpu-request'
            - '99'
            - '--cpu-limit'
            - '99'
            - '--memory-buffer-percentage'
            - '15'
            - '--use-oomkill-data'
            - '--oom-memory-buffer-percentage'
            - '25'
            - '-n'
            - default
        target_kubernetes_version:
          type: string
          nullable: true
          description: >-
            Optional target Kubernetes version for DEPRECATED_API_CHECK
            analysis.
          example: '1.32'
    ClusterAnalysisResponse:
      type: object
      required:
        - id
        - cluster_id
        - organization_id
        - kind
        - status
        - output_format
        - created_at
        - updated_at
        - triggered_by
      properties:
        id:
          type: string
          format: uuid
        cluster_id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        kind:
          $ref: '#/components/schemas/ClusterAnalysisKind'
        status:
          $ref: '#/components/schemas/ClusterAnalysisStatus'
        output_format:
          $ref: '#/components/schemas/ClusterAnalysisOutputFormat'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        triggered_by:
          type: string
        error_message:
          type: string
          nullable: true
    ClusterAnalysisKind:
      type: string
      enum:
        - COST_RECOMMENDATION
        - DEPRECATED_API_CHECK
    ClusterAnalysisOutputFormat:
      type: string
      enum:
        - TABLE
        - JSON
        - CSV
    ClusterAnalysisStatus:
      type: string
      enum:
        - PENDING
        - RUNNING
        - SUCCEEDED
        - FAILED
        - TERMINATED
  responses:
    '400':
      description: Bad request
    '401':
      description: Access token is missing or invalid
    '403':
      description: Access forbidden
    '404':
      description: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT tokens should be used with OIDC account (human to machine). JWT
        tokens used by the Qovery console to communicate with the API have a
        TTL. Curl Example ' curl https://console.qovery.com/organization -H
        "Authorization: Bearer $qovery_token" '
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token API are generated by Qovery to manage machine to machine
        interaction and do not have a TTL. Curl Example ' curl
        https://console.qovery.com/organization -H "Authorization: Token
        $qovery_token" '

````