Argo CD ClusterService API

The ClusterService API from Argo CD — 4 operation(s) for clusterservice.

OpenAPI Specification

argo-cd-clusterservice-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: Argo CD REST API for managing GitOps continuous delivery on Kubernetes. Authentication uses JWT bearer tokens obtained via the /api/v1/session endpoint.
  title: Argo CD AccountService ClusterService API
  version: 2.14.0
  x-type: opensource
  x-generated-from: documentation
consumes:
- application/json
produces:
- application/json
security:
- BearerToken: []
tags:
- name: ClusterService
paths:
  /api/v1/clusters:
    get:
      tags:
      - ClusterService
      summary: Argo CD List Returns List of Clusters
      operationId: ClusterService_List
      parameters:
      - type: string
        name: server
        in: query
      - type: string
        name: name
        in: query
      - type: string
        description: type is the type of the specified cluster identifier ( "server" - default, "name" ).
        name: id.type
        in: query
      - type: string
        description: value holds the cluster server URL or cluster name.
        name: id.value
        in: query
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1alpha1ClusterList'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - ClusterService
      summary: Argo CD Create Creates a Cluster
      operationId: ClusterService_Create
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/v1alpha1Cluster'
      - type: boolean
        name: upsert
        in: query
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1alpha1Cluster'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v1/clusters/{id.value}:
    get:
      tags:
      - ClusterService
      summary: Argo CD Get Returns a Cluster by Server Address
      operationId: ClusterService_Get
      parameters:
      - type: string
        description: value holds the cluster server URL or cluster name
        name: id.value
        in: path
        required: true
      - type: string
        name: server
        in: query
      - type: string
        name: name
        in: query
      - type: string
        description: type is the type of the specified cluster identifier ( "server" - default, "name" ).
        name: id.type
        in: query
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1alpha1Cluster'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      tags:
      - ClusterService
      summary: Argo CD Update Updates a Cluster
      operationId: ClusterService_Update
      parameters:
      - type: string
        description: value holds the cluster server URL or cluster name
        name: id.value
        in: path
        required: true
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/v1alpha1Cluster'
      - type: array
        items:
          type: string
        collectionFormat: multi
        name: updatedFields
        in: query
      - type: string
        description: type is the type of the specified cluster identifier ( "server" - default, "name" ).
        name: id.type
        in: query
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1alpha1Cluster'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - ClusterService
      summary: Argo CD Delete Deletes a Cluster
      operationId: ClusterService_Delete
      parameters:
      - type: string
        description: value holds the cluster server URL or cluster name
        name: id.value
        in: path
        required: true
      - type: string
        name: server
        in: query
      - type: string
        name: name
        in: query
      - type: string
        description: type is the type of the specified cluster identifier ( "server" - default, "name" ).
        name: id.type
        in: query
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/clusterClusterResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v1/clusters/{id.value}/invalidate-cache:
    post:
      tags:
      - ClusterService
      summary: Argo CD InvalidateCache Invalidates Cluster Cache
      operationId: ClusterService_InvalidateCache
      parameters:
      - type: string
        description: value holds the cluster server URL or cluster name
        name: id.value
        in: path
        required: true
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1alpha1Cluster'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v1/clusters/{id.value}/rotate-auth:
    post:
      tags:
      - ClusterService
      summary: Argo CD RotateAuth Rotates the Bearer Token Used for a Cluster
      operationId: ClusterService_RotateAuth
      parameters:
      - type: string
        description: value holds the cluster server URL or cluster name
        name: id.value
        in: path
        required: true
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/clusterClusterResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/runtimeError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
definitions:
  v1alpha1Cluster:
    type: object
    title: Cluster is the definition of a cluster resource
    properties:
      annotations:
        type: object
        title: Annotations for cluster secret metadata
        additionalProperties:
          type: string
      clusterResources:
        description: Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode.
        type: boolean
      config:
        $ref: '#/definitions/v1alpha1ClusterConfig'
      connectionState:
        $ref: '#/definitions/v1alpha1ConnectionState'
      info:
        $ref: '#/definitions/v1alpha1ClusterInfo'
      labels:
        type: object
        title: Labels for cluster secret metadata
        additionalProperties:
          type: string
      name:
        type: string
        title: Name of the cluster. If omitted, will use the server address
      namespaces:
        description: Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty.
        type: array
        items:
          type: string
      project:
        type: string
        title: Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity
      refreshRequestedAt:
        $ref: '#/definitions/v1Time'
      server:
        type: string
        title: Server is the API server URL of the Kubernetes cluster
      serverVersion:
        type: string
        title: 'Deprecated: use Info.ServerVersion field instead.

          The server version'
      shard:
        description: Shard contains optional shard number. Calculated on the fly by the application controller if not specified.
        type: integer
        format: int64
  protobufAny:
    type: object
    properties:
      type_url:
        type: string
      value:
        type: string
        format: byte
  v1ListMeta:
    description: 'ListMeta describes metadata that synthetic resources must have, including lists and

      various status objects. A resource may have only one of {ObjectMeta, ListMeta}.'
    type: object
    properties:
      continue:
        description: 'continue may be set if the user set a limit on the number of items returned, and indicates that

          the server has more data available. The value is opaque and may be used to issue another request

          to the endpoint that served this list to retrieve the next set of available objects. Continuing a

          consistent list may not be possible if the server configuration has changed or more than a few

          minutes have passed. The resourceVersion field returned when using this continue value will be

          identical to the value in the first response, unless you have received this token from an error

          message.'
        type: string
      remainingItemCount:
        type: integer
        format: int64
        title: 'remainingItemCount is the number of subsequent items in the list which are not included in this

          list response. If the list request contained label or field selectors, then the number of

          remaining items is unknown and the field will be left unset and omitted during serialization.

          If the list is complete (either because it is not chunking or because this is the last chunk),

          then there are no more remaining items and this field will be left unset and omitted during

          serialization.

          Servers older than v1.15 do not set this field.

          The intended use of the remainingItemCount is *estimating* the size of a collection. Clients

          should not rely on the remainingItemCount to be set or to be exact.

          +optional'
      resourceVersion:
        type: string
        title: 'String that identifies the server''s internal version of this object that

          can be used by clients to determine when objects have changed.

          Value must be treated as opaque by clients and passed unmodified back to the server.

          Populated by the system.

          Read-only.

          More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency

          +optional'
      selfLink:
        type: string
        title: 'Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.

          +optional'
  runtimeError:
    type: object
    properties:
      code:
        type: integer
        format: int32
      details:
        type: array
        items:
          $ref: '#/definitions/protobufAny'
      error:
        type: string
      message:
        type: string
  clusterClusterResponse:
    type: object
  v1alpha1ClusterInfo:
    type: object
    title: ClusterInfo contains information about the cluster
    properties:
      apiVersions:
        type: array
        title: APIVersions contains list of API versions supported by the cluster
        items:
          type: string
      applicationsCount:
        type: integer
        format: int64
        title: ApplicationsCount is the number of applications managed by Argo CD on the cluster
      cacheInfo:
        $ref: '#/definitions/v1alpha1ClusterCacheInfo'
      connectionState:
        $ref: '#/definitions/v1alpha1ConnectionState'
      serverVersion:
        type: string
        title: ServerVersion contains information about the Kubernetes version of the cluster
  v1alpha1ConnectionState:
    type: object
    title: ConnectionState contains information about remote resource connection state, currently used for clusters and repositories
    properties:
      attemptedAt:
        $ref: '#/definitions/v1Time'
      message:
        type: string
        title: Message contains human readable information about the connection status
      status:
        type: string
        title: Status contains the current status indicator for the connection
  v1alpha1ClusterCacheInfo:
    type: object
    title: ClusterCacheInfo contains information about the cluster cache
    properties:
      apisCount:
        type: integer
        format: int64
        title: APIsCount holds number of observed Kubernetes API count
      lastCacheSyncTime:
        $ref: '#/definitions/v1Time'
      resourcesCount:
        type: integer
        format: int64
        title: ResourcesCount holds number of observed Kubernetes resources
  v1alpha1TLSClientConfig:
    type: object
    title: TLSClientConfig contains settings to enable transport layer security
    properties:
      caData:
        type: string
        format: byte
        title: 'CAData holds PEM-encoded bytes (typically read from a root certificates bundle).

          CAData takes precedence over CAFile'
      certData:
        type: string
        format: byte
        title: 'CertData holds PEM-encoded bytes (typically read from a client certificate file).

          CertData takes precedence over CertFile'
      insecure:
        description: Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only.
        type: boolean
      keyData:
        type: string
        format: byte
        title: 'KeyData holds PEM-encoded bytes (typically read from a client certificate key file).

          KeyData takes precedence over KeyFile'
      serverName:
        description: 'ServerName is passed to the server for SNI and is used in the client to check server

          certificates against. If ServerName is empty, the hostname used to contact the

          server is used.'
        type: string
  v1alpha1ClusterConfig:
    description: 'ClusterConfig is the configuration attributes. This structure is subset of the go-client

      rest.Config with annotations added for marshalling.'
    type: object
    properties:
      awsAuthConfig:
        $ref: '#/definitions/v1alpha1AWSAuthConfig'
      bearerToken:
        description: 'Server requires Bearer authentication. This client will not attempt to use

          refresh tokens for an OAuth2 flow.

          TODO: demonstrate an OAuth2 compatible client.'
        type: string
      disableCompression:
        description: DisableCompression bypasses automatic GZip compression requests to the server.
        type: boolean
      execProviderConfig:
        $ref: '#/definitions/v1alpha1ExecProviderConfig'
      password:
        type: string
      proxyUrl:
        type: string
        title: ProxyURL is the URL to the proxy to be used for all requests send to the server
      tlsClientConfig:
        $ref: '#/definitions/v1alpha1TLSClientConfig'
      username:
        type: string
        title: Server requires Basic authentication
  v1Time:
    description: 'Time is a wrapper around time.Time which supports correct

      marshaling to YAML and JSON.  Wrappers are provided for many

      of the factory methods that the time package offers.


      +protobuf.options.marshal=false

      +protobuf.as=Timestamp

      +protobuf.options.(gogoproto.goproto_stringer)=false'
    type: string
    format: date-time
  v1alpha1ClusterList:
    description: ClusterList is a collection of Clusters.
    type: object
    properties:
      items:
        type: array
        items:
          $ref: '#/definitions/v1alpha1Cluster'
      metadata:
        $ref: '#/definitions/v1ListMeta'
  v1alpha1ExecProviderConfig:
    type: object
    title: 'ExecProviderConfig is config used to call an external command to perform cluster authentication

      See: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig'
    properties:
      apiVersion:
        type: string
        title: Preferred input version of the ExecInfo
      args:
        type: array
        title: Arguments to pass to the command when executing it
        items:
          type: string
      command:
        type: string
        title: Command to execute
      env:
        type: object
        title: Env defines additional environment variables to expose to the process
        additionalProperties:
          type: string
      installHint:
        type: string
        title: This text is shown to the user when the executable doesn't seem to be present
  v1alpha1AWSAuthConfig:
    type: object
    title: AWSAuthConfig is an AWS IAM authentication configuration
    properties:
      clusterName:
        type: string
        title: ClusterName contains AWS cluster name
      profile:
        description: Profile contains optional role ARN. If set then AWS IAM Authenticator uses the profile to perform cluster operations instead of the default AWS credential provider chain.
        type: string
      roleARN:
        description: RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.
        type: string
securityDefinitions:
  BearerToken:
    type: apiKey
    in: header
    name: Authorization
    description: 'JWT Bearer token. Format: Bearer <token>'