# Update application spec

UpdateSpec updates an application spec.

Endpoint: PUT /gitops/api/v1/agents/{agentIdentifier}/applications/{request.name}/spec
Version: 1.0
Security: x-api-key

## Path parameters:

  - `agentIdentifier` (string, required)
    Agent identifier for entity.

  - `request.name` (string, required)

## Query parameters:

  - `accountIdentifier` (string)
    Account Identifier for the Entity.

  - `orgIdentifier` (string)
    Organization Identifier for the Entity.

  - `projectIdentifier` (string)
    Project Identifier for the Entity.

## Request fields (application/json):

  - `name` (string)

  - `spec` (object)
    ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.

  - `spec.source` (object)

  - `spec.source.repoURL` (string)

  - `spec.source.path` (string)
    Path is a directory path within the Git repository, and is only valid for applications sourced from Git.

  - `spec.source.targetRevision` (string)
    TargetRevision defines the revision of the source to sync the application to.
In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD.
In case of Helm, this is a semver tag for the Chart's version.

  - `spec.source.helm` (object)

  - `spec.source.helm.valueFiles` (array)

  - `spec.source.helm.parameters` (array)

  - `spec.source.helm.parameters.name` (string)

  - `spec.source.helm.parameters.value` (string)

  - `spec.source.helm.parameters.forceString` (boolean)

  - `spec.source.helm.releaseName` (string)

  - `spec.source.helm.values` (string)

  - `spec.source.helm.fileParameters` (array)

  - `spec.source.helm.fileParameters.name` (string)

  - `spec.source.helm.fileParameters.path` (string)

  - `spec.source.helm.version` (string)

  - `spec.source.helm.passCredentials` (boolean)

  - `spec.source.helm.ignoreMissingValueFiles` (boolean)

  - `spec.source.helm.skipCrds` (boolean)

  - `spec.source.helm.valuesObject` (object)

  - `spec.source.helm.namespace` (string)
    Namespace is an optional namespace to template with. If left empty, defaults to the app's destination namespace.

  - `spec.source.helm.kubeVersion` (string)
    KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD
uses the Kubernetes version of the target cluster.

  - `spec.source.helm.apiVersions` (array)
    APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,
Argo CD uses the API versions of the target cluster. The format is [group/]version/kind.

  - `spec.source.helm.skipTests` (boolean)
    SkipTests skips test manifest installation step (Helm's --skip-tests).

  - `spec.source.helm.skipSchemaValidation` (boolean)

  - `spec.source.kustomize` (object)

  - `spec.source.kustomize.namePrefix` (string)

  - `spec.source.kustomize.nameSuffix` (string)

  - `spec.source.kustomize.images` (array)

  - `spec.source.kustomize.commonLabels` (object)

  - `spec.source.kustomize.version` (string)

  - `spec.source.kustomize.commonAnnotations` (object)

  - `spec.source.kustomize.forceCommonLabels` (boolean)

  - `spec.source.kustomize.forceCommonAnnotations` (boolean)

  - `spec.source.kustomize.namespace` (string)

  - `spec.source.kustomize.commonAnnotationsEnvsubst` (boolean)

  - `spec.source.kustomize.replicas` (array)

  - `spec.source.kustomize.replicas.count` (string)

  - `spec.source.kustomize.replicas.name` (string)

  - `spec.source.kustomize.patches` (array)

  - `spec.source.kustomize.patches.path` (string)

  - `spec.source.kustomize.patches.patch` (string)

  - `spec.source.kustomize.patches.target` (object)

  - `spec.source.kustomize.patches.target.resId` (object)

  - `spec.source.kustomize.patches.target.resId.gvk` (object)

  - `spec.source.kustomize.patches.target.resId.gvk.group` (string)

  - `spec.source.kustomize.patches.target.resId.gvk.version` (string)

  - `spec.source.kustomize.patches.target.resId.gvk.kind` (string)

  - `spec.source.kustomize.patches.target.resId.name` (string)

  - `spec.source.kustomize.patches.target.resId.namespace` (string)

  - `spec.source.kustomize.patches.target.annotationSelector` (string)

  - `spec.source.kustomize.patches.target.labelSelector` (string)

  - `spec.source.kustomize.patches.options` (object)

  - `spec.source.kustomize.components` (array)

  - `spec.source.kustomize.labelWithoutSelector` (boolean)

  - `spec.source.kustomize.kubeVersion` (string)
    KubeVersion specifies the Kubernetes API version to pass to Helm when templating manifests. By default, Argo CD
uses the Kubernetes version of the target cluster.

  - `spec.source.kustomize.apiVersions` (array)
    APIVersions specifies the Kubernetes resource API versions to pass to Helm when templating manifests. By default,
Argo CD uses the API versions of the target cluster. The format is [group/]version/kind.

  - `spec.source.kustomize.ignoreMissingComponents` (boolean)

  - `spec.source.kustomize.labelIncludeTemplates` (boolean)

  - `spec.source.ksonnet` (object)

  - `spec.source.ksonnet.environment` (string)

  - `spec.source.ksonnet.parameters` (array)

  - `spec.source.ksonnet.parameters.component` (string)

  - `spec.source.ksonnet.parameters.name` (string)

  - `spec.source.ksonnet.parameters.value` (string)

  - `spec.source.directory` (object)

  - `spec.source.directory.recurse` (boolean)

  - `spec.source.directory.jsonnet` (object)

  - `spec.source.directory.jsonnet.extVars` (array)

  - `spec.source.directory.jsonnet.extVars.name` (string)

  - `spec.source.directory.jsonnet.extVars.value` (string)

  - `spec.source.directory.jsonnet.extVars.code` (boolean)

  - `spec.source.directory.jsonnet.tlas` (array)

  - `spec.source.directory.jsonnet.libs` (array)

  - `spec.source.directory.exclude` (string)

  - `spec.source.directory.include` (string)

  - `spec.source.plugin` (object)

  - `spec.source.plugin.name` (string)

  - `spec.source.plugin.env` (array)

  - `spec.source.plugin.env.name` (string)

  - `spec.source.plugin.env.value` (string)

  - `spec.source.plugin.parameters` (array)

  - `spec.source.plugin.parameters.name` (string)
    Name is the name identifying a parameter.

  - `spec.source.plugin.parameters.string` (string)
    String_ is the value of a string type parameter.

  - `spec.source.plugin.parameters.map` (object)

  - `spec.source.plugin.parameters.map.map` (object)

  - `spec.source.plugin.parameters.array` (object)

  - `spec.source.plugin.parameters.array.array` (array)

  - `spec.source.chart` (string)
    Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.

  - `spec.source.ref` (string)
    Ref is reference to another source within sources field. This field will not be used if used with a source tag.

  - `spec.source.name` (string)
    Name is used to refer to a source and is displayed in the UI. It is used in multi-source Applications.

  - `spec.destination` (object)

  - `spec.destination.server` (string)

  - `spec.destination.namespace` (string)

  - `spec.destination.name` (string)

  - `spec.project` (string)
    Project is a reference to the project this application belongs to.
The empty string means that application belongs to the 'default' project.

  - `spec.syncPolicy` (object)

  - `spec.syncPolicy.automated` (object)

  - `spec.syncPolicy.automated.prune` (boolean)

  - `spec.syncPolicy.automated.selfHeal` (boolean)

  - `spec.syncPolicy.automated.allowEmpty` (boolean)

  - `spec.syncPolicy.automated.enabled` (boolean)

  - `spec.syncPolicy.syncOptions` (array)

  - `spec.syncPolicy.retry` (object)

  - `spec.syncPolicy.retry.limit` (string)
    Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.

  - `spec.syncPolicy.retry.backoff` (object)

  - `spec.syncPolicy.retry.backoff.duration` (string)

  - `spec.syncPolicy.retry.backoff.factor` (string)

  - `spec.syncPolicy.retry.backoff.maxDuration` (string)

  - `spec.syncPolicy.retry.refresh` (boolean)

  - `spec.syncPolicy.managedNamespaceMetadata` (object)

  - `spec.syncPolicy.managedNamespaceMetadata.labels` (object)

  - `spec.syncPolicy.managedNamespaceMetadata.annotations` (object)

  - `spec.ignoreDifferences` (array)

  - `spec.ignoreDifferences.group` (string)

  - `spec.ignoreDifferences.kind` (string)

  - `spec.ignoreDifferences.name` (string)

  - `spec.ignoreDifferences.namespace` (string)

  - `spec.ignoreDifferences.jsonPointers` (array)

  - `spec.ignoreDifferences.jqPathExpressions` (array)

  - `spec.ignoreDifferences.managedFieldsManagers` (array)

  - `spec.info` (array)

  - `spec.info.name` (string)

  - `spec.info.value` (string)

  - `spec.revisionHistoryLimit` (string)
    RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions.
This should only be changed in exceptional circumstances.
Setting to zero will store no history. This will reduce storage used.
Increasing will increase the space used to store the history, so we do not recommend increasing it.
Default is 10.

  - `spec.sources` (array)

  - `spec.sourceHydrator` (object)
    SourceHydrator specifies a dry "don't repeat yourself" source for manifests, a sync source from which to sync
hydrated manifests, and an optional hydrateTo location to act as a "staging" aread for hydrated manifests.

  - `spec.sourceHydrator.drySource` (object)
    DrySource specifies a location for dry "don't repeat yourself" manifest source information.

  - `spec.sourceHydrator.drySource.repoURL` (string)

  - `spec.sourceHydrator.drySource.targetRevision` (string)

  - `spec.sourceHydrator.drySource.path` (string)

  - `spec.sourceHydrator.drySource.helm` (object)

  - `spec.sourceHydrator.drySource.kustomize` (object)

  - `spec.sourceHydrator.drySource.directory` (object)

  - `spec.sourceHydrator.drySource.plugin` (object)

  - `spec.sourceHydrator.syncSource` (object)
    SyncSource specifies a location from which hydrated manifests may be synced. RepoURL is assumed based on the
associated DrySource config in the SourceHydrator.

  - `spec.sourceHydrator.syncSource.targetBranch` (string)
    TargetBranch is the branch from which hydrated manifests will be synced.
If HydrateTo is not set, this is also the branch to which hydrated manifests are committed.

  - `spec.sourceHydrator.syncSource.path` (string)
    Path is a directory path within the git repository where hydrated manifests should be committed to and synced
from. The Path should never point to the root of the repo. If hydrateTo is set, this is just the path from which
hydrated manifests will be synced.

+kubebuilder:validation:Required
+kubebuilder:validation:MinLength=1
+kubebuilder:validation:Pattern=^.{2,}|[^./]$

  - `spec.sourceHydrator.hydrateTo` (object)
    HydrateTo specifies a location to which hydrated manifests should be pushed as a "staging area" before being moved to
the SyncSource. The RepoURL and Path are assumed based on the associated SyncSource config in the SourceHydrator.

  - `spec.sourceHydrator.hydrateTo.targetBranch` (string)

  - `validate` (boolean)

  - `appNamespace` (string)

  - `project` (string)

## Response default fields (application/json):

  - `error` (string)

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.type_url` (string)
    A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading "." is not accepted).

In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:

* If no scheme is provided, https is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
  value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
  URL, or have them precompiled into a binary to avoid any
  lookup. Therefore, binary compatibility needs to be preserved
  on changes to types. (Use versioned type names to manage
  breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server
implementations and no plans to implement one.

Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.

  - `details.value` (string)
    Must be a valid serialized protocol buffer of the above specified type.


