Argo Clusters API

Operations for registering and managing target Kubernetes clusters for application deployment.

OpenAPI Specification

argo-clusters-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Argo CD Applications Clusters API
  description: The Argo CD API provides REST endpoints for managing GitOps continuous delivery on Kubernetes. It enables creating and managing applications, projects, repositories, clusters, and certificates. The API supports syncing application state to match the desired state declared in Git, querying health and sync status, managing access control, and configuring notifications. All operations require authentication via bearer token obtained from the session endpoint.
  version: v2.x
  contact:
    name: Argo CD Community
    url: https://argo-cd.readthedocs.io/en/stable/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://localhost/api/v1
  description: Argo CD Server (default in-cluster address)
security:
- bearerAuth: []
tags:
- name: Clusters
  description: Operations for registering and managing target Kubernetes clusters for application deployment.
paths:
  /clusters:
    get:
      operationId: listClusters
      summary: Argo CD Argo List Clusters
      description: Returns all registered Kubernetes clusters available as deployment targets for Argo CD applications.
      tags:
      - Clusters
      responses:
        '200':
          description: List of clusters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterList'
        '401':
          description: Unauthorized.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createCluster
      summary: Argo CD Argo Register a Cluster
      description: Registers a new Kubernetes cluster as a deployment target. The cluster must be reachable from the Argo CD server and the provided credentials must have sufficient permissions.
      tags:
      - Clusters
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cluster'
      responses:
        '200':
          description: Cluster registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Cluster:
      type: object
      description: A registered Kubernetes cluster deployment target.
      properties:
        server:
          type: string
          description: Kubernetes API server URL.
          format: uri
        name:
          type: string
          description: Cluster display name.
        config:
          type: object
          description: Cluster connection configuration.
          properties:
            bearerToken:
              type: string
              description: Service account bearer token for cluster access.
            tlsClientConfig:
              type: object
              description: TLS client configuration.
              properties:
                insecure:
                  type: boolean
                  description: Skip TLS verification.
        info:
          type: object
          description: Cluster information.
          properties:
            serverVersion:
              type: string
              description: Kubernetes server version.
            applicationsCount:
              type: integer
              description: Number of applications targeting this cluster.
    ClusterList:
      type: object
      description: A list of registered clusters.
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Cluster'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from the POST /session endpoint using username/password or from an external OIDC provider configured in Argo CD.
externalDocs:
  description: Argo CD API Documentation
  url: https://argo-cd.readthedocs.io/en/stable/developer-guide/api-docs/