---
title: "UpdateSpec updates an application spec"
method: PUT
path: "/api/v1/applications/{name}/spec"
tags: ["ApplicationService"]
---

# UpdateSpec updates an application spec

`PUT /api/v1/applications/{name}/spec`

## Path parameters

- `name` string, required

## Request body

- V1alpha1ApplicationSpec — ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.
  - `destination` V1alpha1ApplicationDestination
    - `namespace` string
    - `server` string
  - `ignoreDifferences` V1alpha1ResourceIgnoreDifferences[]
    - `group` string
    - `jsonPointers` string[]
    - `kind` string
    - `name` string
    - `namespace` string
  - `info` V1alpha1Info[]
    - `name` string
    - `value` string
  - `project` string — Project is a application project name. Empty name means that application belongs to 'default' project.
  - `source` V1alpha1ApplicationSource — ApplicationSource contains information about github repository, path within repository and target application environment.
    - `directory` V1alpha1ApplicationSourceDirectory
      - `jsonnet` V1alpha1ApplicationSourceJsonnet
        - `extVars` V1alpha1JsonnetVar[]
          - `code` boolean
          - `name` string
          - `value` string
        - `tlas` V1alpha1JsonnetVar[]
          - `code` boolean
          - `name` string
          - `value` string
      - `recurse` boolean
    - `helm` V1alpha1ApplicationSourceHelm
      - `parameters` V1alpha1HelmParameter[]
        - `forceString` boolean
        - `name` string
        - `value` string
      - `releaseName` string
      - `valueFiles` string[]
    - `ksonnet` V1alpha1ApplicationSourceKsonnet
      - `environment` string
      - `parameters` V1alpha1KsonnetParameter[]
        - `component` string
        - `name` string
        - `value` string
    - `kustomize` V1alpha1ApplicationSourceKustomize
      - `commonLabels` object
      - `images` string[]
      - `namePrefix` string
    - `path` string
    - `plugin` V1alpha1ApplicationSourcePlugin
      - `env` V1alpha1EnvEntry[]
        - `name` string
        - `value` string
      - `name` string
    - `repoURL` string
    - `targetRevision` string
  - `syncPolicy` V1alpha1SyncPolicy
    - `automated` V1alpha1SyncPolicyAutomated
      - `prune` boolean
      - `selfHeal` boolean

## Response `200`

(empty)

- V1alpha1ApplicationSpec — ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.
  - `destination` V1alpha1ApplicationDestination
    - `namespace` string
    - `server` string
  - `ignoreDifferences` V1alpha1ResourceIgnoreDifferences[]
    - `group` string
    - `jsonPointers` string[]
    - `kind` string
    - `name` string
    - `namespace` string
  - `info` V1alpha1Info[]
    - `name` string
    - `value` string
  - `project` string — Project is a application project name. Empty name means that application belongs to 'default' project.
  - `source` V1alpha1ApplicationSource — ApplicationSource contains information about github repository, path within repository and target application environment.
    - `directory` V1alpha1ApplicationSourceDirectory
      - `jsonnet` V1alpha1ApplicationSourceJsonnet
        - `extVars` V1alpha1JsonnetVar[]
          - `code` boolean
          - `name` string
          - `value` string
        - `tlas` V1alpha1JsonnetVar[]
          - `code` boolean
          - `name` string
          - `value` string
      - `recurse` boolean
    - `helm` V1alpha1ApplicationSourceHelm
      - `parameters` V1alpha1HelmParameter[]
        - `forceString` boolean
        - `name` string
        - `value` string
      - `releaseName` string
      - `valueFiles` string[]
    - `ksonnet` V1alpha1ApplicationSourceKsonnet
      - `environment` string
      - `parameters` V1alpha1KsonnetParameter[]
        - `component` string
        - `name` string
        - `value` string
    - `kustomize` V1alpha1ApplicationSourceKustomize
      - `commonLabels` object
      - `images` string[]
      - `namePrefix` string
    - `path` string
    - `plugin` V1alpha1ApplicationSourcePlugin
      - `env` V1alpha1EnvEntry[]
        - `name` string
        - `value` string
      - `name` string
    - `repoURL` string
    - `targetRevision` string
  - `syncPolicy` V1alpha1SyncPolicy
    - `automated` V1alpha1SyncPolicyAutomated
      - `prune` boolean
      - `selfHeal` boolean

---

[API](https://skmtc.net/devtron-labs/apis/consolidate-services.md) · [All operations](https://skmtc.net/devtron-labs/apis/consolidate-services/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devtron-labs/consolidate-services/revisions/778bfc291d1e/schema)
